5 namespace pointmatchersupport
10 py::class_<Parametrizable, std::shared_ptr<Parametrizable>> pyParametrizable(p_module,
"Parametrizable");
12 pyParametrizable.doc() = R
"pbdoc( 13 The superclass of classes that are constructed using generic parameters. 14 This class provides the parameter storage and fetching mechanism 18 py::register_exception<InvalidParameter>(pyParametrizable,
"InvalidParameter");
20 py::class_<ParameterDoc>(pyParametrizable,
"ParameterDoc",
"The documentation of a parameter")
28 .def(py::init<const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, Parametrizable::LexicalComparison>(), py::arg(
"name"), py::arg(
"doc"), py::arg(
"defaultValue"), py::arg(
"minValue"), py::arg(
"maxValue"), py::arg(
"comp"))
29 .def(py::init<const std::string&, const std::string&, const std::string&>(), py::arg(
"name"), py::arg(
"doc"), py::arg(
"defaultValue"))
33 std::ostringstream oss;
39 py::bind_vector<ParametersDoc>(pyParametrizable,
"ParametersDoc",
"The documentation of all parameters");
42 py::bind_map<Parameters>(pyParametrizable,
"Parameters",
"The documentation of all parameters", py::module_local())
43 .def(
"clear", &Parameters::clear,
"Remove all items from D.");
51 .def(py::init<const std::string&, const ParametersDoc, Parameters&>(), py::arg(
"className"), py::arg(
"paramsDoc"), py::arg(
"params"))
56 std::ostringstream oss;
63 std::ostringstream oss;
void pybindParametrizable(py::module &p_module)
ParametersUsed parametersUsed
parameters whose value has actually been read
PointMatcherSupport::Parametrizable Parametrizable
std::string minValue
if bounds are checked, minimum value
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
PointMatcherSupport::Parametrizable::ParametersDoc ParametersDoc
PM::Parameters Parameters
std::string maxValue
if bounds are checked, maxmimu value
Parameters parameters
parameters with their values encoded in string
The documentation of a parameter.
The superclass of classes that are constructed using generic parameters. This class provides the para...
An exception thrown when one tries to fetch the value of an unexisting parameter. ...
std::string getParamValueString(const std::string ¶mName)
Get the value of a parameter, as a string.
std::vector< ParameterDoc > ParametersDoc
The documentation of all parameters.
std::string defaultValue
default value
const std::string className
name of the class
Parametrizable::InvalidParameter InvalidParameter
std::string doc
short documentation
const ParametersDoc parametersDoc
documentation of parameters