KSeExpr
4.0.4.0
|
#include <ExprFuncStandard.h>
Public Types | |
enum | FuncType { NONE = 0 , FUNC0 , FUNC1 , FUNC2 , FUNC3 , FUNC4 , FUNC5 , FUNC6 , FUNCN , VEC , FUNC1V = VEC , FUNC2V , FUNCNV , VECVEC , FUNC1VV = VECVEC , FUNC2VV , FUNCNVV } |
using | Func0 = double() |
using | Func1 = double(double) |
using | Func2 = double(double, double) |
using | Func3 = double(double, double, double) |
using | Func4 = double(double, double, double, double) |
using | Func5 = double(double, double, double, double, double) |
using | Func6 = double(double, double, double, double, double, double) |
using | Func1v = double(const Vec3d &) |
using | Func2v = double(const Vec3d &, const Vec3d &) |
using | Func1vv = Vec3d(const Vec3d &) |
using | Func2vv = Vec3d(const Vec3d &, const Vec3d &) |
using | Funcn = double(int, double *) |
using | Funcnv = double(int, const Vec3d *) |
using | Funcnvv = Vec3d(int, const Vec3d *) |
Public Member Functions | |
ExprFuncStandard (FuncType funcType, void *f) | |
No argument function. More... | |
ExprFuncStandard () | |
ExprType | prep (ExprFuncNode *node, bool scalarWanted, ExprVarEnvBuilder &envBuilder) const override |
int | buildInterpreter (const ExprFuncNode *node, Interpreter *interpreter) const override |
Build an interpreter to evaluate the expression. More... | |
void * | getFuncPointer () const |
FuncType | getFuncType () const |
![]() | |
ExprFuncX (const bool threadSafe) | |
ExprFuncX (const ExprFuncX &)=default | |
ExprFuncX (ExprFuncX &&)=default | |
ExprFuncX & | operator= (const ExprFuncX &)=default |
ExprFuncX & | operator= (ExprFuncX &&)=default |
virtual ExprType | type () const |
virtual | ~ExprFuncX ()=default |
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... | |
Private Attributes | |
FuncType | _funcType {} |
void * | _func {nullptr} |
Additional Inherited Members | |
![]() | |
bool | _isScalar {} |
ExprType | _type |
Definition at line 14 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func0 = double() |
Definition at line 40 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func1 = double(double) |
Definition at line 41 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func1v = double(const Vec3d &) |
Definition at line 47 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func1vv = Vec3d(const Vec3d &) |
Definition at line 49 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func2 = double(double, double) |
Definition at line 42 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func2v = double(const Vec3d &, const Vec3d &) |
Definition at line 48 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func2vv = Vec3d(const Vec3d &, const Vec3d &) |
Definition at line 50 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func3 = double(double, double, double) |
Definition at line 43 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func4 = double(double, double, double, double) |
Definition at line 44 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func5 = double(double, double, double, double, double) |
Definition at line 45 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Func6 = double(double, double, double, double, double, double) |
Definition at line 46 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Funcn = double(int, double *) |
Definition at line 51 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Funcnv = double(int, const Vec3d *) |
Definition at line 52 of file ExprFuncStandard.h.
using KSeExpr::ExprFuncStandard::Funcnvv = Vec3d(int, const Vec3d *) |
Definition at line 53 of file ExprFuncStandard.h.
Enumerator | |
---|---|
NONE | |
FUNC0 | |
FUNC1 | |
FUNC2 | |
FUNC3 | |
FUNC4 | |
FUNC5 | |
FUNC6 | |
FUNCN | |
VEC | |
FUNC1V | |
FUNC2V | |
FUNCNV | |
VECVEC | |
FUNC1VV | |
FUNC2VV | |
FUNCNVV |
Definition at line 17 of file ExprFuncStandard.h.
|
inline |
No argument function.
Definition at line 73 of file ExprFuncStandard.h.
|
inline |
Definition at line 135 of file ExprFuncStandard.h.
|
overridevirtual |
Build an interpreter to evaluate the expression.
evaluate the expression. the given node is where in the parse tree the evaluation is for
Implements KSeExpr::ExprFuncX.
Definition at line 133 of file ExprFuncStandard.cpp.
References _func, _funcType, KSeExpr::Interpreter::addOp(), KSeExpr::Interpreter::addOperand(), KSeExpr::Interpreter::allocFP(), KSeExpr::Interpreter::allocPtr(), KSeExpr::ExprNode::buildInterpreter(), KSeExpr::ExprNode::child(), KSeExpr::Expression::debugging, KSeExpr::ExprType::dim(), KSeExpr::Interpreter::endOp(), FUNC0, KSeExpr::Func0Op(), FUNC1, KSeExpr::Func1Op(), FUNC1V, KSeExpr::Func1VOp(), FUNC1VV, KSeExpr::Func1VVOp(), FUNC2, KSeExpr::Func2Op(), FUNC2V, KSeExpr::Func2VOp(), FUNC2VV, KSeExpr::Func2VVOp(), FUNC3, KSeExpr::Func3Op(), FUNC4, KSeExpr::Func4Op(), FUNC5, KSeExpr::Func5Op(), FUNC6, KSeExpr::Func6Op(), FUNCN, KSeExpr::FuncNOp(), FUNCNV, KSeExpr::FuncNVOp(), FUNCNVV, KSeExpr::FuncNVVOp(), KSeExpr::ExprType::isFP(), KSeExpr::ExprNode::numChildren(), KSeExpr::Interpreter::print(), KSeExpr::Interpreter::s, KSeExpr::ExprNode::type(), VEC, and VECVEC.
|
inline |
Definition at line 142 of file ExprFuncStandard.h.
References _func.
|
inline |
Definition at line 146 of file ExprFuncStandard.h.
References _funcType.
|
overridevirtual |
prep the expression by doing all type checking argument checking, etc.
Implements KSeExpr::ExprFuncX.
Definition at line 11 of file ExprFuncStandard.cpp.
References _funcType, KSeExpr::ExprNode::checkCondition(), KSeExpr::ExprNode::checkIsFP(), KSeExpr::ExprNode::child(), KSeExpr::ExprType::dim(), KSeExpr::ExprType::Error(), KSeExpr::ExpectedFloatOrFloat3, KSeExpr::ExprType::FP(), KSeExpr::ExprNode::numChildren(), KSeExpr::ExprNode::prep(), KSeExpr::ExprType::setLifetime(), VEC, and VECVEC.
|
private |
Definition at line 153 of file ExprFuncStandard.h.
Referenced by buildInterpreter(), and getFuncPointer().
|
private |
Definition at line 152 of file ExprFuncStandard.h.
Referenced by buildInterpreter(), getFuncType(), and prep().