template<typename Definition>
prf::config::TypedConfigSection class final

Typed facade over ConfigSectionView.

Keeps call sites clean by exposing strongly typed get<Key>() and set<Key>() where keys come from one section definition table.

Public static functions

static auto open(ConfigStore& store, std::string section_name) -> TypedConfigSection
Opens section by name using Definition::schema(name).

Constructors, destructors, conversion operators

TypedConfigSection(ConfigSectionView view) explicit
Binds facade to an already opened raw view.

Public functions

auto commit() -> bool
Persists section if dirty.
template<typename Key>
auto get() const -> Key::value_type
Reads one typed key and returns effective value.
template<typename Key>
auto get(typename Key::value_type*const out) const -> bool
Reads one typed key defined by section schema.
auto raw_view() -> ConfigSectionView&
Returns mutable underlying raw view for advanced access.
auto raw_view() const -> const ConfigSectionView&
Returns underlying raw view for advanced access.
template<typename Key>
auto set(const typename Key::value_type& value) -> bool
Writes one typed key defined by section schema.
auto valid() const -> bool
Returns true when underlying raw view is valid.

Function documentation

template<typename Definition> template<typename Key>
Key::value_type prf::config::TypedConfigSection<Definition>::get() const

Reads one typed key and returns effective value.

Missing persisted values automatically fall back to key default. Invalid key/type also returns key default.