00001 #ifndef VALUEPARAM_H
00002 #define VALUEPARAM_H
00003
00004 #include <string>
00005 #include <boost/python.hpp>
00006
00007 class ValueParam : public eoParam
00008 {
00009 boost::python::object obj;
00010
00011 public:
00012
00013 ValueParam() : eoParam(), obj() {}
00014
00015 ValueParam(boost::python::object o,
00016 std::string longName,
00017 std::string d = "No Description",
00018 char s = 0,
00019 bool r = false) : eoParam(longName, "", d, s, r)
00020 {
00021 std::cerr << "HI" << std::endl;
00022 obj = o;
00023 eoParam::defValue(getValue());
00024 }
00025
00026
00027 std::string getValue() const
00028 {
00029 boost::python::str s = boost::python::str(obj);
00030 return std::string(boost::python::extract<const char*>(s));
00031 }
00032
00033 void setValue(const std::string& v)
00034 {
00035 std::cerr << "not implemented yet" << std::endl;
00036 }
00037
00038 boost::python::object getObj() const { return obj;}
00039 void setObj(boost::python::object o) { obj = o; }
00040
00041 };
00042
00043 #endif