1 #ifndef _MBXMLUTILS_OCTEVAL_H_
2 #define _MBXMLUTILS_OCTEVAL_H_
5 #include <boost/scoped_ptr.hpp>
6 #include <boost/shared_ptr.hpp>
7 #include <boost/make_shared.hpp>
10 class octave_value_list;
11 class octave_function;
13 namespace XERCES_CPP_NAMESPACE {
class DOMElement; }
15 namespace MBXMLUtils {
17 boost::shared_ptr<octave_value> C(
const boost::shared_ptr<void> &value);
19 boost::shared_ptr<void> C(
const octave_value &value);
29 OctEval(std::vector<boost::filesystem::path> *dependencies_=NULL);
43 void addImport(
const std::string &code,
const xercesc::DOMElement *e,
bool deprecated=
false);
49 std::map<boost::filesystem::path, std::pair<boost::filesystem::path, bool> >&
requiredFiles()
const;
56 virtual boost::shared_ptr<void>
fullStringToValue(
const std::string &str,
const xercesc::DOMElement *e=NULL)
const;
59 void*
getSwigThis(
const boost::shared_ptr<void> &value)
const;
62 std::string
getSwigType(
const boost::shared_ptr<void> &value)
const;
66 static octave_value_list fevalThrow(octave_function *func,
const octave_value_list &arg,
int n=0,
67 const std::string &
msg=std::string());
69 virtual boost::shared_ptr<void>
callFunction(
const std::string &name,
const std::vector<boost::shared_ptr<void> >& args)
const;
71 virtual double cast_double (
const boost::shared_ptr<void> &value)
const;
72 virtual std::vector<double> cast_vector_double (
const boost::shared_ptr<void> &value)
const;
73 virtual std::vector<std::vector<double> > cast_vector_vector_double(
const boost::shared_ptr<void> &value)
const;
74 virtual std::string cast_string (
const boost::shared_ptr<void> &value)
const;
76 virtual boost::shared_ptr<void> create_double (
const double& v)
const;
77 virtual boost::shared_ptr<void> create_vector_double (
const std::vector<double>& v)
const;
78 virtual boost::shared_ptr<void> create_vector_vector_double(
const std::vector<std::vector<double> >& v)
const;
79 virtual boost::shared_ptr<void> create_string (
const std::string& v)
const;
void addImport(const std::string &code, const xercesc::DOMElement *e, bool deprecated=false)
Definition: octeval.cc:312
bool valueIsOfType(const boost::shared_ptr< void > &value, ValueType type) const
get the type of value
Definition: octeval.cc:436
OctEval(std::vector< boost::filesystem::path > *dependencies_=NULL)
Constructor.
Definition: octeval.cc:304
virtual bool useOneBasedIndexes()
Return true if the evaluator used one based indexes or false if zero based indexes are used...
Definition: octeval.h:51
void * getSwigThis(const boost::shared_ptr< void > &value) const
get the SWIG pointer of this value.
Definition: octeval.cc:487
boost::shared_ptr< void > createSwigByTypeName(const std::string &typeName) const
create a SWIG object of name typeName.
Definition: octeval.cc:297
std::ostream & msg(MsgType type)
std::map< boost::filesystem::path, std::pair< boost::filesystem::path, bool > > & requiredFiles() const
return a list of all required files of octave (excluding dependent files of libraries) ...
Definition: octeval.cc:506
~OctEval()
Destructor.
Definition: octeval.cc:309
virtual boost::shared_ptr< void > callFunction(const std::string &name, const std::vector< boost::shared_ptr< void > > &args) const
Definition: octeval.cc:563
virtual boost::shared_ptr< void > fullStringToValue(const std::string &str, const xercesc::DOMElement *e=NULL) const
evaluate str fully and return result as an octave variable
Definition: octeval.cc:353
std::string getSwigType(const boost::shared_ptr< void > &value) const
get the SWIG class name of this value.
Definition: octeval.cc:497
std::string getName() const
Get the type of this evaluator.
Definition: octeval.h:37
static std::string getNameStatic()
Get the name of this evaluator.
Definition: octeval.h:36
ValueType
Definition: eval.h:83