Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::settings::modules::ModuleSettings Class Reference

This is the base class of the settings for a particular module. More...

#include <ModuleSettings.h>

Inherited by storm::dft::settings::modules::DftGspnSettings, storm::dft::settings::modules::DftIOSettings, storm::dft::settings::modules::FaultTreeSettings, storm::settings::modules::AbstractionSettings, storm::settings::modules::BeliefExplorationSettings, storm::settings::modules::BisimulationSettings, storm::settings::modules::BuildSettings, storm::settings::modules::ConversionGeneralSettings, storm::settings::modules::ConversionInputSettings, storm::settings::modules::ConversionOutputSettings, storm::settings::modules::CoreSettings, storm::settings::modules::CounterexampleGeneratorSettings, storm::settings::modules::CuddSettings, storm::settings::modules::DebugSettings, storm::settings::modules::DerivativeSettings, storm::settings::modules::EigenEquationSolverSettings, storm::settings::modules::EliminationSettings, storm::settings::modules::ExplorationSettings, storm::settings::modules::FeasibilitySettings, storm::settings::modules::GSPNExportSettings, storm::settings::modules::GSPNSettings, storm::settings::modules::GameSolverSettings, storm::settings::modules::GeneralSettings, storm::settings::modules::GlpkSettings, storm::settings::modules::GmmxxEquationSolverSettings, storm::settings::modules::GurobiSettings, storm::settings::modules::HintSettings, storm::settings::modules::IOSettings, storm::settings::modules::JaniExportSettings, storm::settings::modules::LongRunAverageSolverSettings, storm::settings::modules::MinMaxEquationSolverSettings, storm::settings::modules::ModelCheckerSettings, storm::settings::modules::MonotonicitySettings, storm::settings::modules::MultiObjectiveSettings, storm::settings::modules::MultiplierSettings, storm::settings::modules::NativeEquationSolverSettings, storm::settings::modules::OviSolverSettings, storm::settings::modules::POMDPSettings, storm::settings::modules::ParametricSettings, storm::settings::modules::PartitionSettings, storm::settings::modules::PrismExportSettings, storm::settings::modules::QualitativePOMDPAnalysisSettings, storm::settings::modules::RegionSettings, storm::settings::modules::RegionVerificationSettings, storm::settings::modules::ResourceSettings, storm::settings::modules::SamplingSettings, storm::settings::modules::Smt2SmtSolverSettings, storm::settings::modules::SylvanSettings, storm::settings::modules::TimeBoundedSolverSettings, storm::settings::modules::ToParametricSettings, storm::settings::modules::TopologicalEquationSolverSettings, and storm::settings::modules::TransformationSettings.

Public Member Functions

 ModuleSettings (std::string const &moduleName)
 Constructs a new settings object.
 
virtual ~ModuleSettings ()
 
virtual bool check () const
 Checks whether the settings are consistent.
 
virtual void finalize ()
 Prepares the modules for further usage, should be called at the end of the initialization, before checks are executed.
 
std::unique_ptr< storm::settings::SettingMementooverrideOption (std::string const &name, bool requiredStatus)
 Sets the option with the given name to the required status.
 
std::string constgetModuleName () const
 Retrieves the name of the module to which these settings belong.
 
std::vector< std::shared_ptr< Option > > constgetOptions () const
 Retrieves the options of this module.
 
uint_fast64_t getPrintLengthOfLongestOption (bool includeAdvanced) const
 Retrieves the (print) length of the longest option.
 
void restoreDefaults ()
 Restores the default values for all arguments of all options.
 

Protected Member Functions

OptiongetOption (std::string const &longName)
 Retrieves the option with the given long name.
 
Option constgetOption (std::string const &longName) const
 Retrieves the option with the given long name.
 
bool isSet (std::string const &optionName) const
 Retrieves whether the option with the given name was set.
 
void set (std::string const &name)
 Sets the option with the specified name.
 
void unset (std::string const &name)
 Unsets the option with the specified name.
 
void addOption (std::shared_ptr< Option > const &option)
 Adds and registers the given option.
 

Friends

class storm::settings::SettingMemento
 

Detailed Description

This is the base class of the settings for a particular module.

Definition at line 21 of file ModuleSettings.h.

Constructor & Destructor Documentation

◆ ModuleSettings()

storm::settings::modules::ModuleSettings::ModuleSettings ( std::string const moduleName)

Constructs a new settings object.

Parameters
moduleNameThe name of the module for which to build the settings.

Definition at line 13 of file ModuleSettings.cpp.

◆ ~ModuleSettings()

virtual storm::settings::modules::ModuleSettings::~ModuleSettings ( )
inlinevirtual

Definition at line 32 of file ModuleSettings.h.

Member Function Documentation

◆ addOption()

void storm::settings::modules::ModuleSettings::addOption ( std::shared_ptr< Option > const option)
protected

Adds and registers the given option.

Parameters
optionThe option to add and register.

Definition at line 68 of file ModuleSettings.cpp.

◆ check()

bool storm::settings::modules::ModuleSettings::check ( ) const
virtual

Checks whether the settings are consistent.

If they are inconsistent, an exception is thrown.

