RTT::detail::ValueChangeParser Class Reference

This class is responsible for parsing constant definitions, variable definitions, variable change instructions, and alias definitions. More...

#include <rtt/scripting/ValueChangeParser.hpp>

List of all members.

Public Member Functions

 ValueChangeParser (TaskContext *tc, CommonParser &cp, OperationInterface *storage=0)
 Create a ValueChangeParser which operates and stores values in a task.
void clear ()
 Clear assignCommands(), definedValues() and definedNames().
void store (OperationInterface *other)
 Store allDefinedNames() in an additional TaskContext.
CommandInterfaceassignCommand ()
 This CommandInterface holds the command assigning a value to a variable that should be included in the program.
std::vector< CommandInterface * > assignCommands ()
AttributeBaselastDefinedValue ()
std::vector< AttributeBase * > definedValues ()
std::string lastDefinedName ()
std::vector< std::string > definedNames ()
std::vector< std::string > allDefinedNames ()
rule_t & constantDefinitionParser ()
 the parser that parses definitions of constants.
rule_t & variableDefinitionParser ()
 the parser that parses variable definitions, don't forget to check assignCommand after a variable definition is parsed.
rule_t & variableAssignmentParser ()
 the parser that parses variable assignments with 'set', don't forget to check assignCommand after a variable assignment is parsed.
rule_t & variableChangeParser ()
 the parser that parses variable assignments without 'set' prefix , don't forget to check assignCommand after a variable assignment is parsed.
rule_t & aliasDefinitionParser ()
 The parser that parses alias definitions.
rule_t & paramDefinitionParser ()
 The parser that parses state context parameter definitions.
rule_t & bareDefinitionParser ()
 The parser that parses a bare variable definition.
void reset ()
 Completely clear all data and erase all parsed definitions from the taskcontext given in the constructor.

Detailed Description

This class is responsible for parsing constant definitions, variable definitions, variable change instructions, and alias definitions.

. It stores these in the ValueParser in the ParseContext, and parses values using ExpressionParser..

Todo:
The ValueChangeParser.cxx implementation needs refactoring.

Definition at line 60 of file ValueChangeParser.hpp.


Constructor & Destructor Documentation

RTT::detail::ValueChangeParser::ValueChangeParser ( TaskContext tc,
CommonParser cp,
OperationInterface storage = 0 
)

Create a ValueChangeParser which operates and stores values in a task.

Use definedvalues() to get the values added to tc, use store() to store the added values in another task context as well. After reset(), tc will be cleared of all the stored values. tc is thus used as a temporary storage container. If you want the new added values in a different storage, use the second argument. Defaults to tc.


Member Function Documentation

rule_t& RTT::detail::ValueChangeParser::aliasDefinitionParser (  ) 

The parser that parses alias definitions.

This does not work via an assignment, and it is not necessary to check assignCommand() after this..

CommandInterface* RTT::detail::ValueChangeParser::assignCommand (  )  [inline]

This CommandInterface holds the command assigning a value to a variable that should be included in the program.

After a constant definition, variable definition or variable assignment is parsed, you should check it, and include it in your program if it is non-zero.

Definition at line 152 of file ValueChangeParser.hpp.

rule_t& RTT::detail::ValueChangeParser::bareDefinitionParser (  ) 

The parser that parses a bare variable definition.

These do not get initialised where they are defined, so it is not necessary to check assignCommand() after this...

void RTT::detail::ValueChangeParser::clear (  ) 

Clear assignCommands(), definedValues() and definedNames().

Does not delete any variables or commands.

rule_t& RTT::detail::ValueChangeParser::constantDefinitionParser (  ) 

the parser that parses definitions of constants.

Do not forget to check assignCommand after a constant definition is parsed..

rule_t& RTT::detail::ValueChangeParser::paramDefinitionParser (  ) 

The parser that parses state context parameter definitions.

These do not get initialised where they are defined, so it is not necessary to check assignCommand() after this...

rule_t& RTT::detail::ValueChangeParser::variableAssignmentParser (  ) 

the parser that parses variable assignments with 'set', don't forget to check assignCommand after a variable assignment is parsed.

rule_t& RTT::detail::ValueChangeParser::variableChangeParser (  ) 

the parser that parses variable assignments without 'set' prefix , don't forget to check assignCommand after a variable assignment is parsed.

rule_t& RTT::detail::ValueChangeParser::variableDefinitionParser (  ) 

the parser that parses variable definitions, don't forget to check assignCommand after a variable definition is parsed.


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