24 return this->
getOption(name).setHasOptionBeenSet();
28 return this->
getOption(name).setHasOptionBeenSet(
false);
29 return this->
getOption(name).setHasOptionBeenSetWithModulePrefix(
false);
39 "Cannot retrieve unknown option '" << longName <<
"'.");
46 "Cannot retrieve unknown option '" << longName <<
"'.");
51 return this->moduleName;
71 "Unable to register the option '" <<
option->getLongName() <<
"' in module '" <<
this->getModuleName()
72 <<
"', because an option with this name already exists.");
74 this->options.push_back(
option);
79 for (
auto const&
option : this->options) {
88 for (
auto&
option : options) {
90 if (
argument->getHasDefaultValue()) {
This class represents one command-line option.
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
This class is used to reset the state of an option that was temporarily set to a different status.
std::unique_ptr< storm::settings::SettingMemento > overrideOption(std::string const &name, bool requiredStatus)
Sets the option with the given name to the required status.
bool isSet(std::string const &optionName) const
Retrieves whether the option with the given name was set.
std::vector< std::shared_ptr< Option > > const & getOptions() const
Retrieves the options of this module.
ModuleSettings(std::string const &moduleName)
Constructs a new settings object.
void unset(std::string const &name)
Unsets the option with the specified name.
virtual bool check() const
Checks whether the settings are consistent.
void set(std::string const &name)
Sets the option with the specified name.
std::string const & getModuleName() const
Retrieves the name of the module to which these settings belong.
uint_fast64_t getPrintLengthOfLongestOption(bool includeAdvanced) const
Retrieves the (print) length of the longest option.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
virtual void finalize()
Prepares the modules for further usage, should be called at the end of the initialization,...
void restoreDefaults()
Restores the default values for all arguments of all options.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
#define STORM_LOG_THROW(cond, exception, message)
SettingsType const & getModule()
Get module.