Class IniFileWithOverrides¶
Defined in File live_config_ini_file_with_overrides.h
Inheritance Relationships¶
Base Type¶
public miral::live_config::Store(Class Store)
Class Documentation¶
-
class IniFileWithOverrides : public miral::live_config::Store¶
An ini-file-based live configuration store that aggregates values from multiple files (a base config plus zero or more override files).
Non-array keys follow last-writer-wins semantics: if the same key appears in a later (higher-priority) file, it replaces the earlier value.
Array keys accumulate across files; an empty assignment (
key=) in a later file clears all previously accumulated values from earlier files.A single call to load() wraps the entire set of files in one transaction, so all attribute handlers and
on_donefire exactly once per call.Remark
Since MirAL 5.8
Public Functions
-
IniFileWithOverrides()¶
-
~IniFileWithOverrides() override¶
-
IniFileWithOverrides(IniFileWithOverrides const&) = delete¶
-
IniFileWithOverrides &operator=(IniFileWithOverrides const&) = delete¶
-
virtual void add_int_attribute(Key const &key, std::string_view description, HandleInt handler) override¶
-
virtual void add_ints_attribute(Key const &key, std::string_view description, HandleInts handler) override¶
-
virtual void add_bool_attribute(Key const &key, std::string_view description, HandleBool handler) override¶
-
virtual void add_float_attribute(Key const &key, std::string_view description, HandleFloat handler) override¶
-
virtual void add_floats_attribute(Key const &key, std::string_view description, HandleFloats handler) override¶
-
virtual void add_string_attribute(Key const &key, std::string_view description, HandleString handler) override¶
-
virtual void add_strings_attribute(Key const &key, std::string_view description, HandleStrings handler) override¶
-
virtual void add_int_attribute(Key const &key, std::string_view description, int preset, HandleInt handler) override¶
-
virtual void add_ints_attribute(Key const &key, std::string_view description, std::span<int const> preset, HandleInts handler) override¶
-
virtual void add_bool_attribute(Key const &key, std::string_view description, bool preset, HandleBool handler) override¶
-
virtual void add_float_attribute(Key const &key, std::string_view description, float preset, HandleFloat handler) override¶
-
virtual void add_floats_attribute(Key const &key, std::string_view description, std::span<float const> preset, HandleFloats handler) override¶
-
virtual void add_string_attribute(Key const &key, std::string_view description, std::string_view preset, HandleString handler) override¶
-
virtual void add_strings_attribute(Key const &key, std::string_view description, std::span<std::string const> preset, HandleStrings handler) override¶
-
virtual void on_done(HandleDone handler) override¶
Called following a set of related updates (e.g. a file reload) to allow multiple attributes to be updated transactionally.
-
void load(OverridesList const &changes)¶
Parse a batch of file-system events and dispatch all handlers once.
on_donefires exactly once per call.Remark
Since MirAL 5.8
-
IniFileWithOverrides()¶