SeExpr
|
Extension function spec, used for complicated argument custom functions. More...
#include <ExprFuncX.h>
Public Member Functions | |
ExprFuncX (const bool threadSafe) | |
virtual ExprType | prep (ExprFuncNode *node, bool scalarWanted, ExprVarEnvBuilder &env) const =0 |
virtual ExprType | type () const |
virtual int | buildInterpreter (const ExprFuncNode *node, Interpreter *interpreter) const =0 |
Build an interpreter to evaluate the expression. More... | |
virtual | ~ExprFuncX () |
bool | isThreadSafe () const |
virtual size_t | sizeInBytes () const |
Return memory usage of a funcX in bytes. More... | |
virtual void | statistics (Statistics &) const |
Give this function a chance to populate its statistics. More... | |
Protected Attributes | |
bool | _isScalar |
ExprType | _type |
Private Attributes | |
bool | _threadSafe |
Extension function spec, used for complicated argument custom functions.
Provides the ability to handle all argument type checking and processing manually. Derive from this class and then make your own ExprFunc that takes this object. This is necessary if you need string arguments or you have variable numbers of arguments. See ExprBuiltins.h for some examples
Definition at line 35 of file ExprFuncX.h.
|
inline |
Create an ExprFuncX. If the functions and type checking you implement is thread safe your derived class should call this with true. If not, then false. If you mark a function as thread unsafe, and it is used in an expression then bool Expression::isThreadSafe() will return false and the controlling software should not attempt to run multiple threads of an expression.
Definition at line 43 of file ExprFuncX.h.
|
inlinevirtual |
Definition at line 54 of file ExprFuncX.h.
|
pure virtual |
Build an interpreter to evaluate the expression.
evaluate the expression. the given node is where in the parse tree the evaluation is for
Implemented in SeExpr2::ExprFuncStandard, SeExpr2::ExprFuncLocal, and SeExpr2::ExprFuncSimple.
Referenced by SeExpr2::ExprFuncNode::buildInterpreter().
|
inline |
Definition at line 56 of file ExprFuncX.h.
References _threadSafe.
|
pure virtual |
prep the expression by doing all type checking argument checking, etc.
Implemented in SeExpr2::PrintFuncX, SeExpr2::GetVar, SeExpr2::CCurveFuncX, SeExpr2::CurveFuncX, SeExpr2::CachedVoronoiFunc, SeExpr2::ExprFuncStandard, SeExpr2::ExprFuncLocal, SeExpr2::ExprFuncSimple, SeExpr2::TriplanarFuncX, SeExpr2::MapFuncX, BasicExpression::DummyFuncX, and SeExpr2::RandFuncX.
Referenced by SeExpr2::ExprFuncNode::prep().
|
inlinevirtual |
Return memory usage of a funcX in bytes.
Definition at line 59 of file ExprFuncX.h.
|
inlinevirtual |
Give this function a chance to populate its statistics.
Definition at line 62 of file ExprFuncX.h.
|
inlinevirtual |
Definition at line 47 of file ExprFuncX.h.
References _type.
|
protected |
Definition at line 65 of file ExprFuncX.h.
|
private |
Definition at line 69 of file ExprFuncX.h.
Referenced by isThreadSafe().
|
protected |
Definition at line 66 of file ExprFuncX.h.
Referenced by type().