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 noexcept |
const char * | get (const std::string &key, std::nullptr_t) const noexcept |
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 noexcept |
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 | set (std::string key, std::string val) |
void | set_parent (Config &parent) noexcept |
Simple config reader with environment variable substitution.
Definition at line 67 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().
|
noexcept |
Definition at line 48 of file Config.cpp.
|
inlinenoexcept |
Definition at line 83 of file Config.hpp.
Throws std::runtime_error if key does not exist.
Definition at line 89 of file Config.hpp.
Definition at line 109 of file Config.hpp.
|
inlinenoexcept |
Definition at line 125 of file Config.hpp.
|
inlinenoexcept |
Definition at line 126 of file Config.hpp.
|
inline |
Definition at line 127 of file Config.hpp.
Referenced by toolbox::util::MultiConfig::read(), and read_section().
|
inline |
Definition at line 128 of file Config.hpp.
Referenced by read_section().
|
inline |
Definition at line 129 of file Config.hpp.
|
inline |
Definition at line 133 of file Config.hpp.
|
inline |
Definition at line 137 of file Config.hpp.
Definition at line 141 of file Config.hpp.
Referenced by toolbox::util::MultiConfig::read().