#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_ |
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.
|
default |
void ParameterSource::attach | ( | Parameterizable & | obj | ) |
Definition at line 15 of file Parameterizable.cpp.
|
inline |
Returns a copy of the current variable values
Definition at line 69 of file Parameterizable.h.
std::string ParameterSource::printVariableValues | ( | ) | const |
Definition at line 23 of file Parameterizable.cpp.
void ParameterSource::realize | ( | ) |
Definition at line 37 of file Parameterizable.cpp.
|
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.
|
inline |
Like updateVariable(), accepting several pairs of names-values
Definition at line 57 of file Parameterizable.h.
|
private |
Definition at line 77 of file Parameterizable.h.
|
private |
Definition at line 76 of file Parameterizable.h.