Robot::TrajectoryPy Class Reference

The python export class for Trajectory. More...

#include <TrajectoryPy.h>

Inheritance diagram for Robot::TrajectoryPy:
Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

Public Types

typedef TrajectoryPointerType

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.
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
virtual PyParentObjectGetParents (void)
TrajectorygetTrajectoryPtr (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 PyObjectPyMake (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



PyObjectdeleteLast (PyObject *args)
 implementer for the deleteLast() method
PyObjectinsertWaypoints (PyObject *args)
 implementer for the insertWaypoints() method
PyObjectposition (PyObject *args)
 implementer for the position() method
PyObjectvelocity (PyObject *args)
 implementer for the velocity() method
static PyObjectstaticCallback_deleteLast (PyObject *self, PyObject *args)
 callback for the deleteLast() method
static PyObjectstaticCallback_insertWaypoints (PyObject *self, PyObject *args)
 callback for the insertWaypoints() method
static PyObjectstaticCallback_position (PyObject *self, PyObject *args)
 callback for the position() method
static PyObjectstaticCallback_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 PyObjectstaticCallback_getDuration (PyObject *self, void *closure)
 getter callback for the Duration attribute
static PyObjectstaticCallback_getLength (PyObject *self, void *closure)
 getter callback for the Length attribute
static PyObjectstaticCallback_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

Detailed Description

The python export class for Trajectory.

Definition at line 20 of file TrajectoryPy.h.


Member Typedef Documentation

Reimplemented from Base::PersistencePy.

Definition at line 36 of file TrajectoryPy.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

PyObject * TrajectoryPy::deleteLast ( PyObject args  ) 

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
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().

PyObject * TrajectoryPy::insertWaypoints ( PyObject args  ) 
PyObject * TrajectoryPy::position ( PyObject args  ) 

implementer for the position() method

Definition at line 97 of file TrajectoryPyImp.cpp.

References getTrajectoryPtr(), and RobotExample::pos.

int TrajectoryPy::PyInit ( PyObject ,
PyObject  
) [virtual]

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.

PyObject * TrajectoryPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
) [static]

Reimplemented from Base::PersistencePy.

Definition at line 30 of file TrajectoryPyImp.cpp.

References TrajectoryPy().

std::string TrajectoryPy::representation ( void   )  const
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.

PyObject * TrajectoryPy::staticCallback_deleteLast ( PyObject self,
PyObject args 
) [static]
PyObject * TrajectoryPy::staticCallback_getDuration ( PyObject self,
void *  closure 
) [static]

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().

PyObject * TrajectoryPy::staticCallback_getLength ( PyObject self,
void *  closure 
) [static]

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().

PyObject * TrajectoryPy::staticCallback_getWaypoints ( PyObject self,
void *  closure 
) [static]

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]
PyObject * TrajectoryPy::staticCallback_position ( PyObject self,
PyObject args 
) [static]
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().

PyObject * TrajectoryPy::staticCallback_velocity ( PyObject self,
PyObject args 
) [static]
PyObject * TrajectoryPy::velocity ( PyObject args  ) 

implementer for the velocity() method

Definition at line 106 of file TrajectoryPyImp.cpp.

References getTrajectoryPtr(), Py::new_reference_to(), and RobotExample::pos.


Member Data Documentation

PyGetSetDef TrajectoryPy::GetterSetter [static]
Initial value:
 {
    {"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]
Initial value:
 {
    {"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().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:45 2011 for FreeCAD by  doxygen 1.6.1