7 #ifndef PARAM_VALUE_PYBIND_HH_ 8 #define PARAM_VALUE_PYBIND_HH_ 19 std::list< std::string > all_members;
22 all_members.push_back(
"ParamValue" );
25 .def( pybind11::init< bool >() )
26 .def( pybind11::init< unsigned >() )
27 .def( pybind11::init< int >() )
28 .def( pybind11::init< double >() )
29 .def( pybind11::init< const std::string& >() )
30 .def( pybind11::init< const char* >() )
34 .
def(
"__eq__", &scarab::param_value::operator== )
39 "Return whether the param_value stores a boolean value" )
41 "Return whether the param_value stores an unsigned integer value" )
43 "Return whether the param_value stores a signed integer value" )
45 "Return whether the param_value stores a double value" )
47 "Return whether the param_value stores a string value" )
51 "Get parameter value as a bool" )
53 "Get parameter value as an unsigned integer" )
55 "Get parameter value as a signed integer" )
57 "Get parameter value as a float" )
59 "Get parameter value as a string" )
65 .
def(
"set",&scarab::param_value::set<uint64_t>,
66 "Set an unsigned integer value")
68 .
def(
"set", &scarab::param_value::set<int64_t>,
69 "Set a signed integer value")
71 "Set an float value" )
73 "Set an string value" )
Wrapper for Python extension modules.
virtual std::string to_string() const
void set(XValType a_value)
std::list< std::string > export_param_value(pybind11::module &mod)
std::string as_string() const
bool typename Extra class_ & def(const char *name_, Func &&f, const Extra &... extra)