![]() |
Toolbox snapshot
The Reactive C++ Toolbox
|
Simple config reader with environment variable substitution. More...
#include <toolbox/util/Config.hpp>
Public Member Functions | |
Config () | |
~Config () | |
Config (const Config &) | |
Config & | operator= (const Config &) |
Config (Config &&) noexcept | |
Config & | operator= (Config &&) noexcept |
const std::string & | get (const std::string &key) const |
Throws std::runtime_error if key does not exist. | |
const char * | get (const std::string &key, const char *dfl) const |
const char * | get (const std::string &key, std::nullptr_t) const |
template<typename ValueT > | |
ValueT | get (const std::string &key) const |
Throws std::runtime_error if key does not exist. | |
template<typename ValueT > | |
ValueT | get (const std::string &key, ValueT dfl) const |
auto | get_multi (const std::string &key) const |
template<typename ValueT > | |
auto | get_multi (const std::string &key) const |
std::size_t | size () const noexcept |
void | clear () noexcept |
std::istream & | read_section (std::istream &is) |
std::istream & | read_section (std::istream &&is) |
std::istream & | read_section (std::istream &is, std::string &next) |
std::istream & | read_section (std::istream &&is, std::string &next) |
void | insert (std::string key, std::string val) |
template<typename... ValueTs> requires (toolbox::is_string_type_v<ValueTs> && ...) | |
void | set (const std::string &key, ValueTs ... vals) |
void | set_parent (Config &parent) noexcept |
Simple config reader with environment variable substitution.
Definition at line 102 of file Config.hpp.
|
default |
|
default |
|
defaultnoexcept |
Throws std::runtime_error if key does not exist.
Definition at line 36 of file Config.cpp.
Referenced by get().
Definition at line 48 of file Config.cpp.
Definition at line 118 of file Config.hpp.
Throws std::runtime_error if key does not exist.
Definition at line 124 of file Config.hpp.
Definition at line 136 of file Config.hpp.
Definition at line 145 of file Config.hpp.
Definition at line 160 of file Config.hpp.
|
inlinenoexcept |
Definition at line 164 of file Config.hpp.
|
inlinenoexcept |
Definition at line 165 of file Config.hpp.
|
inline |
Definition at line 166 of file Config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), toolbox::util::MultiConfig::read(), and read_section().
|
inline |
Definition at line 167 of file Config.hpp.
Referenced by read_section().
|
inline |
Definition at line 168 of file Config.hpp.
|
inline |
Definition at line 172 of file Config.hpp.
|
inline |
Definition at line 176 of file Config.hpp.
Definition at line 184 of file Config.hpp.
Definition at line 192 of file Config.hpp.
Referenced by toolbox::util::MultiConfig::read().