22#include "util/newconfig/ValueView.hpp"
30namespace util::config {
32class ClioConfigDefinition;
86 get(std::string_view key)
const
123 getArray(std::string_view key)
const;
132 [[nodiscard]] std::string
133 getFullKey(std::string_view key)
const;
142 startsWithKey(std::string_view key)
const;
145 std::optional<size_t> arrayIndex_;
146 std::reference_wrapper<ClioConfigDefinition const> clioConfig_;
View for array structure for config.
Definition ArrayView.hpp:42
All the config data will be stored and extracted from this class.
Definition ConfigDefinition.hpp:54
Provides a view into a subset of configuration data defined by a prefix.
Definition ObjectView.hpp:40
ObjectView getObject(std::string_view key) const
Retrieves an ObjectView in ClioConfigDefinition with key that starts with prefix_....
Definition ObjectView.cpp:64
ValueView getValueView(std::string_view key) const
Retrieves the value associated with the specified prefix._key in ClioConfigDefinition.
Definition ObjectView.cpp:54
ArrayView getArray(std::string_view key) const
Retrieves an ArrayView in ClioConfigDefinition with key that starts with prefix_.key....
Definition ObjectView.cpp:78
bool containsKey(std::string_view key) const
Checks if prefix_.key (fullkey) exists in ClioConfigDefinition.
Definition ObjectView.cpp:48
std::optional< T > maybeValue(std::string_view key) const
Returns the specified value of given string of type T if type and value exists.
Definition ObjectView.hpp:100
T get(std::string_view key) const
Returns the specified value of given string if value exists.
Definition ObjectView.hpp:86
ObjectView(std::string_view prefix, ClioConfigDefinition const &clioConfig)
Constructs an ObjectView for the specified prefix. The view must be of type object.
Definition ObjectView.cpp:37
Provides view into ConfigValues that represents values in Clio Config.
Definition ValueView.hpp:46
T getValueImpl() const
Retrieves the stored value as the specified type T.
Definition ValueView.hpp:165
std::optional< T > asOptional() const
Returns an optional value of the specified type T if valid.
Definition ValueView.hpp:193