Mantid
|
Converts a Python sequence type to a C++ std::vector, where the element type is defined by the template type. More...
#include <PySequenceToVector.h>
Public Types | |
using | TypedVector = std::vector< DestElementType > |
Public Member Functions | |
void | copyTo (TypedVector &dest) |
Fill the container with data from the array. More... | |
TypedVector | operator() () |
Converts the Python object to a C++ vector. More... | |
PySequenceToVector (const boost::python::object &value) | |
Private Member Functions | |
PyObject * | ptr () const |
std::size_t | srcSize () const |
void | throwIfSizeMismatched (const TypedVector &dest) const |
Private Attributes | |
boost::python::object | m_obj |
Python object to convert. More... | |
Converts a Python sequence type to a C++ std::vector, where the element type is defined by the template type.
Definition at line 49 of file PySequenceToVector.h.
using Mantid::PythonInterface::Converters::PySequenceToVector< DestElementType >::TypedVector = std::vector<DestElementType> |
Definition at line 51 of file PySequenceToVector.h.
|
inline |
Definition at line 53 of file PySequenceToVector.h.
|
inline |
Fill the container with data from the array.
dest | A vector<DestElementType> that receives the data |
Definition at line 70 of file PySequenceToVector.h.
|
inline |
Converts the Python object to a C++ vector.
Definition at line 60 of file PySequenceToVector.h.
|
inlineprivate |
Definition at line 80 of file PySequenceToVector.h.
|
inlineprivate |
Definition at line 82 of file PySequenceToVector.h.
|
inlineprivate |
Definition at line 84 of file PySequenceToVector.h.
References std::to_string().
|
private |
Python object to convert.
Definition at line 92 of file PySequenceToVector.h.