![]() |
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 104 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 120 of file Config.hpp.
Throws std::runtime_error if key does not exist.
Definition at line 126 of file Config.hpp.
Definition at line 138 of file Config.hpp.
Definition at line 147 of file Config.hpp.
Definition at line 162 of file Config.hpp.
|
inlinenoexcept |
Definition at line 166 of file Config.hpp.
|
inlinenoexcept |
Definition at line 167 of file Config.hpp.
|
inline |
Definition at line 168 of file Config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), toolbox::util::MultiConfig::read(), and read_section().
|
inline |
Definition at line 169 of file Config.hpp.
Referenced by read_section().
|
inline |
Definition at line 170 of file Config.hpp.
|
inline |
Definition at line 174 of file Config.hpp.
|
inline |
Definition at line 178 of file Config.hpp.
Definition at line 186 of file Config.hpp.
Definition at line 194 of file Config.hpp.
Referenced by toolbox::util::MultiConfig::read().