#include <rtt/OperationInterface.hpp>

OperationInterface objects can be hierarchically nested.
Definition at line 61 of file OperationInterface.hpp.
Public Types | |
|
typedef std::vector < std::string > | ObjectList |
| A list of all child objects of this interface. | |
Public Member Functions | |
| OperationInterface () | |
| OperationInterface (ExecutionEngine *ee) | |
| 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 | ~OperationInterface () |
| virtual void | clear () |
|
virtual const std::string & | getName () const =0 |
| Returns the name of this interface. | |
|
virtual const std::string & | getDescription () const =0 |
| Returns the description of this interface. | |
| 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. | |
| virtual OperationInterface * | getParent ()=0 |
| Returns the parent OperationInterface in which this TaskObject lives. | |
| virtual void | setParent (OperationInterface *newparent)=0 |
| Set a new parent for this interface. | |
| virtual void | setEngine (ExecutionEngine *newengine)=0 |
| Set the execution engine of the parent TaskContext. | |
Protected Types | |
|
typedef std::vector < OperationInterface * > | Objects |
Protected Attributes | |
| CommandRepository | mcommands |
| MethodRepository | mmethods |
| AttributeRepository | mattributes |
| Objects | mobjects |
| the Child TaskObjects. | |
| bool addObject | ( | OperationInterface * | obj | ) | [virtual] |
Add a new child interface to this interface.
| obj | This object becomes owned by this interface. |
Reimplemented in TaskContext.
Definition at line 32 of file OperationInterface.cpp.
References RTT::Error, OperationInterface::getName(), OperationInterface::getObject(), OperationInterface::getParent(), OperationInterface::mobjects, and OperationInterface::setParent().
Referenced by TaskContext::addObject(), ControlTaskProxy::fetchObjects(), ParsedStateMachine::setName(), and TaskObject::TaskObject().
| OperationInterface * getObject | ( | const std::string & | obj_name | ) | [virtual] |
Get a pointer to a previously added TaskObject.
| obj_name | The name of the TaskObject |
Definition at line 48 of file OperationInterface.cpp.
References OperationInterface::mobjects.
Referenced by OperationInterface::addObject(), RTT::detail::DumpObject(), ControlTaskProxy::fetchObjects(), ParsedStateMachine::handleUnload(), MarshallingAccess::MarshallingAccess(), ParserExecutionAccess::ParserExecutionAccess(), ParserScriptingAccess::ParserScriptingAccess(), and OperationInterface::removeObject().
| std::vector< std::string > getObjectList | ( | ) | const [virtual] |
Get a list of all the object names of this interface.
Definition at line 61 of file OperationInterface.cpp.
References OperationInterface::getName(), and OperationInterface::mobjects.
Referenced by RTT::detail::DumpObject().
| bool removeObject | ( | const std::string & | obj_name | ) | [virtual] |
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 |
Definition at line 70 of file OperationInterface.cpp.
References OperationInterface::attributes(), AttributeRepository::clear(), EventService::clear(), CommandRepository::clear(), MethodRepository::clear(), OperationInterface::commands(), OperationInterface::events(), OperationInterface::getObject(), OperationInterface::getParent(), OperationInterface::methods(), and OperationInterface::mobjects.
Referenced by TaskContext::clear(), and FunctionGraph::handleUnload().
| virtual OperationInterface* getParent | ( | ) | [pure virtual] |
Returns the parent OperationInterface in which this TaskObject lives.
A TaskObject can have only one parent.
Implemented in TaskContext, and TaskObject.
Referenced by OperationInterface::addObject(), and OperationInterface::removeObject().
| virtual void setParent | ( | OperationInterface * | newparent | ) | [pure 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.
Implemented in TaskContext, and TaskObject.
Referenced by OperationInterface::addObject().
| virtual void setEngine | ( | ExecutionEngine * | newengine | ) | [pure 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.
Implemented in TaskContext, and TaskObject.
Referenced by TaskContext::addObject().
1.5.3