SeExpr

Public Types | Public Member Functions | Private Attributes | List of all members
SeExpr2::ExprFuncStandard Class Reference

`#include <ExprFuncStandard.h>`

Inheritance diagram for SeExpr2::ExprFuncStandard:

## 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. More...
| 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. More...
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. More...
virtual void | statistics (Statistics &) const
| Give this function a chance to populate its statistics. More...

## Private Attributes
FuncType | _funcType
void * | _func

## Additional Inherited Members
Protected Attributes inherited from SeExpr2::ExprFuncX
bool | _isScalar
ExprType | _type

## Detailed Description

Definition at line 25 of file ExprFuncStandard.h.

## Member Typedef Documentation

## ◆ Func0

typedef double SeExpr2::ExprFuncStandard::Func0()

Definition at line 50 of file ExprFuncStandard.h.

## ◆ Func1

typedef double SeExpr2::ExprFuncStandard::Func1(double)

Definition at line 51 of file ExprFuncStandard.h.

## ◆ Func1v

typedef double SeExpr2::ExprFuncStandard::Func1v(const Vec3d &)

Definition at line 57 of file ExprFuncStandard.h.

## ◆ Func1vv

typedef Vec3d SeExpr2::ExprFuncStandard::Func1vv(const Vec3d &)

Definition at line 59 of file ExprFuncStandard.h.

## ◆ Func2

typedef double SeExpr2::ExprFuncStandard::Func2(double, double)

Definition at line 52 of file ExprFuncStandard.h.

## ◆ Func2v

typedef double SeExpr2::ExprFuncStandard::Func2v(const Vec3d &, const Vec3d &)

Definition at line 58 of file ExprFuncStandard.h.

## ◆ Func2vv

typedef Vec3d SeExpr2::ExprFuncStandard::Func2vv(const Vec3d &, const Vec3d &)

Definition at line 60 of file ExprFuncStandard.h.

## ◆ Func3

typedef double SeExpr2::ExprFuncStandard::Func3(double, double, double)

Definition at line 53 of file ExprFuncStandard.h.

## ◆ Func4

typedef double SeExpr2::ExprFuncStandard::Func4(double, double, double, double)

Definition at line 54 of file ExprFuncStandard.h.

## ◆ Func5

typedef double SeExpr2::ExprFuncStandard::Func5(double, double, double, double, double)

Definition at line 55 of file ExprFuncStandard.h.

## ◆ Func6

typedef double SeExpr2::ExprFuncStandard::Func6(double, double, double, double, double, double)

Definition at line 56 of file ExprFuncStandard.h.

## ◆ Funcn

typedef double SeExpr2::ExprFuncStandard::Funcn(int n, double *params)

Definition at line 61 of file ExprFuncStandard.h.

## ◆ Funcnv

typedef double SeExpr2::ExprFuncStandard::Funcnv(int n, const Vec3d *params)

Definition at line 62 of file ExprFuncStandard.h.

## ◆ Funcnvv

typedef Vec3d SeExpr2::ExprFuncStandard::Funcnvv(int n, const Vec3d *params)

Definition at line 63 of file ExprFuncStandard.h.

## Member Enumeration Documentation

## ◆ FuncType

enum SeExpr2::ExprFuncStandard::FuncType

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.

## Constructor & Destructor Documentation

## ◆ ExprFuncStandard() [1/2]

SeExpr2::ExprFuncStandard::ExprFuncStandard | ( | FuncType | funcType,
|  | void * | f
| ) |  |
| inline

No argument function.

Definition at line 83 of file ExprFuncStandard.h.

## ◆ ExprFuncStandard() [2/2]

SeExpr2::ExprFuncStandard::ExprFuncStandard | ( |  | ) |
| inline

Definition at line 140 of file ExprFuncStandard.h.

## Member Function Documentation

## ◆ buildInterpreter()

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

## ◆ getFuncPointer()

void* SeExpr2::ExprFuncStandard::getFuncPointer | ( |  | ) | const
| inline

Definition at line 144 of file ExprFuncStandard.h.

References _func.

## ◆ getFuncType()

FuncType SeExpr2::ExprFuncStandard::getFuncType | ( |  | ) | const
| inline

Definition at line 145 of file ExprFuncStandard.h.

References _funcType.

## ◆ prep()

ExprType SeExpr2::ExprFuncStandard::prep | ( | ExprFuncNode * | node,
|  | bool | scalarWanted,
|  | ExprVarEnvBuilder & | env
| ) |  | const
| 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.

## Member Data Documentation

## ◆ _func

void* SeExpr2::ExprFuncStandard::_func
| private

Definition at line 149 of file ExprFuncStandard.h.

Referenced by buildInterpreter(), and getFuncPointer().

## ◆ _funcType

FuncType SeExpr2::ExprFuncStandard::_funcType
| private

Definition at line 148 of file ExprFuncStandard.h.

Referenced by buildInterpreter(), getFuncType(), and prep().

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

- /build/seexpr/src/SeExpr/src/SeExpr2/ExprFuncStandard.h
- /build/seexpr/src/SeExpr/src/SeExpr2/ExprFuncStandard.cpp