Robot::RobotObject Class Reference

#include <RobotObject.h>

Inheritance diagram for Robot::RobotObject:
App::GeoFeature App::DocumentObject App::PropertyContainer Base::Persistence Base::BaseClass

List of all members.

Public Member Functions

virtual
App::DocumentObjectExecReturn
execute (void)
 get called by the document to recompute this feature Normaly this method get called in the processing of Document::recompute().
virtual PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object.
Robot6AxisgetRobot (void)
virtual Base::Type getTypeId (void) const
virtual const char * getViewProviderName (void) const
 returns the type name of the ViewProvider
virtual short mustExecute (void) const
 mustExecute We call this method to check if the object was modified to be invoked.
virtual void Restore (Base::XMLReader &)
 This method is used to restore properties from an XML document.
 RobotObject (void)
 Constructor.
virtual void Save (Base::Writer &) const
 This method is used to save properties to an XML document.
virtual ~RobotObject ()

Static Public Member Functions

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

Public Attributes

App::PropertyFloat Axis1
App::PropertyFloat Axis2
App::PropertyFloat Axis3
App::PropertyFloat Axis4
App::PropertyFloat Axis5
App::PropertyFloat Axis6
App::PropertyPlacement Base
App::PropertyString Error
App::PropertyFloatList Home
App::PropertyFileIncluded RobotKinematicFile
App::PropertyFileIncluded RobotVrmlFile
App::PropertyPlacement Tcp
App::PropertyPlacement Tool
App::PropertyPlacement ToolBase
App::PropertyLink ToolShape

Protected Member Functions

virtual const App::PropertyDatagetPropertyData (void) const
virtual void onChanged (const App::Property *prop)
 get called by the container when a property has changed

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

Protected Attributes

bool block
Robot6Axis robot

Detailed Description

Definition at line 37 of file RobotObject.h.


Constructor & Destructor Documentation

RobotObject::RobotObject ( void   ) 

Constructor.

Definition at line 42 of file RobotObject.cpp.

References ADD_PROPERTY_TYPE, Error(), and App::Prop_None.

RobotObject::~RobotObject (  )  [virtual]

Definition at line 66 of file RobotObject.cpp.


Member Function Documentation

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

Reimplemented from App::PropertyContainer.

Definition at line 39 of file RobotObject.cpp.

virtual App::DocumentObjectExecReturn* Robot::RobotObject::execute ( void   )  [inline, virtual]

get called by the document to recompute this feature Normaly this method get called in the processing of Document::recompute().

In execute() the outpupt properties get recomputed with the data from linked objects and objects own properties.

Reimplemented from App::DocumentObject.

Definition at line 50 of file RobotObject.h.

References App::DocumentObject::StdReturn.

Base::Type Robot::RobotObject::getClassTypeId ( void   )  [static]
const App::PropertyData & Robot::RobotObject::getPropertyData ( void   )  const [protected, virtual]

Reimplemented from App::PropertyContainer.

Definition at line 39 of file RobotObject.cpp.

const App::PropertyData * Robot::RobotObject::getPropertyDataPtr ( void   )  [static, protected]

Reimplemented from App::PropertyContainer.

Definition at line 39 of file RobotObject.cpp.

PyObject * RobotObject::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 App::DocumentObject.

Definition at line 75 of file RobotObject.cpp.

References Py::_None(), Py::Object::is(), Py::new_reference_to(), and App::DocumentObject::PythonObject.

Robot6Axis& Robot::RobotObject::getRobot ( void   )  [inline]

Definition at line 59 of file RobotObject.h.

Referenced by RobotGui::TaskRobot6Axis::setRobot().

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

Reimplemented from App::PropertyContainer.

Definition at line 39 of file RobotObject.cpp.

virtual const char* Robot::RobotObject::getViewProviderName ( void   )  const [inline, virtual]

returns the type name of the ViewProvider

Reimplemented from App::DocumentObject.

Definition at line 47 of file RobotObject.h.

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

Reimplemented from App::PropertyContainer.

Definition at line 39 of file RobotObject.cpp.

Referenced by initRobot().

short RobotObject::mustExecute ( void   )  const [virtual]

mustExecute We call this method to check if the object was modified to be invoked.

If the object label or an argument is modified. If we must recompute the object - to call the method execute(). 0: no recompution is needed 1: recompution needed -1: the document examine all links of this object and if one is touched -> recompute

Reimplemented from App::DocumentObject.

Definition at line 70 of file RobotObject.cpp.

void RobotObject::onChanged ( const App::Property prop  )  [protected, virtual]
void RobotObject::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");
 }

Reimplemented from App::PropertyContainer.

Definition at line 149 of file RobotObject.cpp.

References Axis1, Axis2, Axis3, Axis4, Axis5, Axis6, block, Robot::Robot6Axis::getTcp(), App::PropertyPlacement::getValue(), App::PropertyFloat::getValue(), Robot::Robot6Axis::Restore(), robot, Robot::Robot6Axis::setAxis(), Robot::Robot6Axis::setTo(), App::PropertyPlacement::setValue(), and Tcp.

void RobotObject::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

Reimplemented from App::DocumentObject.

Definition at line 143 of file RobotObject.cpp.

References robot, and Robot::Robot6Axis::Save().


Member Data Documentation

Definition at line 66 of file RobotObject.h.

bool Robot::RobotObject::block [protected]

Definition at line 82 of file RobotObject.h.

Referenced by onChanged(), and Restore().

Definition at line 73 of file RobotObject.h.

Definition at line 74 of file RobotObject.h.

Definition at line 80 of file RobotObject.h.

Referenced by onChanged(), Restore(), and Save().

Definition at line 62 of file RobotObject.h.

Referenced by onChanged().

Definition at line 61 of file RobotObject.h.

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

Definition at line 68 of file RobotObject.h.

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


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