21#include <spot/misc/common.hh>
58 int get(
const char* option,
int def = 0)
const;
65 std::string
get_str(
const char* option, std::string def = {})
const;
77 int set(
const char* option,
int val,
int def = 0);
87 std::string val, std::string def = {});
99 friend SPOT_API std::ostream&
100 operator<<(std::ostream& os,
const option_map& m);
103 std::map<std::string, int> options_;
104 std::map<std::string, std::string> options_str_;
108 mutable std::set<std::string> unused_;
109 mutable bool is_used_ =
false;
111 void set_(
const std::string&,
int val);
112 void set_str_(
const std::string&,
const std::string& val);
Manage a map of options.
Definition: optionmap.hh:34
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.
int & operator[](const char *option)
Get a reference to the current 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.
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:26