KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
kids_param.cc
Go to the documentation of this file.
1py::class_<Param> PyParam(m, "Param", py::dynamic_attr());
2
3py::enum_<Param::LoadOption>(PyParam, "LoadOption")
4 .value("fromString", Param::LoadOption::fromString)
5 .value("fromFile", Param::LoadOption::fromFile)
6 .export_values();
7
8PyParam.def(py::init<const std::string &, Param::LoadOption>());
9
10PyParam.def("has_key", &Param::has_key, py::return_value_policy::reference_internal);
11
12// PyParam.def("get_int", &Param::get<int,true>, py::arg("key") = "", py::arg("loc") = "",
13// py::arg("qdim") = phys::none_d,
14// py::arg("default") = int());
15// PyParam.def("get_real", &Param::get<double,true>, py::arg("key") = "", py::arg("loc") = "",
16// py::arg("qdim") = phys::none_d,
17// py::arg("default") = double());
18// PyParam.def("get_bool", &Param::get<bool,true>, py::arg("key") = "", py::arg("loc") = "",
19// py::arg("qdim") = phys::none_d,
20// py::arg("default") = bool());
21
22// PyParam.def("get_str", &Param::get<std::string,true>, py::arg("key") = "", py::arg("loc") = "",
23// py::arg("qdim") = phys::none_d,
24// py::arg("default") = "");
25
26PyParam.def("__repr__", &Param::repr);
py::class_< Param > PyParam(m, "Param", py::dynamic_attr())