casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
casacore::python::to_list< ContainerType > Struct Template Reference

A wrapper of a conversion function to convert a STL vector to a Python list. More...

#include <PycBasicData.h>

Static Public Member Functions

static boost::python::object makeobject (ContainerType const &c)
 Creates and returns a Python list from the elements copied from a STL container. More...
 
static PyObject * convert (ContainerType const &c)
 

Detailed Description

template<typename ContainerType>
struct casacore::python::to_list< ContainerType >

A wrapper of a conversion function to convert a STL vector to a Python list.

This class satisfies the requirements of the boost::python::to_python_converter conversion template argument.

Copied from scitbx/include/scitbx/boost_python/container_conversions.h that is described in the Boost.Python FAQ.

Author
Ralf W. Grosse-Kunstleve rwgk@.nosp@m.yaho.nosp@m.o.com of Lawrence Berkeley National Laboratory

Definition at line 234 of file PycBasicData.h.

Member Function Documentation

template<typename ContainerType >
static PyObject* casacore::python::to_list< ContainerType >::convert ( ContainerType const &  c)
inlinestatic
template<typename ContainerType >
static boost::python::object casacore::python::to_list< ContainerType >::makeobject ( ContainerType const &  c)
inlinestatic

Creates and returns a Python list from the elements copied from a STL container.

The ContainerType must be a container with STL iterators defined on it. It may contain any type of object supported by the boost::python::object constructor.

Definition at line 241 of file PycBasicData.h.

Referenced by casacore::python::to_list< ContainerType >::convert(), casacore::python::to_list< casacore::IPosition >::convert(), casacore::python::to_list< std::vector< bool > >::convert(), casacore::python::to_list< std::vector< casacore::String > >::convert(), casacore::python::to_list< casacore::Array< casacore::String > >::convert(), and casacore::python::to_list< casacore::Vector< casacore::String > >::convert().


The documentation for this struct was generated from the following file: