A task object groups a set of commands and methods (operations) which may be invoked. More...
#include <rtt/TaskObject.hpp>
Public Types | |
| typedef std::vector< std::string > | ObjectList |
| A list of all child objects of this interface. | |
Public Member Functions | |
| TaskObject (std::string name, std::string description="A Task Object.") | |
| Create a TaskObject with a given name and description. | |
| TaskObject (OperationInterface *parent, std::string name, std::string description="A Task Object.") | |
| Create a TaskObject with a given name and description and tie it to a parent. | |
| virtual OperationInterface * | getParent () |
| Returns the parent OperationInterface in which this TaskObject lives. | |
| virtual void | setParent (OperationInterface *newparent) |
| Set a new parent for this interface. | |
| virtual void | setEngine (ExecutionEngine *newengine) |
| Set the execution engine of the parent TaskContext. | |
| const std::string & | getName () const |
| Returns the name of this interface. | |
| const std::string & | getDescription () const |
| Returns the description of this interface. | |
| void | setDescription (const std::string &d) |
| void | setName (const std::string &n) |
| CommandRepository * | commands () |
| Returns the commands of this interface. | |
| const CommandRepository * | commands () const |
| MethodRepository * | methods () |
| Returns the methods of this interface. | |
| const MethodRepository * | methods () const |
| EventService * | events () |
| The task-local events ( 'signals' ) of this TaskContext. | |
| const EventService * | events () const |
| The task-local events ( 'signals' ) of this TaskContext. | |
| AttributeRepository * | attributes () |
| Returns the attributes of this interface. | |
| const AttributeRepository * | attributes () const |
| virtual void | clear () |
| virtual bool | addObject (OperationInterface *obj) |
| Add a new child interface to this interface. | |
| virtual OperationInterface * | getObject (const std::string &obj_name) |
| Get a pointer to a previously added TaskObject. | |
| virtual ObjectList | getObjectList () const |
| Get a list of all the object names of this interface. | |
| virtual bool | removeObject (const std::string &obj_name) |
| Remove and delete a previously added TaskObject. | |
Protected Types | |
|
typedef std::vector < OperationInterface * > | Objects |
Protected Attributes | |
| std::string | mname |
| std::string | mdescription |
| OperationInterface * | mparent |
| CommandRepository | mcommands |
| MethodRepository | mmethods |
| AttributeRepository | mattributes |
| Objects | mobjects |
| the Child TaskObjects. | |
A task object groups a set of commands and methods (operations) which may be invoked.
Definition at line 51 of file TaskObject.hpp.
| RTT::TaskObject::TaskObject | ( | OperationInterface * | parent, | |
| std::string | name, | |||
| std::string | description = "A Task Object." | |||
| ) |
Create a TaskObject with a given name and description and tie it to a parent.
| parent | The OperationInterface to tie the new TaskObject to. In case a TaskObject with the same name is already present in parent, the TaskObject will not be tied and new->getParent() == 0. |
| virtual bool RTT::OperationInterface::addObject | ( | OperationInterface * | obj | ) | [virtual, inherited] |
Add a new child interface to this interface.
| obj | This object becomes owned by this interface. |
Reimplemented in RTT::TaskContext.
| virtual OperationInterface* RTT::OperationInterface::getObject | ( | const std::string & | obj_name | ) | [virtual, inherited] |
Get a pointer to a previously added TaskObject.
| obj_name | The name of the TaskObject |
| virtual ObjectList RTT::OperationInterface::getObjectList | ( | ) | const [virtual, inherited] |
Get a list of all the object names of this interface.
| virtual OperationInterface* RTT::TaskObject::getParent | ( | ) | [inline, virtual] |
Returns the parent OperationInterface in which this TaskObject lives.
A TaskObject can have only one parent.
Implements RTT::OperationInterface.
Definition at line 76 of file TaskObject.hpp.
| virtual bool RTT::OperationInterface::removeObject | ( | const std::string & | obj_name | ) | [virtual, inherited] |
Remove and delete a previously added TaskObject.
Deletion will only occur if obj_name's parent is this. You can avoid deletion by first calling
this->getObject( obj_name )->setParent(0);
| obj_name | The name of the TaskObject to remove |
| virtual void RTT::TaskObject::setEngine | ( | ExecutionEngine * | newengine | ) | [virtual] |
Set the execution engine of the parent TaskContext.
Do not call this method directly. This function is automatically called when a TaskObject is added to a TaskContext.
Implements RTT::OperationInterface.
| virtual void RTT::TaskObject::setParent | ( | OperationInterface * | newparent | ) | [inline, virtual] |
Set a new parent for this interface.
Do not call this method directly. This function is automatically called when a TaskObject is added to another TaskObject.
Implements RTT::OperationInterface.
Definition at line 78 of file TaskObject.hpp.
1.6.3