|
| ~PyEval () override |
| Destructor.
|
|
std::string | getName () const override |
| Get the type of this evaluator. More...
|
|
void | addImport (const std::string &code, const xercesc::DOMElement *e, const std::string &action="") override |
|
bool | valueIsOfType (const Value &value, ValueType type) const override |
|
std::map< boost::filesystem::path, std::pair< boost::filesystem::path, bool > > & | requiredFiles () const override |
| return a list of all required files of the evaluator (excluding dependent files of libraries) More...
|
|
void | convertIndex (Value &v, bool evalTo1Base) override |
|
std::string | getStringRepresentation (const Value &x) const override |
| Returns a evaluator specific string representation of x. This is only useful for display to the user. More...
|
|
| ~Eval () override |
| Destructor.
|
|
| Eval (const Eval &other)=delete |
|
| Eval (Eval &&other)=delete |
|
Eval & | operator= (const Eval &other)=delete |
|
Eval & | operator= (Eval &&other)=delete |
|
virtual std::string | getName () const =0 |
| Get the type of this evaluator. More...
|
|
void | addParam (const std::string ¶mName, const Value &value) |
| Add a value to the current parameters.
|
|
void | addParamSet (const xercesc::DOMElement *e) |
|
virtual void | addImport (const std::string &code, const xercesc::DOMElement *e, const std::string &action="")=0 |
|
Value | eval (const xercesc::DOMElement *e) |
|
Value | eval (const xercesc::DOMAttr *a) |
|
Value | eval (const std::string &str, const xercesc::DOMElement *e=nullptr, bool skipRet=false) |
|
template<typename T > |
T | cast (const Value &value) const |
|
virtual std::string | getStringRepresentation (const Value &x) const |
| Returns a evaluator specific string representation of x. This is only useful for display to the user. More...
|
|
virtual bool | valueIsOfType (const Value &value, ValueType type) const =0 |
|
Value | stringToValue (const std::string &str, const xercesc::DOMElement *e=nullptr, bool fullEval=true, bool skipRet=false) const |
|
template<class T > |
Value | create (const T &v) const |
|
virtual std::map< boost::filesystem::path, std::pair< boost::filesystem::path, bool > > & | requiredFiles () const =0 |
| return a list of all required files of the evaluator (excluding dependent files of libraries) More...
|
|
virtual void | convertIndex (Value &v, bool evalTo1Based)=0 |
|
virtual Value | callFunction (const std::string &name, const std::vector< Value > &args) const =0 |
|
size_t | getStackSize () |
|
template<> |
string | cast (const Value &value) const |
|
template<> |
CodeString | cast (const Value &value) const |
|
template<> |
double | cast (const Value &value) const |
|
template<> |
int | cast (const Value &value) const |
|
template<> |
vector< double > | cast (const Value &value) const |
|
template<> |
vector< vector< double > > | cast (const Value &value) const |
|
template<> |
Eval::Value | create (const double &v) const |
|
template<> |
Eval::Value | create (const vector< double > &v) const |
|
template<> |
Eval::Value | create (const vector< vector< double > > &v) const |
|
template<> |
Eval::Value | create (const string &v) const |
|
template<> |
CodeString | cast (const Value &value) const |
|
template<> |
double | cast (const Value &value) const |
|
template<> |
int | cast (const Value &value) const |
|
template<> |
Eval::Value | create (const double &v) const |
|
|
| PyEval (std::vector< boost::filesystem::path > *dependencies_=nullptr) |
| Constructor.
|
|
Value | createFunctionIndep (int dim) const override |
| create a function independent variable. If dim == 0 a scalar is created else a vector. More...
|
|
Value | callFunction (const std::string &name, const std::vector< Value > &args) const override |
|
Value | fullStringToValue (const std::string &str, const xercesc::DOMElement *e, bool skipRet=false) const override |
| evaluate the string str using the current parameters and return the result. More...
|
|
| Eval (std::vector< boost::filesystem::path > *dependencies_) |
| Constructor.
|
|
virtual Value | createFunctionIndep (int dim) const =0 |
| create a function independent variable. If dim == 0 a scalar is created else a vector. More...
|
|
virtual Value | createFunctionDep (const std::vector< Value > &v) const =0 |
| create a vector function dependent More...
|
|
virtual Value | createFunctionDep (const std::vector< std::vector< Value > > &v) const =0 |
| create a matrix function dependent More...
|
|
virtual Value | createFunction (const std::vector< Value > &indeps, const Value &dep) const =0 |
| create a Function with n independents and a dependent function (scalar, vector or matrix) More...
|
|
void | pushContext () |
| Push the current context to a internal stack.
|
|
void | popContext () |
| Overwrite the current context with the top level context from the internal stack.
|
|
virtual Value | fullStringToValue (const std::string &str, const xercesc::DOMElement *e, bool skipRet=false) const =0 |
| evaluate the string str using the current parameters and return the result. More...
|
|
std::string | partialStringToString (const std::string &str, const xercesc::DOMElement *e) const |
| evaluate str partially and return result as an std::string
|
|
void | addStaticDependencies (const xercesc::DOMElement *e) const |
|
|
enum | ValueType {
ScalarType
, VectorType
, MatrixType
, StringType
,
FunctionType
} |
|
using | Value = std::shared_ptr< void > |
| Typedef for a shared value.
|
|
static boost::filesystem::path | installPath |
|
template<class E > |
static std::shared_ptr< Eval > | newEvaluator (std::vector< boost::filesystem::path > *dependencies_) |
|
static void | printEvaluatorMsg (const std::ostringstream &str, MsgType msgType) |
|
std::vector< boost::filesystem::path > * | dependencies |
|
std::unordered_map< std::string, Value > | currentParam |
|
std::stack< std::unordered_map< std::string, Value > > | paramStack |
|
std::unordered_map< std::string, Value > | currentImport |
|
std::stack< std::unordered_map< std::string, Value > > | importStack |
|
A evaluator based on python.
See measurementToHtml.xsl for details.