|
qxLib
|
A configuration variable that can be set from different layers (default value, environment variable, command line argument, runtime get()/set()). More...
#include <layered_config_variable.h>
Public Member Functions | |
| constexpr T | get () const noexcept |
| Get variable value. If the variable is not set in any layer or has invalid value, the default value will be returned. More... | |
| constexpr void | set (T value) noexcept |
| Set variable value at runtime. It will override value from all other layers. More... | |
A configuration variable that can be set from different layers (default value, environment variable, command line argument, runtime get()/set()).
Supposed to be created using layered_config_variable_builder and stored as a global variable or constant (in case you don't want to change it at runtime).
| T | - variable type |
Definition at line 31 of file layered_config_variable.h.
|
constexprnoexcept |
Get variable value. If the variable is not set in any layer or has invalid value, the default value will be returned.
| - | variable value |
Definition at line 14 of file layered_config_variable.inl.
|
constexprnoexcept |
Set variable value at runtime. It will override value from all other layers.
| value | - variable value |
Definition at line 21 of file layered_config_variable.inl.