42 constexpr T
get()
const noexcept;
48 constexpr
void set(T value) noexcept;
55 cstring_view m_svRuntimeName;
91 cstring_view svFullName,
92 cstring_view svShortName = {}) noexcept;
122 cstring_view m_svRuntimeName;
A builder for creating layered_config_variable instances.
consteval layered_config_variable_builder env(cstring_view svEnvName) noexcept
Add environment variable layer with specified name.
consteval layered_config_variable_builder group(cstring_view svGroupName) noexcept
Set the group name for the variable.
layered_config_variable< T > build() noexcept
Finalize building layered_config_variable instance and add it to layered_configs_manager.
consteval layered_config_variable_builder description(cstring_view svDescription) noexcept
Set the description for the variable.
consteval layered_config_variable_builder required() noexcept
Mark variable as required. If a required variable is not set in any layer or has invalid value,...
consteval layered_config_variable_builder(cstring_view svRuntimeName, T defaultValue={}) noexcept
layered_config_variable_builder object constructor
consteval layered_config_variable_builder command_line(cstring_view svFullName, cstring_view svShortName={}) noexcept
Add command line argument layer with specified full and short names. Full name should start with "--"...
A configuration variable that can be set from different layers (default value, environment variable,...
constexpr void set(T value) noexcept
Set variable value at runtime. It will override value from all other layers.
constexpr T get() const noexcept
Get variable value. If the variable is not set in any layer or has invalid value, the default value w...