38 #ifndef VALUECHANGEPARSER_HPP 39 #define VALUECHANGEPARSER_HPP 43 #include "../Attribute.hpp" 48 #include "../types/Types.hpp" 49 #include "../Service.hpp" 51 namespace RTT {
namespace scripting
64 std::vector<base::ActionInterface*> assigncommands;
68 std::vector<base::AttributeBase*> definedvalues;
73 std::vector<std::string> definednames;
78 std::vector<std::string> alldefinednames;
82 std::string valuename;
88 void seenconstantdefinition();
89 void seenaliasdefinition();
90 void seenvariabledefinition();
91 void seenbaredefinition();
92 void seenparamdefinition();
98 rule_t constantdefinition, aliasdefinition, variabledefinition,
99 paramdefinition, baredefinition,
100 vardecl, constdecl, baredecl,
109 boost::shared_ptr<types::TypeInfoRepository> typerepos;
159 if ( assigncommands.empty() )
161 return assigncommands.back();
166 return assigncommands;
171 if ( definedvalues.empty() )
173 return definedvalues.back();
178 return definedvalues;
183 if ( definednames.empty() )
185 return definednames.back();
195 return alldefinednames;
rule_t & parser()
Returns the full parser, as it is used most.
std::vector< base::AttributeBase * > definedValues()
void load(Service::shared_ptr source)
Loads all defined names from a service.
rule_t & aliasDefinitionParser()
The parser that parses alias definitions.
rule_t & bareDefinitionParser()
The parser that parses a bare variable definition.
std::vector< std::string > allDefinedNames()
std::string lastDefinedName()
void reset()
Completely clear all data and erase all parsed definitions from the taskcontext given in the construc...
base::ActionInterface * assignCommand()
This base::ActionInterface holds the command assigning a value to a variable that should be included ...
This class contains some very common parser definitions.
An execution engine serialises (executes one after the other) the execution of all commands...
boost::shared_ptr< Service > shared_ptr
void store(Service::shared_ptr other)
Store allDefinedNames() in a service.
How we parse: this parser works like a stack-based RPN calculator.
An attribute is a minimalistic, named placeholder for data.
Based on the software pattern 'command', this interface allows execution of action objects...
std::vector< std::string > definedNames()
A class for representing a user type, and which can build instances of that type. ...
This class is responsible for parsing constant definitions, variable definitions, variable change ins...
void clear()
Clear assignCommands(), definedValues() and definedNames().
rule_t & paramDefinitionParser()
The parser that parses state context parameter definitions.
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 def...
base::AttributeBase * lastDefinedValue()
The TaskContext is the C++ representation of an Orocos component.
std::vector< base::ActionInterface * > assignCommands()
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
ValueChangeParser(TaskContext *tc, CommonParser &cp, Service::shared_ptr storage, ExecutionEngine *caller)
Create a ValueChangeParser which operates and stores values in a task.