Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
mp2p_icp::Parameterizable Class Reference

#include <Parameterizable.h>

Inheritance diagram for mp2p_icp::Parameterizable:
Inheritance graph
[legend]

Public Member Functions

ParameterSourceattachedSource ()
 
const ParameterSourceattachedSource () 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

ParameterSourceattachedSource_ = nullptr
 
std::vector< internal::InfoPerParamdeclParameters_
 List of declared parameters: More...
 

Friends

class ParameterSource
 

Detailed Description

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.

Member Function Documentation

◆ attachedSource() [1/2]

ParameterSource* mp2p_icp::Parameterizable::attachedSource ( )
inline

Definition at line 101 of file Parameterizable.h.

◆ attachedSource() [2/2]

const ParameterSource* mp2p_icp::Parameterizable::attachedSource ( ) const
inline

Definition at line 102 of file Parameterizable.h.

◆ attachToParameterSource()

virtual void mp2p_icp::Parameterizable::attachToParameterSource ( ParameterSource source)
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.

◆ checkAllParametersAreRealized()

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.

◆ declaredParameters() [1/2]

auto& mp2p_icp::Parameterizable::declaredParameters ( )
inline

Definition at line 98 of file Parameterizable.h.

◆ declaredParameters() [2/2]

const auto& mp2p_icp::Parameterizable::declaredParameters ( ) const
inline

Definition at line 99 of file Parameterizable.h.

◆ parseAndDeclareParameter() [1/3]

void Parameterizable::parseAndDeclareParameter ( const std::string &  value,
double &  target 
)
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.

◆ parseAndDeclareParameter() [2/3]

void Parameterizable::parseAndDeclareParameter ( const std::string &  value,
float &  target 
)
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.

◆ parseAndDeclareParameter() [3/3]

void Parameterizable::parseAndDeclareParameter ( const std::string &  value,
uint32_t &  target 
)
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.

◆ parseAndDeclareParameter_impl()

template<typename T >
void Parameterizable::parseAndDeclareParameter_impl ( const std::string &  value,
T &  target 
)
private

Definition at line 90 of file Parameterizable.cpp.

◆ unrealizeParameters()

void Parameterizable::unrealizeParameters ( )

Mark all non-constant parameters as non-evaluated again.

Definition at line 157 of file Parameterizable.cpp.

Friends And Related Function Documentation

◆ ParameterSource

friend class ParameterSource
friend

Definition at line 87 of file Parameterizable.h.

Member Data Documentation

◆ attachedSource_

ParameterSource* mp2p_icp::Parameterizable::attachedSource_ = nullptr
private

Definition at line 132 of file Parameterizable.h.

◆ declParameters_

std::vector<internal::InfoPerParam> mp2p_icp::Parameterizable::declParameters_
private

List of declared parameters:

Definition at line 131 of file Parameterizable.h.


The documentation for this class was generated from the following files:


mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:46:01