Mantid
|
Takes a Python object and if it supports indexing and is of length 3 then it will attempt to convert a Kernel::V3D object from it. More...
#include <PyObjectToV3D.h>
Public Member Functions | |
Kernel::V3D | operator() () |
Produces a V3D object from the given PyObject. More... | |
PyObjectToV3D (const boost::python::object &p) | |
Construct the converter object with the given Python object. More... | |
Private Attributes | |
bool | m_alreadyV3D |
Is the object a wrapped instance of V3D. More... | |
const boost::python::object & | m_obj |
A reference to the object. More... | |
Takes a Python object and if it supports indexing and is of length 3 then it will attempt to convert a Kernel::V3D object from it.
Definition at line 22 of file PyObjectToV3D.h.
Mantid::PythonInterface::Converters::PyObjectToV3D::PyObjectToV3D | ( | const boost::python::object & | p | ) |
Construct the converter object with the given Python object.
p | :: A boost::python object that should support the getitem and len protocol or be a wrapped V3D object. Throws std::invalid_argument if not if that is not the case. |
Definition at line 32 of file PyObjectToV3D.cpp.
References m_alreadyV3D.
Kernel::V3D Mantid::PythonInterface::Converters::PyObjectToV3D::operator() | ( | ) |
Produces a V3D object from the given PyObject.
Returns a V3D object from the Python object given to the converter.
Definition at line 59 of file PyObjectToV3D.cpp.
References m_alreadyV3D, m_obj, and obj.
|
private |
Is the object a wrapped instance of V3D.
Definition at line 31 of file PyObjectToV3D.h.
Referenced by operator()(), and PyObjectToV3D().
|
private |
A reference to the object.
Definition at line 29 of file PyObjectToV3D.h.
Referenced by operator()().