|
The Vish Visualization Shell 0.3
Vish
|
A set of variable names, with indices associated to each type. More...
#include <ocean/parzival/Context.hpp>
Classes | |
| struct | Iterator |
| Iterator functor that allows to travers over all variables of a specific type. More... | |
| struct | VariableList |
Public Member Functions | |
| virtual bool | accessVariable (const type_info &type, const Context::id_t &id, const string &name) |
| Allow a derived parser context to determine if a specific variable has actually been used in the parsing process at all. | |
| size_t | findNumberOfVariables (const type_info &type) const |
| Inspect how many variables exist of the given type. | |
| id_t | findVariable (const type_info &type, const string &s) const |
| Find a variable of the given type and name. | |
| virtual string | getToken () const =0 |
| Get the currently processed token. | |
| int | iterate (const type_info &type, Iterator &it) |
| Iterate over all variables of a specific type. | |
Static Public Member Functions | |
| template<class Type > | |
| static bool | isVariable (Context &C, id_t &id) |
| Look up the current getToken() of the Context if it is known as a valid variable in this Context, and of the certain type. | |
A set of variable names, with indices associated to each type.
|
virtual |
Allow a derived parser context to determine if a specific variable has actually been used in the parsing process at all.
A typical scenario where this is useful is when the value of a variable would be effortsome to compute, or involves retrieving data from disk or network, etc.
| type | The type of the variable |
| id | The variable identification number |
| name | The textual name of the variable |
Referenced by isVariable().
|
inlinestatic |
Look up the current getToken() of the Context if it is known as a valid variable in this Context, and of the certain type.
If so, call the virtual accessVariable() function of the Context to tell the Context about the usage of this variable, and which type.
References accessVariable(), findVariable(), and getToken().