1 #ifndef _MBXMLUTILS_PYEVAL_H_
2 #define _MBXMLUTILS_PYEVAL_H_
5 #include "py2py3cppwrapper.h"
15 PyEval(std::vector<boost::filesystem::path> *dependencies_=NULL);
19 static std::string getNameStatic() {
return "python"; }
20 virtual std::string
getName()
const {
return getNameStatic(); }
21 virtual void addImport(
const std::string &code,
const xercesc::DOMElement *e,
bool deprecated=
false);
23 virtual std::map<boost::filesystem::path, std::pair<boost::filesystem::path, bool> >&
requiredFiles()
const;
27 virtual boost::shared_ptr<void>
callFunction(
const std::string &name,
const std::vector<boost::shared_ptr<void> >& args)
const;
28 virtual boost::shared_ptr<void>
fullStringToValue(
const std::string &str,
const xercesc::DOMElement *e=NULL)
const;
29 virtual void*
getSwigThis(
const boost::shared_ptr<void> &value)
const;
30 virtual std::string
getSwigType(
const boost::shared_ptr<void> &value)
const;
32 virtual double cast_double (
const boost::shared_ptr<void> &value)
const;
33 virtual std::vector<double> cast_vector_double (
const boost::shared_ptr<void> &value)
const;
34 virtual std::vector<std::vector<double> >cast_vector_vector_double (
const boost::shared_ptr<void> &value)
const;
35 virtual std::string cast_string (
const boost::shared_ptr<void> &value)
const;
36 virtual boost::shared_ptr<void> create_double (
const double& v)
const;
37 virtual boost::shared_ptr<void> create_vector_double (
const std::vector<double>& v)
const;
38 virtual boost::shared_ptr<void> create_vector_vector_double(
const std::vector<std::vector<double> >& v)
const;
39 virtual boost::shared_ptr<void> create_string (
const std::string& v)
const;
virtual void * getSwigThis(const boost::shared_ptr< void > &value) const
get the SWIG pointer of this value.
Definition: pyeval.cc:432
PyEval(std::vector< boost::filesystem::path > *dependencies_=NULL)
Constructor.
Definition: pyeval.cc:107
virtual std::string getSwigType(const boost::shared_ptr< void > &value) const
get the SWIG type (class name) of this value.
Definition: pyeval.cc:266
A evaluator based on python.
Definition: pyeval.h:10
virtual boost::shared_ptr< void > fullStringToValue(const std::string &str, const xercesc::DOMElement *e=NULL) const
evaluate the string str using the current parameters and return the result.
Definition: pyeval.cc:176
virtual bool valueIsOfType(const boost::shared_ptr< void > &value, ValueType type) const
Definition: pyeval.cc:142
virtual bool useOneBasedIndexes()
Return true if the evaluator used one based indexes or false if zero based indexes are used...
Definition: pyeval.h:24
~PyEval()
Destructor.
Definition: pyeval.cc:112
virtual std::string getName() const
Get the type of this evaluator.
Definition: pyeval.h:20
virtual std::map< boost::filesystem::path, std::pair< boost::filesystem::path, bool > > & requiredFiles() const
return a list of all required files of the evaluator (excluding dependent files of libraries) ...
Definition: pyeval.cc:154
virtual boost::shared_ptr< void > createSwigByTypeName(const std::string &typeName) const
create a SWIG object of name typeName.
Definition: pyeval.cc:159
virtual void addImport(const std::string &code, const xercesc::DOMElement *e, bool deprecated=false)
Definition: pyeval.cc:115
virtual boost::shared_ptr< void > callFunction(const std::string &name, const std::vector< boost::shared_ptr< void > > &args) const
Definition: pyeval.cc:163
ValueType
Definition: eval.h:83