27 std::vector<PyOpalObjectNS::AttributeDef>
28 PyOpalObjectNS::PyOpalObject<TBeamline<Element> >::attributes = {
60 PyObject* mod = PyImport_ImportModule(
"pyopal.elements.opal_element");
void registerExceptions()
Register exception translations with boost.
void Initialise()
Globals namespace provides routines to initialise global objects:
BOOST_PYTHON_MODULE(line)
void addGetOpalElement(PYCLASS &pyclass)
Add a "get_opal_element" method to the python class (to overload as a PyOpalElement)
PyLine_ is a list of elements in a beamline.
int getLength() const
Returns the number of elements in the line.
void setName(std::string name)
Set the name of the underlying object.
void append(boost::python::object element)
Extend the length of the vector and TBeamline.
void setElement(int i, boost::python::object element)
Set a python object in the line vector and update the TBeamline.
std::string getName() const
Set the name of the underlying object.
boost::python::class_< PyLine > make_class(const char *className)
Make a python::class_ object for a PyLine.
boost::python::object getElement(int i)
Get a python object from the vector of stored objects.