Robot::PropertyTrajectory Class Reference

The part shape property class. More...

#include <PropertyTrajectory.h>

Inheritance diagram for Robot::PropertyTrajectory:
App::Property Base::Persistence Base::BaseClass

List of all members.

Public Member Functions

virtual Base::Type getTypeId (void) const
 PropertyTrajectory ()
 ~PropertyTrajectory ()
Save/restore



App::PropertyCopy (void) const
 Returns a new copy of the property (mainly for Undo/Redo and transactions).
unsigned int getMemSize (void) const
 This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? This method is defined in Base::Persistence.
void Paste (const App::Property &from)
void Restore (Base::XMLReader &reader)
 This method is used to restore properties from an XML document.
void Save (Base::Writer &writer) const
 This method is used to save properties to an XML document.
Getting basic geometric entities



Base::BoundBox3d getBoundingBox () const
 Returns the bounding box around the underlying mesh kernel.
Python interface



PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object.
void setPyObject (PyObject *value)
Getter/setter



const TrajectorygetValue (void) const
 get the part shape
void setValue (const Trajectory &)
 set the part shape

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Detailed Description

The part shape property class.

Author:
Werner Mayer

Definition at line 38 of file PropertyTrajectory.h.


Constructor & Destructor Documentation

PropertyTrajectory::PropertyTrajectory (  ) 

Definition at line 46 of file PropertyTrajectory.cpp.

Referenced by Copy().

PropertyTrajectory::~PropertyTrajectory (  ) 

Definition at line 50 of file PropertyTrajectory.cpp.


Member Function Documentation

App::Property * PropertyTrajectory::Copy ( void   )  const [virtual]

Returns a new copy of the property (mainly for Undo/Redo and transactions).

Implements App::Property.

Definition at line 113 of file PropertyTrajectory.cpp.

References PropertyTrajectory().

void * Robot::PropertyTrajectory::create ( void   )  [static]

Reimplemented from App::Property.

Definition at line 44 of file PropertyTrajectory.cpp.

Base::BoundBox3d PropertyTrajectory::getBoundingBox (  )  const

Returns the bounding box around the underlying mesh kernel.

Definition at line 68 of file PropertyTrajectory.cpp.

Base::Type Robot::PropertyTrajectory::getClassTypeId ( void   )  [static]

Reimplemented from App::Property.

Definition at line 44 of file PropertyTrajectory.cpp.

unsigned int PropertyTrajectory::getMemSize ( void   )  const [virtual]

This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? This method is defined in Base::Persistence.

See also:
Base::Persistence

Reimplemented from App::Property.

Definition at line 128 of file PropertyTrajectory.cpp.

References Robot::Trajectory::getMemSize().

PyObject * PropertyTrajectory::getPyObject ( void   )  [virtual]

This method returns the Python wrapper for a C++ object.

It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.

The default implementation returns 'None'.

Reimplemented from Base::BaseClass.

Definition at line 95 of file PropertyTrajectory.cpp.

References MovieTool::Trajectory.

Base::Type Robot::PropertyTrajectory::getTypeId ( void   )  const [virtual]

Reimplemented from App::Property.

Definition at line 44 of file PropertyTrajectory.cpp.

const Trajectory & PropertyTrajectory::getValue ( void   )  const

get the part shape

Definition at line 62 of file PropertyTrajectory.cpp.

Referenced by RobotGui::ViewProviderTrajectory::updateData().

void Robot::PropertyTrajectory::init ( void   )  [static]

Reimplemented from App::Property.

Definition at line 44 of file PropertyTrajectory.cpp.

Referenced by initRobot().

void PropertyTrajectory::Paste ( const App::Property from  ) 
void PropertyTrajectory::Restore ( Base::XMLReader  )  [virtual]

This method is used to restore properties from an XML document.

It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:

 void PropertyVector::Restore(Base::XMLReader &reader)
 {
   // read my Element
   reader.readElement("PropertyVector");
   // get the value of my Attribute
   _cVec.x = (float)reader.getAttributeAsFloat("valueX");
   _cVec.y = (float)reader.getAttributeAsFloat("valueY");
   _cVec.z = (float)reader.getAttributeAsFloat("valueZ");
 }

Implements Base::Persistence.

Definition at line 138 of file PropertyTrajectory.cpp.

References Robot::Trajectory::Restore(), and setValue().

void PropertyTrajectory::Save ( Base::Writer  )  const [virtual]

This method is used to save properties to an XML document.

A good example you'll find in PropertyStandard.cpp, e.g. the vector:

  void PropertyVector::Save (Writer &writer) const
  {
     writer << writer.ind() << "<PropertyVector valueX=\"" <<  _cVec.x <<
                                            "\" valueY=\"" <<  _cVec.y <<
                                            "\" valueZ=\"" <<  _cVec.z <<"\"/>" << endl;
  }

The writer.ind() expression writes the indention, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.

See also:
Base::Writer

Implements Base::Persistence.

Definition at line 133 of file PropertyTrajectory.cpp.

References Robot::Trajectory::Save().

void PropertyTrajectory::setPyObject ( PyObject value  )  [virtual]
void PropertyTrajectory::setValue ( const Trajectory sh  ) 

set the part shape

Definition at line 54 of file PropertyTrajectory.cpp.

References App::Property::aboutToSetValue(), and App::Property::hasSetValue().

Referenced by Restore(), and 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