aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2011-02-03 16:55:28 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2011-02-03 16:55:28 +0000
commit487a8e5238038394e28ffbefde385a25db2ea3af (patch)
treebed337a6f5ce6b1908f1e5234abaaf2cb8b59eb4
parent37951dd29e4f89cc5d21707e91ec2b091fd7953a (diff)
downloadopt-utilities-487a8e5238038394e28ffbefde385a25db2ea3af.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@170 ed2142bd-67ad-457f-ba7c-d818d4011675
-rw-r--r--interface/pymodel.hpp7
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();
+ }
};
}