|
KSeExpr 4.0.4.0
|
#include <ExprMultiExpr.h>
Public Member Functions | |
| DExpression (const std::string &varName, Expressions &context, const std::string &e, const ExprType &type=ExprType().FP(3), EvaluationStrategy be=defaultEvaluationStrategy) | |
| const std::string & | name () const |
| ExprVarRef * | resolveVar (const std::string &name) const override |
| void | eval () |
| Public Member Functions inherited from KSeExpr::Expression | |
| Expression (EvaluationStrategy be=Expression::defaultEvaluationStrategy) | |
| Expression (const std::string &e, const ExprType &type=ExprType().FP(3), EvaluationStrategy be=Expression::defaultEvaluationStrategy, const Context &context=Context::global()) | |
| virtual | ~Expression () |
| void | setDesiredReturnType (const ExprType &type) |
| void | setExpr (const std::string &e) |
| const std::string & | getExpr () const |
| Get the string that this expression is currently set to evaluate. | |
| bool | syntaxOK () const |
| bool | isValid () const |
| const ErrorCode & | parseError () const |
| const std::vector< std::string > & | parseErrorArgs () const |
| const std::vector< Error > & | getErrors () const |
| const std::vector< std::pair< int, int > > & | getComments () const |
| bool | isConstant () const |
| bool | usesVar (const std::string &name) const |
| bool | usesFunc (const std::string &name) const |
| bool | isThreadSafe () const |
| void | setThreadUnsafe (const std::string &functionName) const |
| const std::vector< std::string > & | getThreadUnsafeFunctionCalls () const |
| bool | wantVec () const |
| bool | isVec () const |
| const ExprType & | returnType () const |
| void | evalMultiple (VarBlock *varBlock, int outputVarBlockOffset, size_t rangeStart, size_t rangeEnd) const |
| Evaluate multiple blocks. | |
| const double * | evalFP (VarBlock *varBlock=nullptr) const |
| const char * | evalStr (VarBlock *varBlock=nullptr) const |
| void | reset () |
| virtual ExprFunc * | resolveFunc (const std::string &) const |
| void | addError (const ErrorCode error, const std::vector< std::string > ids, const int startPos, const int endPos) const |
| void | addComment (int pos, int length) |
| const Context & | context () const |
| void | setContext (const Context &context) |
| void | debugPrintParseTree () const |
| void | debugPrintInterpreter () const |
| void | debugPrintLLVM () const |
| void | setVarBlockCreator (const VarBlockCreator *varBlockCreator) |
| const VarBlockCreator * | varBlockCreator () const |
| void | addVar (const char *n) const |
| add local variable (this is for internal use) | |
| void | addFunc (const char *n) const |
| add function evaluation (this is for internal use) | |
Public Attributes | |
| std::set< DExpression * > | operandExprs |
| std::set< GlobalVal * > | operandVars |
| GlobalVal * | val |
Private Attributes | |
| Expressions & | dContext |
Additional Inherited Members | |
| Public Types inherited from KSeExpr::Expression | |
| enum | EvaluationStrategy { UseInterpreter , UseLLVM } |
| Types of evaluation strategies that are available. More... | |
| Static Public Attributes inherited from KSeExpr::Expression | |
| static EvaluationStrategy | defaultEvaluationStrategy = chooseDefaultEvaluationStrategy() |
| What evaluation strategy to use by default. | |
| static bool | debugging = getenv("SE_EXPR_DEBUG") != nullptr |
| Whether to debug expressions. | |
| Protected Member Functions inherited from KSeExpr::Expression | |
| void | prepIfNeeded () const |
| Protected Attributes inherited from KSeExpr::Expression | |
| ExprType | _desiredReturnType |
| ExprVarEnvBuilder | _envBuilder |
| ExprNode * | _parseTree |
Definition at line 19 of file ExprMultiExpr.h.
| KSeExpr::DExpression::DExpression | ( | const std::string & | varName, |
| Expressions & | context, | ||
| const std::string & | e, | ||
| const ExprType & | type = ExprType().FP(3), | ||
| EvaluationStrategy | be = defaultEvaluationStrategy ) |
Definition at line 109 of file ExprMultiExpr.cpp.
References KSeExpr::Expression::context(), dContext, KSeExpr::ExprType::dim(), KSeExpr::Expression::Expression(), KSeExpr::ExprType::isFP(), KSeExpr::ExprType::isString(), operandExprs, operandVars, KSeExpr::Expression::prepIfNeeded(), and val.
Referenced by resolveVar().
| void KSeExpr::DExpression::eval | ( | ) |
Definition at line 156 of file ExprMultiExpr.cpp.
References KSeExpr::Expression::_desiredReturnType, KSeExpr::Expression::evalFP(), KSeExpr::Expression::evalStr(), val, KSeExpr::GlobalFP::val, and KSeExpr::GlobalStr::val.
| const std::string & KSeExpr::DExpression::name | ( | ) | const |
|
overridevirtual |
override resolveVar to add external variables
Reimplemented from KSeExpr::Expression.
Definition at line 132 of file ExprMultiExpr.cpp.
References KSeExpr::Expression::addError(), DExpression(), name(), operandExprs, operandVars, and KSeExpr::UndeclaredVariable.
|
private |
Definition at line 21 of file ExprMultiExpr.h.
Referenced by DExpression().
|
mutable |
Definition at line 26 of file ExprMultiExpr.h.
Referenced by DExpression(), and resolveVar().
|
mutable |
Definition at line 27 of file ExprMultiExpr.h.
Referenced by DExpression(), and resolveVar().
| GlobalVal* KSeExpr::DExpression::val |
Definition at line 29 of file ExprMultiExpr.h.
Referenced by DExpression(), eval(), and name().