Public Member Functions | Private Attributes | List of all members
mp2p_icp::ParameterSource Class Reference

#include <Parameterizable.h>

Public Member Functions

void attach (Parameterizable &obj)
 
auto getVariableValues () const -> std::map< std::string, double >
 
 ParameterSource ()=default
 
std::string printVariableValues () const
 
void realize ()
 
void updateVariable (const std::string &variable, double value)
 
void updateVariables (const std::vector< std::pair< std::string, double >> &nameValuePairs)
 

Private Attributes

std::set< internal::InfoPerParam * > attachedDeclParameters_
 
std::map< std::string, double > variables_
 

Detailed Description

Users of derived classes must declare an instance of this type, then attach instances of derived classes to it, then optionally update variables via updateVariable(), then call realize() for the changes to take effect.

Definition at line 42 of file Parameterizable.h.

Constructor & Destructor Documentation

◆ ParameterSource()

mp2p_icp::ParameterSource::ParameterSource ( )
default

Member Function Documentation

◆ attach()

void ParameterSource::attach ( Parameterizable obj)

Definition at line 15 of file Parameterizable.cpp.

◆ getVariableValues()

auto mp2p_icp::ParameterSource::getVariableValues ( ) const -> std::map<std::string, double>
inline

Returns a copy of the current variable values

Definition at line 69 of file Parameterizable.h.

◆ printVariableValues()

std::string ParameterSource::printVariableValues ( ) const

Definition at line 23 of file Parameterizable.cpp.

◆ realize()

void ParameterSource::realize ( )

Definition at line 37 of file Parameterizable.cpp.

◆ updateVariable()

void mp2p_icp::ParameterSource::updateVariable ( const std::string &  variable,
double  value 
)
inline

Updates a variable value. Remember to call realize() after updating all variables for the changes to take effect

Definition at line 51 of file Parameterizable.h.

◆ updateVariables()

void mp2p_icp::ParameterSource::updateVariables ( const std::vector< std::pair< std::string, double >> &  nameValuePairs)
inline

Like updateVariable(), accepting several pairs of names-values

Definition at line 57 of file Parameterizable.h.

Member Data Documentation

◆ attachedDeclParameters_

std::set<internal::InfoPerParam*> mp2p_icp::ParameterSource::attachedDeclParameters_
private

Definition at line 77 of file Parameterizable.h.

◆ variables_

std::map<std::string, double> mp2p_icp::ParameterSource::variables_
private

Definition at line 76 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