The python export class for Trajectory. More...
#include <TrajectoryPy.h>
Public Types | |
typedef Trajectory * | PointerType |
Public Member Functions | |
PyObject * | _getattr (char *attr) |
GetAttribute implementation This method implements the retriavel of object attributes. | |
virtual PyObject * | _repr (void) |
_repr method Overide this method to return a string object with some invormation about the object. | |
int | _setattr (char *attr, PyObject *value) |
SetAttribute implementation This method implements the seting of object attributes. | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
virtual PyParentObject * | GetParents (void) |
Trajectory * | getTrajectoryPtr (void) const |
getter for the object handled by this class | |
virtual PyTypeObject * | GetType (void) |
virtual int | PyInit (PyObject *args, PyObject *k) |
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor). | |
std::string | representation (void) const |
int | setCustomAttributes (const char *attr, PyObject *obj) |
setter for special attributes (e.g. dynamic ones) | |
TrajectoryPy (Trajectory *pcObject, PyTypeObject *T=&Type) | |
~TrajectoryPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Public Attributes | |
additional declarations and methods for the wrapper class | |
bool | touched |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of TrajectoryPy. | |
static PyMethodDef | Methods [] |
Methods structure of TrajectoryPy. | |
static PyParentObject | Parents [] = { PARENTSRobotTrajectoryPy } |
static PyTypeObject | Type |
Type structure of TrajectoryPy. | |
callbacks and implementers for the python object methods | |
| |
PyObject * | deleteLast (PyObject *args) |
implementer for the deleteLast() method | |
PyObject * | insertWaypoints (PyObject *args) |
implementer for the insertWaypoints() method | |
PyObject * | position (PyObject *args) |
implementer for the position() method | |
PyObject * | velocity (PyObject *args) |
implementer for the velocity() method | |
static PyObject * | staticCallback_deleteLast (PyObject *self, PyObject *args) |
callback for the deleteLast() method | |
static PyObject * | staticCallback_insertWaypoints (PyObject *self, PyObject *args) |
callback for the insertWaypoints() method | |
static PyObject * | staticCallback_position (PyObject *self, PyObject *args) |
callback for the position() method | |
static PyObject * | staticCallback_velocity (PyObject *self, PyObject *args) |
callback for the velocity() method | |
callbacks and implementers for the python object attributes | |
| |
Py::Float | getDuration (void) const |
getter for the Duration attribute | |
Py::Float | getLength (void) const |
getter for the Length attribute | |
Py::List | getWaypoints (void) const |
getter for the Waypoints attribute | |
void | setWaypoints (Py::List arg) |
setter for the Waypoints attribute | |
static PyObject * | staticCallback_getDuration (PyObject *self, void *closure) |
getter callback for the Duration attribute | |
static PyObject * | staticCallback_getLength (PyObject *self, void *closure) |
getter callback for the Length attribute | |
static PyObject * | staticCallback_getWaypoints (PyObject *self, void *closure) |
getter callback for the Waypoints attribute | |
static int | staticCallback_setDuration (PyObject *self, PyObject *value, void *closure) |
setter callback for the Duration attribute | |
static int | staticCallback_setLength (PyObject *self, PyObject *value, void *closure) |
setter callback for the Length attribute | |
static int | staticCallback_setWaypoints (PyObject *self, PyObject *value, void *closure) |
setter callback for the Waypoints attribute |
The python export class for Trajectory.
Definition at line 20 of file TrajectoryPy.h.
Reimplemented from Base::PersistencePy.
Definition at line 36 of file TrajectoryPy.h.
TrajectoryPy::TrajectoryPy | ( | Trajectory * | pcObject, | |
PyTypeObject * | T = &Type | |||
) |
Definition at line 545 of file TrajectoryPy.cpp.
Referenced by deleteLast(), insertWaypoints(), and PyMake().
TrajectoryPy::~TrajectoryPy | ( | ) |
Definition at line 554 of file TrajectoryPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
PyObject * TrajectoryPy::_getattr | ( | char * | attr | ) | [virtual] |
GetAttribute implementation This method implements the retriavel of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class. Note: if you reimplement _gettattr() in a inheriting class you need to call the method of the base class! Otherwise even the methods of the object will disapiear!
Reimplemented from Base::PersistencePy.
Definition at line 572 of file TrajectoryPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * TrajectoryPy::_repr | ( | void | ) | [virtual] |
_repr method Overide this method to return a string object with some invormation about the object.
PyObject *MeshFeaturePy::_repr(void) { std::stringstream a; a << "MeshFeature: [ "; a << "some realy important info about the object!"; a << "]" << std::endl; return Py_BuildValue("s", a.str().c_str()); }
Reimplemented from Base::PersistencePy.
Definition at line 564 of file TrajectoryPy.cpp.
References representation().
int TrajectoryPy::_setattr | ( | char * | attr, | |
PyObject * | value | |||
) | [virtual] |
SetAttribute implementation This method implements the seting of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class.
Reimplemented from Base::PersistencePy.
Definition at line 640 of file TrajectoryPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
implementer for the deleteLast() method
Definition at line 116 of file TrajectoryPyImp.cpp.
References Robot::Trajectory::deleteLast(), getTrajectoryPtr(), and TrajectoryPy().
PyObject * TrajectoryPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from Base::PersistencePy.
Definition at line 153 of file TrajectoryPyImp.cpp.
Referenced by _getattr().
Py::Float TrajectoryPy::getDuration | ( | void | ) | const |
getter for the Duration attribute
Definition at line 127 of file TrajectoryPyImp.cpp.
References getTrajectoryPtr().
Referenced by staticCallback_getDuration().
Py::Float TrajectoryPy::getLength | ( | void | ) | const |
getter for the Length attribute
Definition at line 141 of file TrajectoryPyImp.cpp.
References getTrajectoryPtr().
Referenced by staticCallback_getLength().
virtual PyParentObject* Robot::TrajectoryPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PersistencePy.
Definition at line 28 of file TrajectoryPy.h.
Trajectory * TrajectoryPy::getTrajectoryPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 699 of file TrajectoryPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by deleteLast(), getDuration(), getLength(), getWaypoints(), insertWaypoints(), position(), PyInit(), representation(), Robot::PropertyTrajectory::setPyObject(), and velocity().
virtual PyTypeObject* Robot::TrajectoryPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PersistencePy.
Definition at line 27 of file TrajectoryPy.h.
Py::List TrajectoryPy::getWaypoints | ( | void | ) | const |
getter for the Waypoints attribute
Definition at line 132 of file TrajectoryPyImp.cpp.
References Py::List::append(), Robot::Trajectory::getSize(), and getTrajectoryPtr().
Referenced by staticCallback_getWaypoints().
implementer for the insertWaypoints() method
Definition at line 57 of file TrajectoryPyImp.cpp.
References Robot::Trajectory::addWaypoint(), Py::SeqBase< T >::begin(), Py::SeqBase< T >::end(), Robot::Trajectory::generateTrajectory(), getTrajectoryPtr(), Py_Error, TrajectoryPy(), Robot::WaypointPy::Type, and Base::PlacementPy::Type.
implementer for the position() method
Definition at line 97 of file TrajectoryPyImp.cpp.
References getTrajectoryPtr(), and RobotExample::pos.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PersistencePy.
Definition at line 37 of file TrajectoryPyImp.cpp.
References Robot::Trajectory::addWaypoint(), Py::SeqBase< T >::begin(), Py::SeqBase< T >::end(), Robot::Trajectory::generateTrajectory(), getTrajectoryPtr(), and Robot::WaypointPy::Type.
Reimplemented from Base::PersistencePy.
Definition at line 30 of file TrajectoryPyImp.cpp.
References TrajectoryPy().
std::string TrajectoryPy::representation | ( | void | ) | const |
Reimplemented from Base::PersistencePy.
Definition at line 17 of file TrajectoryPyImp.cpp.
References Robot::Trajectory::getDuration(), Robot::Trajectory::getLength(), Robot::Trajectory::getSize(), and getTrajectoryPtr().
Referenced by _repr().
int TrajectoryPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from Base::PersistencePy.
Definition at line 158 of file TrajectoryPyImp.cpp.
Referenced by _setattr().
void TrajectoryPy::setWaypoints | ( | Py::List | arg | ) |
setter for the Waypoints attribute
Definition at line 148 of file TrajectoryPyImp.cpp.
callback for the deleteLast() method
Definition at line 354 of file TrajectoryPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
getter callback for the Duration attribute
Definition at line 430 of file TrajectoryPy.cpp.
References getDuration(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Length attribute
Definition at line 462 of file TrajectoryPy.cpp.
References getLength(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Waypoints attribute
Definition at line 494 of file TrajectoryPy.cpp.
References getWaypoints(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
PyObject * TrajectoryPy::staticCallback_insertWaypoints | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the insertWaypoints() method
Definition at line 126 of file TrajectoryPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the position() method
Definition at line 202 of file TrajectoryPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
int TrajectoryPy::staticCallback_setDuration | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Duration attribute
Definition at line 448 of file TrajectoryPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int TrajectoryPy::staticCallback_setLength | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Length attribute
Definition at line 480 of file TrajectoryPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int TrajectoryPy::staticCallback_setWaypoints | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Waypoints attribute
Definition at line 512 of file TrajectoryPy.cpp.
References Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
callback for the velocity() method
Definition at line 278 of file TrajectoryPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the velocity() method
Definition at line 106 of file TrajectoryPyImp.cpp.
References getTrajectoryPtr(), Py::new_reference_to(), and RobotExample::pos.
PyGetSetDef TrajectoryPy::GetterSetter [static] |
{ {"Duration", (getter) staticCallback_getDuration, (setter) staticCallback_setDuration, "duration of the trajectory", NULL }, {"Length", (getter) staticCallback_getLength, (setter) staticCallback_setLength, "length of the trajectory", NULL }, {"Waypoints", (getter) staticCallback_getWaypoints, (setter) staticCallback_setWaypoints, "waypoints of this trajectory", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of TrajectoryPy.
Reimplemented from Base::PersistencePy.
Definition at line 25 of file TrajectoryPy.h.
PyMethodDef TrajectoryPy::Methods [static] |
{ {"insertWaypoints", (PyCFunction) staticCallback_insertWaypoints, METH_VARARGS, "\n adds one or a list of waypoint to the end of the trajectory\n " }, {"position", (PyCFunction) staticCallback_position, METH_VARARGS, "\n returns a Frame to a given time in the trajectory\n " }, {"velocity", (PyCFunction) staticCallback_velocity, METH_VARARGS, "\n returns the velocity to a given time in the trajectory\n " }, {"deleteLast", (PyCFunction) staticCallback_deleteLast, METH_VARARGS, "\n deleteLast(n) - delete n waypoints at the end\n deleteLast() - delete the last waypoint\n " }, {NULL, NULL, 0, NULL} }
Methods structure of TrajectoryPy.
Reimplemented from Base::PersistencePy.
Definition at line 24 of file TrajectoryPy.h.
Referenced by _getattr().
PyParentObject TrajectoryPy::Parents = { PARENTSRobotTrajectoryPy } [static] |
Reimplemented from Base::PersistencePy.
Definition at line 26 of file TrajectoryPy.h.
Definition at line 101 of file TrajectoryPy.h.
PyTypeObject TrajectoryPy::Type [static] |
Type structure of TrajectoryPy.
Reimplemented from Base::PersistencePy.
Definition at line 23 of file TrajectoryPy.h.
Referenced by initRobot(), and Robot::PropertyTrajectory::setPyObject().