#include <expression.h>
| Public Types | |
| typedef std::map< std::string, double > | variablemap_type | 
| type of the variable storage | |
| Public Member Functions | |
| ~CalcContext () | |
| free the saved expression trees | |
| void | clearExpressions () | 
| free all saved expression trees | |
| bool | existsVariable (const std::string &varname) const | 
| check if the given variable name exists in the storage | |
| double | getVariable (const std::string &varname) const | 
| return the given variable from the storage. | |
| Public Attributes | |
| variablemap_type | variables | 
| variable storage. maps variable string to doubles | |
| std::vector< CalcNode * > | expressions | 
| array of unassigned expressions found by the parser. | |
This context is passed along to the example::Driver class and fill during parsing via bison actions.
Definition at line 300 of file expression.h.
| typedef std::map<std::string, double> CalcContext::variablemap_type | 
| CalcContext::~CalcContext | ( | ) |  [inline] | 
free the saved expression trees
Definition at line 315 of file expression.h.
References clearExpressions().
| void CalcContext::clearExpressions | ( | ) |  [inline] | 
free all saved expression trees
Definition at line 321 of file expression.h.
References expressions.
Referenced by main(), and ~CalcContext().
| bool CalcContext::existsVariable | ( | const std::string & | varname | ) | const  [inline] | 
check if the given variable name exists in the storage
Definition at line 331 of file expression.h.
References variables.
Referenced by example::Parser::parse().
| double CalcContext::getVariable | ( | const std::string & | varname | ) | const  [inline] | 
return the given variable from the storage.
throws an exception if it does not exist.
Definition at line 338 of file expression.h.
References variables.
Referenced by example::Parser::parse().
| std::vector<CalcNode*> CalcContext::expressions | 
array of unassigned expressions found by the parser.
these are then outputted to the user.
Definition at line 312 of file expression.h.
Referenced by clearExpressions(), main(), and example::Parser::parse().
variable storage. maps variable string to doubles
Definition at line 308 of file expression.h.
Referenced by existsVariable(), getVariable(), and example::Parser::parse().
 1.5.9
 1.5.9