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;
65 std::vector<scripting::ConditionInterface*> conditions;
69 std::vector<base::AttributeBase*> definedvalues;
74 std::vector<std::string> definednames;
79 std::vector<std::string> alldefinednames;
83 std::string valuename;
89 void seenconstantdefinition();
90 void seenaliasdefinition();
91 void seenvariabledefinition();
92 void seenbaredefinition();
93 void seenparamdefinition();
99 rule_t constantdefinition, aliasdefinition, variabledefinition,
100 paramdefinition, baredefinition,
101 vardecl, constdecl, baredecl,
110 boost::shared_ptr<types::TypeInfoRepository> typerepos;
160 if ( assigncommands.empty() )
162 return assigncommands.back();
167 return assigncommands;
177 if ( definedvalues.empty() )
179 return definedvalues.back();
184 return definedvalues;
189 if ( definednames.empty() )
191 return definednames.back();
201 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.
std::vector< scripting::ConditionInterface * > assignConditions()
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.