22#include "util/config/ConfigValue.hpp" 
   23#include "util/config/Error.hpp" 
   24#include "util/config/Types.hpp" 
   32namespace util::config {
 
   58    static std::string_view
 
   59    prefix(std::string_view key);
 
   68    [[nodiscard]] std::optional<Error>
 
   69    addValue(Value value, std::optional<std::string_view> key = std::nullopt);
 
   78    [[nodiscard]] std::optional<Error>
 
   79    addNull(std::optional<std::string_view> key = std::nullopt);
 
   96    at(std::size_t idx) 
const;
 
  112    [[nodiscard]] std::vector<ConfigValue>::const_iterator
 
  120    [[nodiscard]] std::vector<ConfigValue>::const_iterator
 
  125    std::vector<ConfigValue> elements_;
 
 
  136operator<<(std::ostream& stream, 
Array arr)
 
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:77
ConfigValue const & getArrayPattern() const
Returns the ConfigValue that defines the type/constraint every ConfigValue must follow in Array.
Definition Array.cpp:84
std::optional< Error > addNull(std::optional< std::string_view > key=std::nullopt)
Add null value to the array.
Definition Array.cpp:60
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:96
size_t size() const
Returns the number of values stored in the Array.
Definition Array.cpp:71
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:90
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:47