Options¶
-
class Options¶
A value. Validated against the registry at every write. Every setter is named by its type, so no literal can pick the wrong overload. Unknown names are OPTION_UNKNOWN; bad values OPTION_VALUE.
Public Functions
-
Options()¶
every entry at its default
-
~Options()¶
-
void set(std::string_view name, std::string_view value)¶
-
void set_bool(std::string_view name, bool)¶
-
void set_int(std::string_view name, std::int64_t)¶
-
void set_uint(std::string_view name, std::uint64_t)¶
-
void set_str(std::string_view name, std::string_view)¶
string/enum/mode/path
-
void set_names(std::string_view name, const std::vector<std::string>&)¶
set-typed
-
void set_duration(std::string_view name, std::chrono::milliseconds)¶
-1 ms is “none” (no limit); any other negative duration is OPTION_VALUE.
-
void set_args(const std::vector<std::string> &argv)¶
-
void set_args(int argc, const char *const *argv)¶
-
OptionValue get(std::string_view name) const¶
-
bool get_bool(std::string_view name) const¶
-
std::int64_t get_int(std::string_view name) const¶
-
std::uint64_t get_uint(std::string_view name) const¶
-
std::string get_str(std::string_view name) const¶
-
std::vector<std::string> get_names(std::string_view name) const¶
-
std::chrono::milliseconds get_duration(std::string_view name) const¶
-1 ms for “none” (no limit, max-time’s default).
-
OptionValue resolved(std::string_view name) const¶
after implications
-
bool is_set(std::string_view name) const¶
-
void reset(std::string_view name)¶
-
void reset_all()¶
-
OptionInfo info(std::string_view name) const¶
-
Options()¶