#include <Parameterizable.h>
Public Member Functions | |
ParameterSource * | attachedSource () |
const ParameterSource * | attachedSource () const |
virtual void | attachToParameterSource (ParameterSource &source) |
void | checkAllParametersAreRealized () const |
auto & | declaredParameters () |
const auto & | declaredParameters () const |
void | unrealizeParameters () |
Mark all non-constant parameters as non-evaluated again. More... | |
Protected Member Functions | |
void | parseAndDeclareParameter (const std::string &value, double &target) |
void | parseAndDeclareParameter (const std::string &value, float &target) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | parseAndDeclareParameter (const std::string &value, uint32_t &target) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Private Member Functions | |
template<typename T > | |
void | parseAndDeclareParameter_impl (const std::string &value, T &target) |
Private Attributes | |
ParameterSource * | attachedSource_ = nullptr |
std::vector< internal::InfoPerParam > | declParameters_ |
List of declared parameters: More... | |
Friends | |
class | ParameterSource |
Common base for classes allowing dynamic parameters as given by formulas, possibly as functions of externally-provided variables.
Definition at line 85 of file Parameterizable.h.
|
inline |
Definition at line 101 of file Parameterizable.h.
|
inline |
Definition at line 102 of file Parameterizable.h.
|
inlinevirtual |
Each parameterizable object can be attached to one source at a given time
Reimplemented in mp2p_icp::QualityEvaluator_PairedRatio.
Definition at line 93 of file Parameterizable.h.
void Parameterizable::checkAllParametersAreRealized | ( | ) | const |
Throws if any parameter is uninitialized or realized() has not been called in the attached ParameterSource. All parameters can be reset so realize() needs to be called again by manually calling unrealizeParameters().
Definition at line 138 of file Parameterizable.cpp.
|
inline |
Definition at line 98 of file Parameterizable.h.
|
inline |
Definition at line 99 of file Parameterizable.h.
|
protected |
To be called at initialization by derived classes that read a parameter from a YAML or any other text source. If the text does not contain any undefined variable, it will be evaluated straight away into target
. Otherwise, its value will be left to the moment this object is attached to a ParameterSource and the user calls ParameterSource::realize().
Definition at line 120 of file Parameterizable.cpp.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 126 of file Parameterizable.cpp.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 132 of file Parameterizable.cpp.
|
private |
Definition at line 90 of file Parameterizable.cpp.
void Parameterizable::unrealizeParameters | ( | ) |
Mark all non-constant parameters as non-evaluated again.
Definition at line 157 of file Parameterizable.cpp.
|
friend |
Definition at line 87 of file Parameterizable.h.
|
private |
Definition at line 132 of file Parameterizable.h.
|
private |
List of declared parameters:
Definition at line 131 of file Parameterizable.h.