ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
Maintains the associativity of configuration attributes with metadata and value origin/priority. More...
#include <manager.hpp>
Classes | |
struct | CiiValue |
CII representation of real value. More... | |
struct | CurrentValue |
Describes current value. More... | |
Public Member Functions | |
Manager (log4cplus::Logger const &logger) | |
Constructor. More... | |
template<class AttrType > | |
void | Register (AttrType *ptr, Metadata const &meta) |
Registers a configuration parameter/attribute. More... | |
template<class AttrType , class Converter > | |
void | Register (AttrType *ptr, Metadata const &meta, Converter &&c) |
template<class AttrType , class T > | |
bool | Update (AttrType *ptr, T const &value, OriginInfo const &origin) |
Update configuration value taking into account the origin of the change. More... | |
template<class AttrType > | |
CurrentValue< AttrType > | Get (AttrType *ptr) const |
Get current configuration value and associated metadata and origin. More... | |
template<class Func > | |
void | Visit (Func &&func) |
Visit each registered parameter. More... | |
template<class AttrType > | |
Manager::template CurrentValue< AttrType > | Get (AttrType *ptr) const |
Maintains the associativity of configuration attributes with metadata and value origin/priority.
Main responsibilities:
Outside the scope:
Manager works on the following assumptions and principles:
Definition at line 148 of file manager.hpp.
struct daq::config::Manager::CiiValue |
CII representation of real value.
Definition at line 196 of file manager.hpp.
Class Members | ||
---|---|---|
Metadata const & | metadata | |
OriginInfo const & | origin | |
OldbType | value |
struct daq::config::Manager::CurrentValue |
Describes current value.
Definition at line 187 of file manager.hpp.
Class Members | ||
---|---|---|
Metadata const & | metadata | |
OriginInfo const & | origin | |
AttrType const & | value |
|
inline |
CurrentValue<AttrType> daq::config::Manager::Get | ( | AttrType * | ptr | ) | const |
Get current configuration value and associated metadata and origin.
ptr | Configuration member pointer. |
std::exception | if configuration is unknown. |
Manager::template CurrentValue<AttrType> daq::config::Manager::Get | ( | AttrType * | ptr | ) | const |
Definition at line 268 of file manager.hpp.
void daq::config::Manager::Register | ( | AttrType * | ptr, |
Metadata const & | meta | ||
) |
Registers a configuration parameter/attribute.
ptr | Configuration value pointer. |
meta | Metadata associated with attribute. |
std::exception | if ptr has already been registered before or if allocation fails. |
Definition at line 238 of file manager.hpp.
void daq::config::Manager::Register | ( | AttrType * | ptr, |
Metadata const & | meta, | ||
Converter && | c | ||
) |
Definition at line 255 of file manager.hpp.
bool daq::config::Manager::Update | ( | AttrType * | ptr, |
T const & | value, | ||
OriginInfo const & | origin | ||
) |
Update configuration value taking into account the origin of the change.
ptr | Configuration value pointer. |
value | new configuration value. |
origin | Specifies origin of configuration value. |
std::exception | if configuration member has not been registered before. |
Definition at line 280 of file manager.hpp.
|
inline |
Visit each registered parameter.
Func | Callable invocable with func(cii_value) where cii_value is const-reference CiiValue. |
Definition at line 217 of file manager.hpp.