from_python_sequence Struct Template Reference

#include <pyconversions.h>

List of all members.


Detailed Description

template<typename ContainerType, typename ConversionPolicy>
struct from_python_sequence< ContainerType, ConversionPolicy >

Conversion of Python sequence to C++ container.

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

Author:
Ralf W. Grosse-Kunstleve <rwgk@yahoo.com> of Lawrence Berkeley National Laboratory

Definition at line 148 of file pyconversions.h.

Public Types

typedef ContainerType::value_type container_element_type

Public Member Functions

 from_python_sequence ()

Static Public Member Functions

static void construct (PyObject *obj_ptr, boost::python::converter::rvalue_from_python_stage1_data *data)
 Constructs a C++ container from a Python sequence.
static void * convertible (PyObject *obj_ptr)
 Appears to return obj_ptr if it is type of Python sequence that can be convertible to C++ container.


Member Typedef Documentation

typedef ContainerType::value_type container_element_type

Definition at line 150 of file pyconversions.h.


Constructor & Destructor Documentation

from_python_sequence (  )  [inline]

Definition at line 152 of file pyconversions.h.

References construct(), and convertible().


Member Function Documentation

static void construct ( PyObject *  obj_ptr,
boost::python::converter::rvalue_from_python_stage1_data *  data 
) [inline, static]

Constructs a C++ container from a Python sequence.

Definition at line 214 of file pyconversions.h.

Referenced by from_python_sequence().

static void* convertible ( PyObject *  obj_ptr  )  [inline, static]

Appears to return obj_ptr if it is type of Python sequence that can be convertible to C++ container.

Definition at line 162 of file pyconversions.h.

References num_util::check_size().

Referenced by from_python_sequence().


The documentation for this struct was generated from the following file:
Generated for HippoDraw Class Library by doxygen