carl
24.04
Computer ARithmetic Library
|
Base class for central settings class. More...
#include <Settings.h>
Public Member Functions | |
template<typename T > | |
T & | get (const std::string &name) |
Get settings data of type T from the identifier name . Constructs the data object if it does not exist yet. More... | |
Private Attributes | |
std::map< std::string, std::any > | mSettings |
Maps identifier to any object holding the actual settings data. More... | |
Base class for central settings class.
Wraps a map from a string identifier to some struct holding the actual settings, wrapped as std::any
. Simply call .get<SettingsData>("identifier")
to obtain a reference to the settings data, which is created (and thereby initialized) lazily.
Definition at line 17 of file Settings.h.
|
inline |
Get settings data of type T
from the identifier name
. Constructs the data object if it does not exist yet.
Definition at line 24 of file Settings.h.
|
private |
Maps identifier to any object holding the actual settings data.
Definition at line 20 of file Settings.h.