1 #ifndef _MBXMLUTILS_PYEVAL_H_
2 #define _MBXMLUTILS_PYEVAL_H_
5 #include "py2py3cppwrapper.h"
15 PyEval(std::vector<boost::filesystem::path> *dependencies_=
nullptr);
19 static std::string getNameStatic() {
return "python"; }
20 std::string
getName()
const override {
return getNameStatic(); }
21 void addImport(
const std::string &code,
const xercesc::DOMElement *e)
override;
23 std::map<boost::filesystem::path, std::pair<boost::filesystem::path, bool> >&
requiredFiles()
const override;
27 Value
callFunction(
const std::string &name,
const std::vector<Value>& args)
const override;
28 Value
fullStringToValue(
const std::string &str,
const xercesc::DOMElement *e=
nullptr)
const override;
29 void*
getSwigThis(
const Value &value)
const override;
30 std::string
getSwigType(
const Value &value)
const override;
32 double cast_double (
const Value &value)
const override;
33 std::vector<double> cast_vector_double (
const Value &value)
const override;
34 std::vector<std::vector<double> >cast_vector_vector_double (
const Value &value)
const override;
35 std::string cast_string (
const Value &value)
const override;
36 Value create_double (
const double& v)
const override;
37 Value create_vector_double (
const std::vector<double>& v)
const override;
38 Value create_vector_vector_double(
const std::vector<std::vector<double> >& v)
const override;
39 Value create_string (
const std::string& v)
const override;
std::string getSwigType(const Value &value) const override
Definition: pyeval.cc:388
~PyEval() override
Destructor.
Value createSwigByTypeName(const std::string &typeName) const override
create a SWIG object of name typeName.
Definition: pyeval.cc:269
void addImport(const std::string &code, const xercesc::DOMElement *e) override
Definition: pyeval.cc:136
Value fullStringToValue(const std::string &str, const xercesc::DOMElement *e=nullptr) const override
evaluate the string str using the current parameters and return the result.
Definition: pyeval.cc:286
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) ...
Definition: pyeval.cc:222
PyEval(std::vector< boost::filesystem::path > *dependencies_=nullptr)
Constructor.
Definition: pyeval.cc:129
A evaluator based on python.
Definition: pyeval.h:10
void convertIndex(Value &v, bool evalTo1Base) override
Definition: pyeval.cc:467
std::string getName() const override
Get the type of this evaluator.
Definition: pyeval.h:20
bool valueIsOfType(const Value &value, ValueType type) const override
Definition: pyeval.cc:194
Value callFunction(const std::string &name, const std::vector< Value > &args) const override
Definition: pyeval.cc:273
void * getSwigThis(const Value &value) const override
get the SWIG pointer of this value.
Definition: pyeval.cc:596
ValueType
Definition: eval.h:84