From 487a8e5238038394e28ffbefde385a25db2ea3af Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Thu, 3 Feb 2011 16:55:28 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@170 ed2142bd-67ad-457f-ba7c-d818d4011675 --- interface/pymodel.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'interface') 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(pyfunc(x,args)); } + + const char* do_get_type_name()const + { + return type_name.c_str(); + } }; } -- cgit v1.2.2