1 #ifndef _MBXMLUTILS_OCTEVAL_H_
2 #define _MBXMLUTILS_OCTEVAL_H_
8 class octave_value_list;
11 namespace XERCES_CPP_NAMESPACE {
class DOMElement; }
13 namespace MBXMLUtils {
15 std::shared_ptr<octave_value> C(
const Eval::Value &value);
17 Eval::Value C(
const octave_value &value);
27 OctEval(std::vector<boost::filesystem::path> *dependencies_=
nullptr);
41 void addImport(
const std::string &code,
const xercesc::DOMElement *e)
override;
47 std::map<boost::filesystem::path, std::pair<boost::filesystem::path, bool> >&
requiredFiles()
const override;
54 Value
fullStringToValue(
const std::string &str,
const xercesc::DOMElement *e=
nullptr)
const override;
57 void*
getSwigThis(
const Value &value)
const override;
60 std::string
getSwigType(
const Value &value)
const override;
64 static octave_value_list fevalThrow(octave_function *func,
const octave_value_list &arg,
int n=0,
65 const std::string &
msg=std::string());
67 Value
callFunction(
const std::string &name,
const std::vector<Value>& args)
const override;
69 double cast_double (
const Value &value)
const override;
70 std::vector<double> cast_vector_double (
const Value &value)
const override;
71 std::vector<std::vector<double> > cast_vector_vector_double(
const Value &value)
const override;
72 std::string cast_string (
const Value &value)
const override;
74 Value create_double (
const double& v)
const override;
75 Value create_vector_double (
const std::vector<double>& v)
const override;
76 Value create_vector_vector_double(
const std::vector<std::vector<double> >& v)
const override;
77 Value create_string (
const std::string& v)
const override;
Value callFunction(const std::string &name, const std::vector< Value > &args) const override
Definition: octeval.cc:554
void * getSwigThis(const Value &value) const override
get the SWIG pointer of this value.
Definition: octeval.cc:479
Value fullStringToValue(const std::string &str, const xercesc::DOMElement *e=nullptr) const override
evaluate str fully and return result as an octave variable
Definition: octeval.cc:344
void convertIndex(Value &v, bool evalTo1Based) override
Definition: octeval.h:49
~OctEval() override
Destructor.
std::string getName() const override
Get the type of this evaluator.
Definition: octeval.h:35
std::string getSwigType(const Value &value) const override
get the SWIG class name of this value.
Definition: octeval.cc:489
std::map< boost::filesystem::path, std::pair< boost::filesystem::path, bool > > & requiredFiles() const override
return a list of all required files of octave (excluding dependent files of libraries) ...
Definition: octeval.cc:498
OctEval(std::vector< boost::filesystem::path > *dependencies_=nullptr)
Constructor.
Definition: octeval.cc:299
bool valueIsOfType(const Value &value, ValueType type) const override
get the type of value
Definition: octeval.cc:430
std::ostream & msg(MsgType type) const
void addImport(const std::string &code, const xercesc::DOMElement *e) override
Definition: octeval.cc:306
Value createSwigByTypeName(const std::string &name) const override
create a SWIG object of name typeName.
Definition: octeval.cc:292
static std::string getNameStatic()
Get the name of this evaluator.
Definition: octeval.h:34
ValueType
Definition: eval.h:84