25 #include <spot/misc/common.hh>
62 int get(
const char* option,
int def = 0)
const;
69 std::string
get_str(
const char* option, std::string def = {})
const;
81 int set(
const char* option,
int val,
int def = 0);
91 std::string val, std::string def = {});
103 friend SPOT_API std::ostream&
104 operator<<(std::ostream& os,
const option_map& m);
107 std::map<std::string, int> options_;
108 std::map<std::string, std::string> options_str_;
112 mutable std::set<std::string> unused_;
113 mutable bool is_used_ =
false;
115 void set_(
const std::string&,
int val);
116 void set_str_(
const std::string&,
const std::string& val);
Manage a map of options.
Definition: optionmap.hh:38
void report_unused_options() const
Raise a runtime_error if some options have not been used.
std::string get_str(const char *option, std::string def={}) const
Get the value of option.
std::string set_str(const char *option, std::string val, std::string def={})
Set the value of a string option to val.
void set(const option_map &o)
Acquire all the settings of o.
int & operator[](const char *option)
Get a reference to the current value of option.
void set_if_unset(const char *option, int val)
Set the value of option to val if it is unset.
const char * parse_options(const char *options)
Add the parsed options to the map.
int set(const char *option, int val, int def=0)
Set the value of option to val.
int get(const char *option, int def=0) const
Get the value of option.
int operator[](const char *option) const
Get the value of option.
Definition: automata.hh:27