Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SettingMemento.cpp
Go to the documentation of this file.
2
4
5namespace storm {
6namespace settings {
7SettingMemento::SettingMemento(modules::ModuleSettings& settings, std::string const& longOptionName, bool resetToState)
8 : settings(settings), optionName(longOptionName), resetToState(resetToState) {
9 // Intentionally left empty.
10}
11
16 if (resetToState) {
17 settings.set(optionName);
18 } else {
19 settings.unset(optionName);
20 }
21}
22} // namespace settings
23} // namespace storm
virtual ~SettingMemento()
Destructs the memento object and resets the value of the option to its original state.
SettingMemento(modules::ModuleSettings &settings, std::string const &longOptionName, bool resetToState)
Constructs a new memento for the specified option.
This is the base class of the settings for a particular module.
void unset(std::string const &name)
Unsets the option with the specified name.
void set(std::string const &name)
Sets the option with the specified name.
SettingsType const & getModule()
Get module.
LabParser.cpp.
Definition cli.cpp:18