SeExpr
|
A class that lets you register for the variables used by one or more expressions. More...
#include <VarBlock.h>
Classes | |
class | Ref |
Internally implemented var ref used by SeExpr. More... | |
Public Member Functions | |
int | registerVariable (const std::string &name, const ExprType type) |
Register a variable and return a handle. | |
VarBlock | create (bool makeThreadSafe=false) |
ExprVarRef * | resolveVar (const std::string &name) const |
Resolve the variable using anything in the data block (call from resolveVar in Expr subclass) | |
Private Attributes | |
int | _nextOffset = 0 |
std::map< std::string, Ref > | _vars |
A class that lets you register for the variables used by one or more expressions.
Definition at line 84 of file VarBlock.h.
|
inline |
Get an evaluation handle (one needed per thread)
makeThreadSafe | If true, right before evaluating the expression, all data used by the interpreter will be copied to the var block, to make the evaluation thread safe (assuming there's one var block instead per thread) If false or not specified, the old behavior occurs (var block will only hold variables sources and optionally output data, and the interpreter will work on its internal data) |
Definition at line 121 of file VarBlock.h.
References _nextOffset.
Referenced by f().
|
inline |
Register a variable and return a handle.
Definition at line 101 of file VarBlock.h.
References _nextOffset, and _vars.
Referenced by f().
|
inline |
Resolve the variable using anything in the data block (call from resolveVar in Expr subclass)
Definition at line 126 of file VarBlock.h.
|
private |
Definition at line 133 of file VarBlock.h.
Referenced by create(), and registerVariable().
|
private |
Definition at line 134 of file VarBlock.h.
Referenced by registerVariable(), and resolveVar().