VISH  0.2
Classes | Public Types | Public Member Functions | Static Public Member Functions
Eagle::Context Class Reference

A set of variable names, with indices associated to each type. More...

#include </home/werner/origo/vish/ocean/parzival/Context.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions


Detailed Description

A set of variable names, with indices associated to each type.

Examples:

AnemoneBoundingVolume.cpp, BoundingVolume.cpp, ComputeGridStreamLines.cpp, ComputeMultiStreamLines.cpp, InteractivePoint.cpp, and SeagrassBoundingVolume.cpp.


Member Function Documentation

bool Eagle::Context::accessVariable ( const type_info &  type,
const Context::id_t &  id,
const string name 
) [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.

Parameters:
typeThe type of the variable
idThe variable identification number
nameThe textual name of the variable
Note:
A future version could allow a derived parser to declare a specific variable as being "unavailable", depending on external circumstances. If so, it could trigger a syntax error. It needs to be investigated if such could be a useful scenario.
Returns:
Should return always true, otherwise indicates the variable shall not be used.
template<class Type >
static bool Eagle::Context::isVariable ( Context C,
id_t &  id 
) [inline, static]

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.


The documentation for this class was generated from the following files: