diff options
Diffstat (limited to 'interface')
-rw-r--r-- | interface/pymodel.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/interface/pymodel.hpp b/interface/pymodel.hpp index 729840c..8a55839 100644 --- a/interface/pymodel.hpp +++ b/interface/pymodel.hpp @@ -22,6 +22,7 @@ namespace opt_utilities { private: boost::python::object pyfunc; + std::string type_name; public: pymodel() { @@ -63,6 +64,7 @@ namespace opt_utilities const std::string arg_value, const std::string func_name) { + type_name=module_name+"."+func_name; this->clear_param_info(); boost::python::object mod(boost::python::import(module_name.c_str())); pyfunc=mod.attr(func_name.c_str()); @@ -100,6 +102,11 @@ namespace opt_utilities } return boost::python::extract<Ty>(pyfunc(x,args)); } + + const char* do_get_type_name()const + { + return type_name.c_str(); + } }; } |