RTT::scripting::ValueChangeParser Class Reference

#include <ValueChangeParser.hpp>

List of all members.

Public Member Functions

rule_taliasDefinitionParser ()
rule_taliasDefinitionParser ()
std::vector< std::string > allDefinedNames ()
std::vector< std::string > allDefinedNames ()
base::ActionInterfaceassignCommand ()
base::ActionInterfaceassignCommand ()
std::vector
< base::ActionInterface * > 
assignCommands ()
std::vector
< base::ActionInterface * > 
assignCommands ()
rule_tbareDefinitionParser ()
rule_tbareDefinitionParser ()
void clear ()
void clear ()
rule_tconstantDefinitionParser ()
rule_tconstantDefinitionParser ()
std::vector< std::string > definedNames ()
std::vector< std::string > definedNames ()
std::vector
< base::AttributeBase * > 
definedValues ()
std::vector
< base::AttributeBase * > 
definedValues ()
std::string lastDefinedName ()
std::string lastDefinedName ()
base::AttributeBaselastDefinedValue ()
base::AttributeBaselastDefinedValue ()
void load (Service::shared_ptr source)
void load (Service::shared_ptr source)
rule_tparamDefinitionParser ()
rule_tparamDefinitionParser ()
rule_tparser ()
rule_tparser ()
void reset ()
void reset ()
void store (Service::shared_ptr other)
void store (Service::shared_ptr other)
 ValueChangeParser (TaskContext *tc, CommonParser &cp, Service::shared_ptr storage, ExecutionEngine *caller)
 ValueChangeParser (TaskContext *tc, CommonParser &cp, Service::shared_ptr storage, ExecutionEngine *caller)
rule_tvariableDefinitionParser ()
rule_tvariableDefinitionParser ()

Private Member Functions

void cleanup ()
void cleanup ()
void seenaliasdefinition ()
void seenaliasdefinition ()
void seenbaredefinition ()
void seenbaredefinition ()
void seenconstantdefinition ()
void seenconstantdefinition ()
void seenparamdefinition ()
void seenparamdefinition ()
void seenproperty ()
void seenproperty ()
void seensizehint ()
void seensizehint ()
void seentype (iter_t begin, iter_t end)
void seentype (iter_t begin, iter_t end)
void seenvariabledefinition ()
void seenvariabledefinition ()
void storedefinitionname (iter_t begin, iter_t end)
void storedefinitionname (iter_t begin, iter_t end)

Private Attributes

rule_t aliasdefinition
std::vector< std::string > alldefinednames
std::vector
< base::ActionInterface * > 
assigncommands
rule_t baredecl
rule_t baredefinition
CommonParsercommonparser
rule_t constantdefinition
rule_t constdecl
TaskContextcontext
std::vector< std::string > definednames
std::vector
< base::AttributeBase * > 
definedvalues
ExpressionParser expressionparser
Service::shared_ptr mstore
rule_t paramdefinition
int sizehint
types::TypeInfotype
boost::shared_ptr
< types::TypeInfoRepository
typerepos
rule_t valuechange_parsers
std::string valuename
rule_t vardecl
rule_t variabledefinition

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.

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 install/include/rtt/scripting/ValueChangeParser.hpp.


Constructor & Destructor Documentation

RTT::ValueChangeParser::ValueChangeParser ( TaskContext tc,
CommonParser cp,
Service::shared_ptr  storage,
ExecutionEngine caller 
)

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 container, use the storage argument. Defaults to tc->provides() if set to null.

Definition at line 73 of file ValueChangeParser.cpp.

RTT::scripting::ValueChangeParser::ValueChangeParser ( TaskContext tc,
CommonParser cp,
Service::shared_ptr  storage,
ExecutionEngine caller 
)

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 container, use the storage argument. Defaults to tc->provides() if set to null.


Member Function Documentation

rule_t& RTT::scripting::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..

rule_t & RTT::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..

Definition at line 367 of file ValueChangeParser.cpp.

std::vector<std::string> RTT::scripting::ValueChangeParser::allDefinedNames (  )  [inline]

Definition at line 193 of file rtt/scripting/ValueChangeParser.hpp.

std::vector<std::string> RTT::scripting::ValueChangeParser::allDefinedNames (  )  [inline]
base::ActionInterface* RTT::scripting::ValueChangeParser::assignCommand (  )  [inline]

This base::ActionInterface 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 157 of file rtt/scripting/ValueChangeParser.hpp.

base::ActionInterface* RTT::scripting::ValueChangeParser::assignCommand (  )  [inline]

This base::ActionInterface 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 157 of file install/include/rtt/scripting/ValueChangeParser.hpp.

std::vector<base::ActionInterface*> RTT::scripting::ValueChangeParser::assignCommands (  )  [inline]

Definition at line 164 of file rtt/scripting/ValueChangeParser.hpp.

std::vector<base::ActionInterface*> RTT::scripting::ValueChangeParser::assignCommands (  )  [inline]
rule_t& RTT::scripting::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...

rule_t & RTT::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...

Definition at line 382 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::cleanup (  )  [private]

Delete temporary variables before throwing an exception.

void RTT::ValueChangeParser::cleanup (  )  [private]

Delete temporary variables before throwing an exception.

