21#ifndef G_OPTION_READER_H
22#define G_OPTION_READER_H
41 G_EXCEPTION( FileError ,
tx(
"error reading configuration file") )
Provides a static function to read options from a config file.
static StringArray read(const G::Path &, std::size_t limit=1000U)
Reads options from file as a list of strings like "--foo=bar".
static std::size_t add(StringArray &out, const G::Path &, std::size_t limit=1000U)
Adds options read from file to an existing list.
A Path object represents a file system path.
std::vector< std::string > StringArray
A std::vector of std::strings.
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().