#include <ValueChangeParser.hpp>
Public Member Functions | |
rule_t & | aliasDefinitionParser () |
std::vector< std::string > | allDefinedNames () |
base::ActionInterface * | assignCommand () |
std::vector< base::ActionInterface * > | assignCommands () |
std::vector< scripting::ConditionInterface * > | assignConditions () |
rule_t & | bareDefinitionParser () |
void | clear () |
rule_t & | constantDefinitionParser () |
std::vector< std::string > | definedNames () |
std::vector< base::AttributeBase * > | definedValues () |
std::string | lastDefinedName () |
base::AttributeBase * | lastDefinedValue () |
void | load (Service::shared_ptr source) |
rule_t & | paramDefinitionParser () |
rule_t & | parser () |
void | reset () |
void | store (Service::shared_ptr other) |
ValueChangeParser (TaskContext *tc, CommonParser &cp, Service::shared_ptr storage, ExecutionEngine *caller) | |
rule_t & | variableDefinitionParser () |
Private Member Functions | |
void | cleanup () |
void | seenaliasdefinition () |
void | seenbaredefinition () |
void | seenconstantdefinition () |
void | seenparamdefinition () |
void | seenproperty () |
void | seensizehint () |
void | seentype (iter_t begin, iter_t end) |
void | seenvariabledefinition () |
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 |
CommonParser & | commonparser |
std::vector< scripting::ConditionInterface * > | conditions |
rule_t | constantdefinition |
rule_t | constdecl |
TaskContext * | context |
std::vector< std::string > | definednames |
std::vector< base::AttributeBase * > | definedvalues |
ExpressionParser | expressionparser |
Service::shared_ptr | mstore |
rule_t | paramdefinition |
int | sizehint |
types::TypeInfo * | type |
boost::shared_ptr< types::TypeInfoRepository > | typerepos |
rule_t | valuechange_parsers |
std::string | valuename |
rule_t | vardecl |
rule_t | variabledefinition |
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..
Definition at line 60 of file ValueChangeParser.hpp.
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 83 of file ValueChangeParser.cpp.
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 381 of file ValueChangeParser.cpp.
|
inline |
Definition at line 199 of file ValueChangeParser.hpp.
|
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 158 of file ValueChangeParser.hpp.
|
inline |
Definition at line 165 of file ValueChangeParser.hpp.
|
inline |
Definition at line 170 of file ValueChangeParser.hpp.
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 396 of file ValueChangeParser.cpp.
|
private |
Delete temporary variables before throwing an exception.
Definition at line 341 of file ValueChangeParser.cpp.
void RTT::ValueChangeParser::clear | ( | ) |
Clear assignCommands(), definedValues() and definedNames(). Does not delete any variables or commands.
Definition at line 346 of file ValueChangeParser.cpp.
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 376 of file ValueChangeParser.cpp.
|
inline |
Definition at line 194 of file ValueChangeParser.hpp.
|
inline |
Definition at line 182 of file ValueChangeParser.hpp.
|
inline |
Definition at line 187 of file ValueChangeParser.hpp.
|
inline |
Definition at line 175 of file ValueChangeParser.hpp.
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 326 of file ValueChangeParser.cpp.
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 391 of file ValueChangeParser.cpp.
rule_t & RTT::ValueChangeParser::parser | ( | ) |
Returns the full parser, as it is used most. The individual sub-parsers are below.
Definition at line 371 of file ValueChangeParser.cpp.
void RTT::ValueChangeParser::reset | ( | ) |
Completely clear all data and erase all parsed definitions from the taskcontext given in the constructor.
Definition at line 356 of file ValueChangeParser.cpp.
|
private |
Definition at line 240 of file ValueChangeParser.cpp.
|
private |
Definition at line 260 of file ValueChangeParser.cpp.
|
private |
Definition at line 195 of file ValueChangeParser.cpp.
|
private |
|
private |
|
private |
Definition at line 166 of file ValueChangeParser.cpp.
Definition at line 232 of file ValueChangeParser.cpp.
|
private |
Definition at line 277 of file ValueChangeParser.cpp.
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 312 of file ValueChangeParser.cpp.
Definition at line 220 of file ValueChangeParser.cpp.
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 386 of file ValueChangeParser.cpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 79 of file ValueChangeParser.hpp.
|
private |
Definition at line 64 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 107 of file ValueChangeParser.hpp.
|
private |
Definition at line 65 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 104 of file ValueChangeParser.hpp.
|
private |
Definition at line 74 of file ValueChangeParser.hpp.
|
private |
Definition at line 69 of file ValueChangeParser.hpp.
|
private |
Definition at line 106 of file ValueChangeParser.hpp.
|
private |
Definition at line 105 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 109 of file ValueChangeParser.hpp.
|
private |
Definition at line 87 of file ValueChangeParser.hpp.
|
private |
Definition at line 110 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 83 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.
|
private |
Definition at line 99 of file ValueChangeParser.hpp.