RTT::ProgramTask Class Reference

This class represents a program as an TaskObject in the Orocos TaskContext system. More...

#include <rtt/scripting/ProgramTask.hpp>

Inheritance diagram for RTT::ProgramTask:
RTT::TaskObject RTT::OperationInterface

List of all members.

Public Types

typedef std::vector< std::string > ObjectList
 A list of all child objects of this interface.

Public Member Functions

 ProgramTask (FunctionGraphPtr prog, ExecutionEngine *ee=0)
 By constructing this object, a program is added to a taskcontext as a TaskContext, with its commands and methods.
ProgramInterfacePtr getProgram () const
 Returns the Program of this task.
virtual OperationInterfacegetParent ()
 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)
CommandRepositorycommands ()
 Returns the commands of this interface.
const CommandRepositorycommands () const
MethodRepositorymethods ()
 Returns the methods of this interface.
const MethodRepositorymethods () const
EventServiceevents ()
 The task-local events ( 'signals' ) of this TaskContext.
const EventServiceevents () const
 The task-local events ( 'signals' ) of this TaskContext.
AttributeRepositoryattributes ()
 Returns the attributes of this interface.
const AttributeRepositoryattributes () const
virtual void clear ()
virtual bool addObject (OperationInterface *obj)
 Add a new child interface to this interface.
virtual OperationInterfacegetObject (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
OperationInterfacemparent
CommandRepository mcommands
MethodRepository mmethods
AttributeRepository mattributes
Objects mobjects
 the Child TaskObjects.

Detailed Description

This class represents a program as an TaskObject in the Orocos TaskContext system.

Definition at line 55 of file ProgramTask.hpp.


Member Function Documentation

virtual bool RTT::OperationInterface::addObject ( OperationInterface obj  )  [virtual, inherited]

Add a new child interface to this interface.

Parameters:
obj This object becomes owned by this interface.
Returns:
true if it cuold be added, false if such object already exists.

Reimplemented in RTT::TaskContext.

virtual OperationInterface* RTT::OperationInterface::getObject ( const std::string &  obj_name  )  [virtual, inherited]

Get a pointer to a previously added TaskObject.

Parameters:
obj_name The name of the TaskObject
Returns:
the pointer
virtual ObjectList RTT::OperationInterface::getObjectList (  )  const [virtual, inherited]

Get a list of all the object names of this interface.

Returns:
a list of string names.
virtual OperationInterface* RTT::TaskObject::getParent (  )  [inline, virtual, inherited]

Returns the parent OperationInterface in which this TaskObject lives.

A TaskObject can have only one parent.

Returns:
null in case no parent is set, the parent otherwise.

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); 
Parameters:
obj_name The name of the TaskObject to remove
Returns:
true if found and removed, false otherwise.
virtual void RTT::TaskObject::setEngine ( ExecutionEngine newengine  )  [virtual, inherited]

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, inherited]

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.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:44 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3