22#include "util/newconfig/ConfigValue.hpp"
23#include "util/newconfig/Error.hpp"
24#include "util/newconfig/Types.hpp"
32namespace util::config {
58 static std::string_view
59 prefix(std::string_view key);
69 addValue(Value value, std::optional<std::string_view> key = std::nullopt);
86 at(std::size_t idx)
const;
102 [[nodiscard]] std::vector<ConfigValue>::const_iterator
110 [[nodiscard]] std::vector<ConfigValue>::const_iterator
115 std::vector<ConfigValue> elements_;
Array definition to store multiple values provided by the user from Json/Yaml.
Definition Array.hpp:41
ConfigValue const & at(std::size_t idx) const
Returns the ConfigValue at the specified index.
Definition Array.cpp:68
ConfigValue const & getArrayPattern() const
Returns the ConfigValue that defines the type/constraint every ConfigValue must follow in Array.
Definition Array.cpp:75
std::optional< Error > addValue(Value value, std::optional< std::string_view > key=std::nullopt)
Add ConfigValues to Array class.
Definition Array.cpp:49
std::vector< ConfigValue >::const_iterator end() const
Returns an iterator to the end of the ConfigValue vector.
Definition Array.cpp:87
size_t size() const
Returns the number of values stored in the Array.
Definition Array.cpp:62
Array(ConfigValue arg)
Constructs an Array with provided Arg.
Definition Array.cpp:35
std::vector< ConfigValue >::const_iterator begin() const
Returns an iterator to the beginning of the ConfigValue vector.
Definition Array.cpp:81
static std::string_view prefix(std::string_view key)
Extract array prefix from a key, For example for a key foo.[].bar the method will return foo....
Definition Array.cpp:40
Represents the config values for Json/Yaml config.
Definition ConfigValue.hpp:48
std::ostream & operator<<(std::ostream &stream, Severity sev)
Custom labels for Severity in log output.
Definition Logger.cpp:73