SeExpr
Public Member Functions | Public Attributes | Private Attributes | List of all members
SeExpr2::DExpression Class Reference

#include <ExprMultiExpr.h>

Inheritance diagram for SeExpr2::DExpression:
SeExpr2::Expression

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
 
ExprVarRefresolveVar (const std::string &name) const
 
void eval ()
 
- Public Member Functions inherited from SeExpr2::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. More...
 
bool syntaxOK () const
 
bool isValid () const
 
const std::string & parseError () 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 ExprTypereturnType () const
 
void evalMultiple (VarBlock *varBlock, int outputVarBlockOffset, size_t rangeStart, size_t rangeEnd) const
 Evaluate multiple blocks. More...
 
const double * evalFP (VarBlock *varBlock=nullptr) const
 
const char * evalStr (VarBlock *varBlock=nullptr) const
 
void reset ()
 
virtual ExprFuncresolveFunc (const std::string &name) const
 
void addError (const std::string &error, const int startPos, const int endPos) const
 
void addComment (int pos, int length)
 
const Contextcontext () const
 
void setContext (const Context &context)
 
void debugPrintParseTree () const
 
void debugPrintInterpreter () const
 
void debugPrintLLVM () const
 
void setVarBlockCreator (const VarBlockCreator *varBlockCreator)
 
const VarBlockCreatorvarBlockCreator () const
 
void addVar (const char *n) const
 add local variable (this is for internal use) More...
 
void addFunc (const char *n) const
 add function evaluation (this is for internal use) More...
 

Public Attributes

std::set< DExpression * > operandExprs
 
std::set< GlobalVal * > operandVars
 
GlobalValval
 

Private Attributes

Expressionscontext
 

Additional Inherited Members

- Public Types inherited from SeExpr2::Expression
enum  EvaluationStrategy { UseInterpreter, UseLLVM }
 Types of evaluation strategies that are available. More...
 
- Static Public Attributes inherited from SeExpr2::Expression
static EvaluationStrategy defaultEvaluationStrategy = chooseDefaultEvaluationStrategy()
 What evaluation strategy to use by default. More...
 
static bool debugging = getenv("SE_EXPR_DEBUG") != 0
 Whether to debug expressions. More...
 
- Protected Member Functions inherited from SeExpr2::Expression
void prepIfNeeded () const
 
- Protected Attributes inherited from SeExpr2::Expression
ExprType _desiredReturnType
 
ExprVarEnvBuilder _envBuilder
 
ExprNode_parseTree
 

Detailed Description

Definition at line 30 of file ExprMultiExpr.h.

Constructor & Destructor Documentation

SeExpr2::DExpression::DExpression ( const std::string &  varName,
Expressions context,
const std::string &  e,
const ExprType type = ExprType().FP(3),
EvaluationStrategy  be = defaultEvaluationStrategy 
)

Member Function Documentation

void SeExpr2::DExpression::eval ( )
const std::string & SeExpr2::DExpression::name ( ) const

Definition at line 109 of file ExprMultiExpr.cpp.

References val, and SeExpr2::GlobalVal::varName.

Referenced by resolveVar().

ExprVarRef * SeExpr2::DExpression::resolveVar ( const std::string &  name) const
virtual

override resolveVar to add external variables

Reimplemented from SeExpr2::Expression.

Definition at line 111 of file ExprMultiExpr.cpp.

References SeExpr2::Expression::addError(), name(), operandExprs, and operandVars.

Member Data Documentation

Expressions& SeExpr2::DExpression::context
private

Definition at line 31 of file ExprMultiExpr.h.

std::set<DExpression*> SeExpr2::DExpression::operandExprs
mutable

Definition at line 40 of file ExprMultiExpr.h.

Referenced by DExpression(), and resolveVar().

std::set<GlobalVal*> SeExpr2::DExpression::operandVars
mutable

Definition at line 41 of file ExprMultiExpr.h.

Referenced by DExpression(), and resolveVar().

GlobalVal* SeExpr2::DExpression::val

Definition at line 43 of file ExprMultiExpr.h.

Referenced by DExpression(), eval(), and name().


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