#include <environment.h>
Public Member Functions | |
Environment () | |
Constructor. | |
Environment (BufferNode *_root) | |
Constructor. | |
virtual | ~Environment () |
void | insertNodeBinding (unsigned var, BufferNode *node) |
Inserts (or sets) a new variable with its (current) binding to a BufferNode. | |
void | print (OutputStream &dos) |
Prints all variables with their (current) binding to a BufferNode. | |
BufferNode * | getNodeBinding (unsigned var) |
Returns the (current) binding to a BufferNode for the entered variable. | |
Environment * | clone () |
Returns a new, independent copy of all variables with their (current) binding to a BufferNode or of this object respectively. | |
Private Attributes | |
Env | env |
The underlying map of this object. |
Represents (current) binding of variables to a buffer node, which takes therefore a variable and a BufferNode as arguments.
Definition at line 60 of file environment.h.
Environment::Environment | ( | ) |
Constructor.
Constructor - creating object.
Definition at line 38 of file environment.cpp.
Referenced by clone().
Environment::Environment | ( | BufferNode * | _root | ) |
Constructor.
Constructor - creating object for a BufferNode.
[in] | _root | Pointer to a BufferNode object. |
Definition at line 41 of file environment.cpp.
References env, and TAGID_ROOT.
Environment::~Environment | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file environment.cpp.
Environment * Environment::clone | ( | ) |
Returns a new, independent copy of all variables with their (current) binding to a BufferNode or of this object respectively.
Returns a new, independent copy of all variables with their (current) binding to a BufferNode or of this object respectively.
Environment* | Pointer to a Environment object. |
Definition at line 69 of file environment.cpp.
References env, Environment(), and insertNodeBinding().
Referenced by ForExpression::eval(), and ForExpression::evalSignOffForBinding().
BufferNode * Environment::getNodeBinding | ( | unsigned | var | ) |
Returns the (current) binding to a BufferNode for the entered variable.
Returns the (current) binding to a BufferNode for the entered variable.
[in] | var | Variable for which (current) binding should be obtained. |
BufferNode* | Pointer to a BufferNode object. |
Definition at line 62 of file environment.cpp.
References env.
Referenced by AggregateFunctVarSampExpression::calculateValue(), AggregateFunctVarPopExpression::calculateValue(), AggregateFunctSumExpression::calculateValue(), AggregateFunctStdDevSampExpression::calculateValue(), AggregateFunctStdDevPopExpression::calculateValue(), AggregateFunctMinExpression::calculateValue(), AggregateFunctMedianExpression::calculateValue(), AggregateFunctMaxExpression::calculateValue(), AggregateFunctCountExpression::calculateValue(), AggregateFunctAvgExpression::calculateValue(), VarStepExpression::eval(), VarExpression::eval(), SignOffExpression::eval(), ForExpression::eval(), ExistsCondExpression::evalCond(), VarStepExpression::prepareOperand(), and VarExpression::prepareOperand().
void Environment::insertNodeBinding | ( | unsigned | var, | |
BufferNode * | node | |||
) |
Inserts (or sets) a new variable with its (current) binding to a BufferNode.
Inserts (or sets) a new variable with its (current) binding to a BufferNode.
[in] | var | Variable for which (current) binding holds. |
[in] | node | Pointer to a BufferNode object. |
void |
Definition at line 48 of file environment.cpp.
References env.
Referenced by clone(), ForExpression::eval(), and ForExpression::evalSignOffForBinding().
void Environment::print | ( | OutputStream & | dos | ) |
Prints all variables with their (current) binding to a BufferNode.
Prints all variables with their (current) binding to a BufferNode.
[in] | dos | Pointer to a OutputStream object. |
void |
Definition at line 52 of file environment.cpp.
References env, VarName::getInstance(), VarName::getVarname(), and NEWLINE.
Env Environment::env [private] |
The underlying map of this object.
The underlying map of this object, which maps variables to a BufferNode.
Definition at line 118 of file environment.h.
Referenced by clone(), Environment(), getNodeBinding(), insertNodeBinding(), and print().