7 #if !defined(STACKEVALUATOR_HPP)
8 #define STACKEVALUATOR_HPP
13 #include <boost/function.hpp>
14 #include <boost/assert.hpp>
15 #include <boost/variant/get.hpp>
16 #include <boost/variant/variant.hpp>
17 #include <boost/phoenix/core.hpp>
18 #include <boost/phoenix/function.hpp>
19 #include <boost/phoenix/operator.hpp>
25 namespace client {
namespace code_gen
31 template <
typename ErrorHandler>
34 namespace phx = boost::phoenix;
38 (std::string(
"Error! "),
40 phx::cref(error_handler_.iters)[phx::arg_names::_1]);
46 double result = boost::get<double>(res);
57 std::map<std::string, client::function::type> functions) {
58 functions_.insert(functions.begin(), functions.end());
62 std::map<std::string, double> variableDictionary) {
83 std::map<std::string, client::function::type>
functions_;
boost::variant< double, bool, std::string > argument_t
boost::function< boost::tuple< double, bool >arguments_t)> type
std::vector< argument_t > arguments_t
boost::function< void(int tag, std::string const &what)> error_handler
std::map< std::string, client::function::type > functions_
double function(PyOpalObjectNS::PyOpalObject< C > pyobject, double t)
void registerFunctions(std::map< std::string, client::function::type > functions)
void registerVariables(std::map< std::string, double > variableDictionary)
std::pair< std::string, type > named_t
bool operator()(ast::nil)
StackEvaluator(ErrorHandler &error_handler_)
void registerFunction(std::string name, client::function::type callback)
client::function::arguments_t evaluation_stack_
std::map< std::string, double > variableDictionary_