|
SeExpr
|
#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 } |
| typedef double | Func0() |
| typedef double | Func1(double) |
| typedef double | Func2(double, double) |
| typedef double | Func3(double, double, double) |
| typedef double | Func4(double, double, double, double) |
| typedef double | Func5(double, double, double, double, double) |
| typedef double | Func6(double, double, double, double, double, double) |
| typedef double | Func1v(const Vec3d &) |
| typedef double | Func2v(const Vec3d &, const Vec3d &) |
| typedef Vec3d | Func1vv(const Vec3d &) |
| typedef Vec3d | Func2vv(const Vec3d &, const Vec3d &) |
| typedef double | Funcn(int n, double *params) |
| typedef double | Funcnv(int n, const Vec3d *params) |
| typedef Vec3d | Funcnvv(int n, const Vec3d *params) |
Public Member Functions | |
| ExprFuncStandard (FuncType funcType, void *f) | |
| No argument function. | |
| ExprFuncStandard () | |
| virtual ExprType | prep (ExprFuncNode *node, bool scalarWanted, ExprVarEnvBuilder &envBuilder) const |
| virtual int | buildInterpreter (const ExprFuncNode *node, Interpreter *interpreter) const |
| Build an interpreter to evaluate the expression. | |
| void * | getFuncPointer () const |
| FuncType | getFuncType () const |
Public Member Functions inherited from SeExpr2::ExprFuncX | |
| ExprFuncX (const bool threadSafe) | |
| virtual ExprType | type () const |
| virtual | ~ExprFuncX () |
| bool | isThreadSafe () const |
| virtual size_t | sizeInBytes () const |
| Return memory usage of a funcX in bytes. | |
| virtual void | statistics (Statistics &) const |
| Give this function a chance to populate its statistics. | |
Private Attributes | |
| FuncType | _funcType |
| void * | _func |
Additional Inherited Members | |
Protected Attributes inherited from SeExpr2::ExprFuncX | |
| bool | _isScalar |
| ExprType | _type |
Definition at line 25 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func0() |
Definition at line 50 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func1(double) |
Definition at line 51 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func1v(const Vec3d &) |
Definition at line 57 of file ExprFuncStandard.h.
Definition at line 59 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func2(double, double) |
Definition at line 52 of file ExprFuncStandard.h.
Definition at line 58 of file ExprFuncStandard.h.
Definition at line 60 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func3(double, double, double) |
Definition at line 53 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func4(double, double, double, double) |
Definition at line 54 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func5(double, double, double, double, double) |
Definition at line 55 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Func6(double, double, double, double, double, double) |
Definition at line 56 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Funcn(int n, double *params) |
Definition at line 61 of file ExprFuncStandard.h.
| typedef double SeExpr2::ExprFuncStandard::Funcnv(int n, const Vec3d *params) |
Definition at line 62 of file ExprFuncStandard.h.
Definition at line 63 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 27 of file ExprFuncStandard.h.
|
inline |
No argument function.
Definition at line 83 of file ExprFuncStandard.h.
References _func, _funcType, SeExpr2::ExprFuncX::ExprFuncX(), and f().
|
inline |
Definition at line 140 of file ExprFuncStandard.h.
References SeExpr2::ExprFuncX::ExprFuncX().
|
virtual |
Build an interpreter to evaluate the expression.
evaluate the expression. the given node is where in the parse tree the evaluation is for
Implements SeExpr2::ExprFuncX.
Definition at line 145 of file ExprFuncStandard.cpp.
References _func, _funcType, SeExpr2::Interpreter::addOp(), SeExpr2::Interpreter::addOperand(), SeExpr2::Interpreter::allocFP(), SeExpr2::Interpreter::allocPtr(), SeExpr2::ExprNode::buildInterpreter(), SeExpr2::ExprNode::child(), SeExpr2::Expression::debugging, SeExpr2::ExprType::dim(), SeExpr2::Interpreter::endOp(), SeExpr2::Promote< d >::f(), FUNC0, SeExpr2::Func0Op(), FUNC1, SeExpr2::Func1Op(), FUNC1V, SeExpr2::Func1VOp(), FUNC1VV, SeExpr2::Func1VVOp(), FUNC2, SeExpr2::Func2Op(), FUNC2V, SeExpr2::Func2VOp(), FUNC2VV, SeExpr2::Func2VVOp(), FUNC3, SeExpr2::Func3Op(), FUNC4, SeExpr2::Func4Op(), FUNC5, SeExpr2::Func5Op(), FUNC6, SeExpr2::Func6Op(), FUNCN, SeExpr2::FuncNOp(), FUNCNV, SeExpr2::FuncNVOp(), FUNCNVV, SeExpr2::FuncNVVOp(), SeExpr2::ExprType::isFP(), SeExpr2::ExprNode::numChildren(), SeExpr2::Interpreter::print(), SeExpr2::Interpreter::s, SeExpr2::ExprNode::type(), VEC, and VECVEC.
|
inline |
Definition at line 144 of file ExprFuncStandard.h.
References _func.
|
inline |
Definition at line 145 of file ExprFuncStandard.h.
References _funcType.
|
virtual |
prep the expression by doing all type checking argument checking, etc.
Implements SeExpr2::ExprFuncX.
Definition at line 23 of file ExprFuncStandard.cpp.
References _funcType, SeExpr2::ExprNode::checkCondition(), SeExpr2::ExprNode::checkIsFP(), SeExpr2::ExprNode::child(), SeExpr2::ExprType::dim(), SeExpr2::ExprType::Error(), SeExpr2::ExprType::FP(), SeExpr2::ExprNode::numChildren(), SeExpr2::ExprNode::prep(), SeExpr2::ExprType::setLifetime(), VEC, and VECVEC.
|
private |
Definition at line 149 of file ExprFuncStandard.h.
Referenced by buildInterpreter(), ExprFuncStandard(), and getFuncPointer().
|
private |
Definition at line 148 of file ExprFuncStandard.h.
Referenced by buildInterpreter(), ExprFuncStandard(), getFuncType(), and prep().