RTT::VertexNode Class Reference

This class represents elements in a program tree. More...

#include <rtt/VertexNode.hpp>

List of all members.

Public Types

enum  NodeTypes {
  normal_node, prog_start_node, prog_exit_node, func_start_node,
  func_exit_node
}
 

The vertex_exec_t property values.


typedef boost::property
< vertex_command_t, VertexNode,
boost::property< vertex_exec_t,
int, boost::property
< boost::vertex_index_t, int > > > 
VertProperty

Public Member Functions

 VertexNode ()
 Construct an empty program node with no command, no conditional branches and line number 0.
 VertexNode (CommandInterface *cmd)
 Construct a program node with given command, no conditional branches and line number 0.
 VertexNode (const VertexNode &orig)
 The copy constructor creates a shallow copy.
VertexNode copy (std::map< const DataSourceBase *, DataSourceBase * > &rdss) const
VertexNodeoperator= (const VertexNode &orig)
 ~VertexNode ()
 Returns a special program node that contains no clauses and a special stopExecution command.
void startExecution ()
 This means that the execution engine has just started to execute this node, after some other node has sent it to this one.
bool execute ()
 Executes the command currently associated with this node.
bool isValid () const
 Returns true if the node is in a valid state to be left.
CommandInterfacesetCommand (CommandInterface *c)
 Set the command associated with this program to the given command.
void setLineNumber (int ln)
 Set line number of this program node to given line number.
CommandInterfacegetCommand () const
 Returns the command currently associated with this node.
int getLineNumber () const
 Returns the program line number currently associated with this program node (default = zero).

Detailed Description

This class represents elements in a program tree.

Definition at line 84 of file VertexNode.hpp.


Constructor & Destructor Documentation

RTT::VertexNode::~VertexNode (  ) 

Returns a special program node that contains no clauses and a special stopExecution command.

(all the leaves of a program tree are this type of program node.

Parameters:
proc The engine executing this node (which will be stopped)
Returns:
A program node with no conditional branches and that contains a stop execution command.

Member Function Documentation

CommandInterface* RTT::VertexNode::getCommand (  )  const

Returns the command currently associated with this node.

Returns:
The command currently associated with this node
CommandInterface* RTT::VertexNode::setCommand ( CommandInterface c  ) 

Set the command associated with this program to the given command.

Parameters:
c The new command.
Returns:
The previous command (can be null).
void RTT::VertexNode::setLineNumber ( int  ln  ) 

Set line number of this program node to given line number.

Parameters:
ln The new line number for this node
Postcondition:
The line number of this node equals the given integer.
void RTT::VertexNode::startExecution (  ) 

This means that the execution engine has just started to execute this node, after some other node has sent it to this one.

If the node is simply executed again, because it returned itself from its execute() method, then this method will not be called. The reason this is here is because the node has to reset its termination conditions at this point. See the documentation of ConditionInterface::reset() for more information about this..


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