#include <RobotObject.h>
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 PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. | |
Robot6Axis & | getRobot (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::PropertyData & | getPropertyData (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::PropertyData * | getPropertyDataPtr (void) |
Protected Attributes | |
bool | block |
Robot6Axis | robot |
Definition at line 37 of file RobotObject.h.
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.
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] |
Reimplemented from App::PropertyContainer.
Definition at line 39 of file RobotObject.cpp.
Referenced by CmdRobotInsertWaypoint::activated(), CmdRobotAddToolShape::activated(), CmdRobotExportKukaFull::activated(), and CmdRobotExportKukaCompact::activated().
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] |
get called by the container when a property has changed
Reimplemented from App::DocumentObject.
Definition at line 85 of file RobotObject.cpp.
References Axis1, Axis2, Axis3, Axis4, Axis5, Axis6, block, Robot::Robot6Axis::getAxis(), Robot::Robot6Axis::getTcp(), App::PropertyPlacement::getValue(), App::PropertyFloat::getValue(), App::PropertyFileIncluded::getValue(), Robot::Robot6Axis::readKinematic(), robot, RobotKinematicFile, Robot::Robot6Axis::setAxis(), Robot::Robot6Axis::setTo(), App::PropertyFloat::setValue(), App::PropertyPlacement::setValue(), and Tcp.
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.
Reimplemented from App::DocumentObject.
Definition at line 143 of file RobotObject.cpp.
References robot, and Robot::Robot6Axis::Save().
Definition at line 64 of file RobotObject.h.
Referenced by onChanged(), Restore(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 64 of file RobotObject.h.
Referenced by onChanged(), Restore(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 64 of file RobotObject.h.
Referenced by onChanged(), Restore(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 64 of file RobotObject.h.
Referenced by onChanged(), Restore(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 64 of file RobotObject.h.
Referenced by onChanged(), Restore(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 64 of file RobotObject.h.
Referenced by onChanged(), Restore(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
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.
Robot6Axis Robot::RobotObject::robot [protected] |
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 70 of file RobotObject.h.
Referenced by RobotGui::ViewProviderRobotObject::DraggerMotionCallback(), onChanged(), Restore(), RobotGui::ViewProviderRobotObject::setDragger(), RobotGui::TaskRobot6Axis::setRobot(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 67 of file RobotObject.h.
Referenced by RobotGui::TaskRobot6Axis::setRobot(), RobotGui::TaskTrajectory::setTo(), RobotGui::TaskTrajectory::TaskTrajectory(), and RobotGui::TrajectorySimulate::TrajectorySimulate().
Definition at line 69 of file RobotObject.h.
Referenced by RobotGui::ViewProviderRobotObject::setAxisTo(), and RobotGui::ViewProviderRobotObject::updateData().
Definition at line 68 of file RobotObject.h.
Referenced by RobotGui::ViewProviderRobotObject::updateData().