← API Reference Class

asge::config::ConfigurationManager

#include <ConfigurationManager.hpp>

Private Types

#using table_pointer_t = toml::table_pointerprivate

Private Attributes

#filesystem::Path m_ConfigPathprivate
#filesystem::FileWatcher m_FileWatcherprivate
#filesystem::WatcherHandler m_WatcherConnectionprivate
#table_pointer_t m_Configuration { nullptr }private
#std::atomic< bool > m_HotReloadEnabled { false }private
#mutable std::mutex m_ConfigMutexprivate

Private Member Functions

#BoolResult ReadConfiguration(filesystem::Path const &inPath)private
#void HotReloadHelper(filesystem::FileEvent const &inEvent)private
#BoolResult EnableHotReloadWatch(filesystem::Path const &inPath)private

Public Member Functions

#ConfigurationManager(concurrent::context_pointer inCtx=nullptr)
#~ConfigurationManager()
#BoolResult Load(filesystem::Path const &confPath)
#BoolResult SetHotReloadEnabled(bool inEnabled)
#bool IsHotReloadEnabled() const noexcept
#template<typename T> Result< T > Get(std::string const &inParamPath) const
#template<typename T> BoolResult Set(std::string const &inParamPath, T inValue)

Overwrites the value of an already-existing key, preserving its original TOML formatting.

Fails if the path doesn't already resolve to an existing key (no auto-vivification).