Mantid
|
Takes a Python object and if it supports indexing and is of length 3 then it will attempt to convert a Kernel::VMD object from it. More...
#include <PyObjectToVMD.h>
Public Member Functions | |
Kernel::VMD | operator() () |
Produces a VMD object from the given PyObject. More... | |
PyObjectToVMD (const boost::python::object &p) | |
Construct the converter object with the given Python object. More... | |
Private Attributes | |
bool | m_alreadyVMD |
Is the object a wrapped instance of VMD. 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::VMD object from it.
Definition at line 22 of file PyObjectToVMD.h.
Mantid::PythonInterface::Converters::PyObjectToVMD::PyObjectToVMD | ( | 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 VMD object. Throws std::invalid_argument if not if that is not the case. |
Definition at line 34 of file PyObjectToVMD.cpp.
References m_alreadyVMD.
Kernel::VMD Mantid::PythonInterface::Converters::PyObjectToVMD::operator() | ( | ) |
Produces a VMD object from the given PyObject.
Returns a VMD object from the Python object given to the converter.
Definition at line 62 of file PyObjectToVMD.cpp.
References m_alreadyVMD, and m_obj.
|
private |
Is the object a wrapped instance of VMD.
Definition at line 31 of file PyObjectToVMD.h.
Referenced by operator()(), and PyObjectToVMD().
|
private |
A reference to the object.
Definition at line 29 of file PyObjectToVMD.h.
Referenced by operator()().