Template Struct StdContainerFromPythonList

Struct Documentation

template<typename vector_type, bool NoProxy>
struct StdContainerFromPythonList

Register the conversion from a Python list to a std::vector.

Template Parameters:

vector_type – A std container (e.g. std::vector or std::list)

Public Types

typedef vector_type::value_type T
typedef details::container_traits<vector_type>::Allocator Allocator

Public Static Functions

static inline void *convertible(PyObject *obj_ptr)

Check if obj_ptr can be converted.

static inline void construct(PyObject *obj_ptr, boost::python::converter::rvalue_from_python_stage1_data *memory)

Allocate the std::vector and fill it with the element contained in the list.

static inline void register_converter()
static inline ::boost::python::list tolist(vector_type &self, const bool deep_copy = false)