Definition at line 328 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::clear (  ) 

Clear assignCommands(), definedValues() and definedNames(). Does not delete any variables or commands.

void RTT::ValueChangeParser::clear (  ) 

Clear assignCommands(), definedValues() and definedNames(). Does not delete any variables or commands.

Definition at line 333 of file ValueChangeParser.cpp.

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

the parser that parses definitions of constants. Do not forget to check assignCommand after a constant definition is parsed..

rule_t & RTT::ValueChangeParser::constantDefinitionParser (  ) 

the parser that parses definitions of constants. Do not forget to check assignCommand after a constant definition is parsed..

Definition at line 362 of file ValueChangeParser.cpp.

std::vector<std::string> RTT::scripting::ValueChangeParser::definedNames (  )  [inline]

Definition at line 188 of file rtt/scripting/ValueChangeParser.hpp.

std::vector<std::string> RTT::scripting::ValueChangeParser::definedNames (  )  [inline]
std::vector<base::AttributeBase*> RTT::scripting::ValueChangeParser::definedValues (  )  [inline]

Definition at line 176 of file rtt/scripting/ValueChangeParser.hpp.

std::vector<base::AttributeBase*> RTT::scripting::ValueChangeParser::definedValues (  )  [inline]
std::string RTT::scripting::ValueChangeParser::lastDefinedName (  )  [inline]

Definition at line 181 of file rtt/scripting/ValueChangeParser.hpp.

std::string RTT::scripting::ValueChangeParser::lastDefinedName (  )  [inline]
base::AttributeBase* RTT::scripting::ValueChangeParser::lastDefinedValue (  )  [inline]

Definition at line 169 of file rtt/scripting/ValueChangeParser.hpp.

base::AttributeBase* RTT::scripting::ValueChangeParser::lastDefinedValue (  )  [inline]
void RTT::scripting::ValueChangeParser::load ( Service::shared_ptr  source  ) 

Loads all defined names from a service. Just like store(), but works the other way around and allows you to pre-defined some variables. This function removes all these variables from 'source'

void RTT::ValueChangeParser::load ( Service::shared_ptr  source  ) 

Loads all defined names from a service. Just like store(), but works the other way around and allows you to pre-defined some variables. This function removes all these variables from 'source'

Definition at line 313 of file ValueChangeParser.cpp.

rule_t& RTT::scripting::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::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...

Definition at line 377 of file ValueChangeParser.cpp.

rule_t& RTT::scripting::ValueChangeParser::parser (  ) 

Returns the full parser, as it is used most. The individual sub-parsers are below.

Returns:
rule_t & RTT::ValueChangeParser::parser (  ) 

Returns the full parser, as it is used most. The individual sub-parsers are below.

Returns:

Definition at line 357 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::reset (  ) 

Completely clear all data and erase all parsed definitions from the taskcontext given in the constructor.

void RTT::ValueChangeParser::reset (  ) 

Completely clear all data and erase all parsed definitions from the taskcontext given in the constructor.

Definition at line 342 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::seenaliasdefinition (  )  [private]
void RTT::ValueChangeParser::seenaliasdefinition (  )  [private]

Definition at line 230 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::seenbaredefinition (  )  [private]
void RTT::ValueChangeParser::seenbaredefinition (  )  [private]

Definition at line 250 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::seenconstantdefinition (  )  [private]
void RTT::ValueChangeParser::seenconstantdefinition (  )  [private]

Definition at line 185 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::seenparamdefinition (  )  [private]
void RTT::scripting::ValueChangeParser::seenparamdefinition (  )  [private]
void RTT::scripting::ValueChangeParser::seenproperty (  )  [private]
void RTT::scripting::ValueChangeParser::seenproperty (  )  [private]
void RTT::scripting::ValueChangeParser::seensizehint (  )  [private]
void RTT::ValueChangeParser::seensizehint (  )  [private]

Definition at line 156 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::seentype ( iter_t  begin,
iter_t  end 
) [private]
void RTT::ValueChangeParser::seentype ( iter_t  begin,
iter_t  end 
) [private]

Definition at line 222 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::seenvariabledefinition (  )  [private]
void RTT::ValueChangeParser::seenvariabledefinition (  )  [private]

Definition at line 267 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::store ( Service::shared_ptr  other  ) 

Store allDefinedNames() in a service. This allows you to retrieve all parsed variable declarations.

void RTT::ValueChangeParser::store ( Service::shared_ptr  other  ) 

Store allDefinedNames() in a service. This allows you to retrieve all parsed variable declarations.

Definition at line 299 of file ValueChangeParser.cpp.

void RTT::scripting::ValueChangeParser::storedefinitionname ( iter_t  begin,
iter_t  end 
) [private]
void RTT::ValueChangeParser::storedefinitionname ( iter_t  begin,
iter_t  end 
) [private]

Definition at line 210 of file ValueChangeParser.cpp.

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

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

rule_t & RTT::ValueChangeParser::variableDefinitionParser (  ) 

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

Definition at line 372 of file ValueChangeParser.cpp.


Member Data Documentation

std::vector< std::string > RTT::scripting::ValueChangeParser::alldefinednames [private]
std::vector< std::string > RTT::scripting::ValueChangeParser::definednames [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:17 2013