RTT::detail::CommandParser Class Reference

This class parses commands. More...

#include <rtt/scripting/CommandParser.hpp>

List of all members.

Public Member Functions

 CommandParser (TaskContext *context, CommonParser &cp, bool as_action)
 Create a CommandParser operating in a taskcontext.
bool foundObject ()
bool foundMethod ()
rule_t & parser ()
ConditionInterfacewrapCondition (ConditionInterface *)
 Each condition, which relates to this command, might be subject to wrapping.
ConditionInterfacedispatchCondition ()
 Return a condition evaluating to true if the command is dispatched and accepted.
CommandInterfacegetCommand ()
 Get the parsed command.
ConditionInterfacegetImplTermCondition ()
 The implicit termination condition associated with the command, if any.
void reset ()
 resets the CommandParser, use this after you've succesfully used the created command and implicit termination condition.

Detailed Description

This class parses commands.

Actually, it only parses call commands, and the keyword 'nothing'. Value Set Commands are parsed by the ValueChangeParser. It also takes care of checking whether a command needs to be dispatched, and otherwise wraps the generated command in an AsynchCommandDecorator.

Definition at line 57 of file CommandParser.hpp.


Constructor & Destructor Documentation

RTT::detail::CommandParser::CommandParser ( TaskContext context,
CommonParser cp,
bool  as_action 
)

Create a CommandParser operating in a taskcontext.

Parameters:
as_action return an action, meaning wrap the created DispatchInterface in an DispatchAction such that execute() of the returned command does a DispatchInterface::dispatch().

Member Function Documentation

ConditionInterface* RTT::detail::CommandParser::dispatchCondition (  ) 

Return a condition evaluating to true if the command is dispatched and accepted.

Return zero if not applicable. This method is needed, because the CommandParser can only save state for one command. If multiple commands are involved, this condition must be kept by the parent of this parser and used if necessary.

CommandInterface* RTT::detail::CommandParser::getCommand (  )  [inline]

Get the parsed command.

Call the reset method if you use the generated command, otherwise it will be deleted in the CommandParser's destructor..

Definition at line 136 of file CommandParser.hpp.

ConditionInterface* RTT::detail::CommandParser::getImplTermCondition (  )  [inline]

The implicit termination condition associated with the command, if any.

Ownership semantics are the same as for the getCommand() function.

Definition at line 146 of file CommandParser.hpp.


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