Returns
True if the settings are consistent.

Reimplemented in storm::settings::modules::ConversionGeneralSettings, storm::settings::modules::ConversionInputSettings, storm::settings::modules::ConversionOutputSettings, storm::settings::modules::JaniExportSettings, storm::settings::modules::PrismExportSettings, storm::settings::modules::CounterexampleGeneratorSettings, storm::dft::settings::modules::DftGspnSettings, storm::dft::settings::modules::DftIOSettings, storm::dft::settings::modules::FaultTreeSettings, storm::settings::modules::GSPNExportSettings, storm::settings::modules::GSPNSettings, storm::settings::modules::POMDPSettings, storm::settings::modules::QualitativePOMDPAnalysisSettings, storm::settings::modules::ToParametricSettings, storm::settings::modules::BisimulationSettings, storm::settings::modules::CoreSettings, storm::settings::modules::EigenEquationSolverSettings, storm::settings::modules::ExplorationSettings, storm::settings::modules::GeneralSettings, storm::settings::modules::GlpkSettings, storm::settings::modules::GmmxxEquationSolverSettings, storm::settings::modules::GurobiSettings, storm::settings::modules::HintSettings, storm::settings::modules::IOSettings, storm::settings::modules::MultiObjectiveSettings, storm::settings::modules::NativeEquationSolverSettings, storm::settings::modules::Smt2SmtSolverSettings, storm::settings::modules::SylvanSettings, storm::settings::modules::TopologicalEquationSolverSettings, and storm::settings::modules::TransformationSettings.

Definition at line 17 of file ModuleSettings.cpp.

◆ finalize()

◆ getModuleName()

std::string const & storm::settings::modules::ModuleSettings::getModuleName ( ) const

Retrieves the name of the module to which these settings belong.

Returns
The name of the module.

Definition at line 50 of file ModuleSettings.cpp.

◆ getOption() [1/2]

Option & storm::settings::modules::ModuleSettings::getOption ( std::string const longName)
protected

Retrieves the option with the given long name.

If no such option exists, an exception is thrown.

Parameters
longNameThe long name of the option to retrieve.
Returns
The option associated with the given option name.

Definition at line 43 of file ModuleSettings.cpp.

◆ getOption() [2/2]

Option const & storm::settings::modules::ModuleSettings::getOption ( std::string const longName) const
protected

Retrieves the option with the given long name.

If no such option exists, an exception is thrown.

Parameters
longNameThe long name of the option to retrieve.
Returns
The option associated with the given option name.

Definition at line 36 of file ModuleSettings.cpp.

◆ getOptions()

std::vector< std::shared_ptr< Option > > const & storm::settings::modules::ModuleSettings::getOptions ( ) const

Retrieves the options of this module.

Returns
A list of options of this module.

Definition at line 32 of file ModuleSettings.cpp.

◆ getPrintLengthOfLongestOption()

uint_fast64_t storm::settings::modules::ModuleSettings::getPrintLengthOfLongestOption ( bool  includeAdvanced) const

Retrieves the (print) length of the longest option.

Parameters
includeAdvancedif set, also includes options flagged as advanced.
Returns
The length of the longest option.

Definition at line 77 of file ModuleSettings.cpp.

◆ isSet()

bool storm::settings::modules::ModuleSettings::isSet ( std::string const optionName) const
protected

Retrieves whether the option with the given name was set.

Parameters
Thename of the option.
Returns
True iff the option was set.

Definition at line 64 of file ModuleSettings.cpp.

◆ overrideOption()

std::unique_ptr< storm::settings::SettingMemento > storm::settings::modules::ModuleSettings::overrideOption ( std::string const name,
bool  requiredStatus 
)

Sets the option with the given name to the required status.

This requires the option to take no arguments. As a result, a pointer to an object is returned such that when the object is destroyed (i.e. the smart pointer goes out of scope), the option is reset to its original status.

Parameters
nameThe name of the option to (unset).
requiredStatusThe status that is to be set for the option.
Returns
A pointer to an object that resets the change upon destruction.

Definition at line 54 of file ModuleSettings.cpp.

◆ restoreDefaults()

void storm::settings::modules::ModuleSettings::restoreDefaults ( )

Restores the default values for all arguments of all options.

Definition at line 87 of file ModuleSettings.cpp.

◆ set()

void storm::settings::modules::ModuleSettings::set ( std::string const name)
protected

Sets the option with the specified name.

This requires the option to not have any arguments. This should be used with care and is primarily meant to be used by the SettingMemento.

Parameters
nameThe name of the option to set.

Definition at line 23 of file ModuleSettings.cpp.

◆ unset()

void storm::settings::modules::ModuleSettings::unset ( std::string const name)
protected

Unsets the option with the specified name.

This requires the option to not have any arguments. This should be used with care and is primarily meant to be used by the SettingMemento.

Parameters
nameThe name of the option to unset.

Definition at line 27 of file ModuleSettings.cpp.

Friends And Related Symbol Documentation

◆ storm::settings::SettingMemento

Definition at line 24 of file ModuleSettings.h.


The documentation for this class was generated from the following files: