SeExpr
Public Member Functions | Protected Attributes | Private Attributes | List of all members
SeExpr2::ExprFuncX Class Referenceabstract

Extension function spec, used for complicated argument custom functions. More...

#include <ExprFuncX.h>

Inheritance diagram for SeExpr2::ExprFuncX:
SeExpr2::ExprFuncLocal SeExpr2::ExprFuncSimple SeExpr2::ExprFuncStandard BasicExpression::DummyFuncX SeExpr2::CachedVoronoiFunc SeExpr2::CCurveFuncX SeExpr2::CurveFuncX SeExpr2::GetVar SeExpr2::MapFuncX SeExpr2::PrintFuncX SeExpr2::RandFuncX SeExpr2::TriplanarFuncX

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
 

Detailed Description

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.

Constructor & Destructor Documentation

SeExpr2::ExprFuncX::ExprFuncX ( const bool  threadSafe)
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.

virtual SeExpr2::ExprFuncX::~ExprFuncX ( )
inlinevirtual

Definition at line 54 of file ExprFuncX.h.

Member Function Documentation

virtual int SeExpr2::ExprFuncX::buildInterpreter ( const ExprFuncNode node,
Interpreter interpreter 
) const
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().

bool SeExpr2::ExprFuncX::isThreadSafe ( ) const
inline

Definition at line 56 of file ExprFuncX.h.

References _threadSafe.

virtual ExprType SeExpr2::ExprFuncX::prep ( ExprFuncNode node,
bool  scalarWanted,
ExprVarEnvBuilder env 
) const
pure virtual
virtual size_t SeExpr2::ExprFuncX::sizeInBytes ( ) const
inlinevirtual

Return memory usage of a funcX in bytes.

Definition at line 59 of file ExprFuncX.h.

virtual void SeExpr2::ExprFuncX::statistics ( Statistics ) const
inlinevirtual

Give this function a chance to populate its statistics.

Definition at line 62 of file ExprFuncX.h.

virtual ExprType SeExpr2::ExprFuncX::type ( ) const
inlinevirtual

Definition at line 47 of file ExprFuncX.h.

References _type.

Member Data Documentation

bool SeExpr2::ExprFuncX::_isScalar
protected

Definition at line 65 of file ExprFuncX.h.

bool SeExpr2::ExprFuncX::_threadSafe
private

Definition at line 69 of file ExprFuncX.h.

Referenced by isThreadSafe().

ExprType SeExpr2::ExprFuncX::_type
protected

Definition at line 66 of file ExprFuncX.h.

Referenced by type().


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