Storm
A Modern Probabilistic Model Checker
|
This class represents one command-line option. More...
#include <Option.h>
Public Member Functions | |
Option (std::string const &moduleName, std::string const &longOptionName, std::string const &optionDescription, bool isOptionRequired, bool requireModulePrefix, bool isAdvanced, std::vector< std::shared_ptr< ArgumentBase > > const &optionArguments=std::vector< std::shared_ptr< ArgumentBase > >()) | |
Creates an option with the given parameters. | |
Option (std::string const &moduleName, std::string const &longOptionName, std::string const &shortOptionName, std::string const &optionDescription, bool isOptionRequired, bool requireModulePrefix, bool isAdvanced, std::vector< std::shared_ptr< ArgumentBase > > const &optionArguments=std::vector< std::shared_ptr< ArgumentBase > >()) | |
Creates an option with the given parameters. | |
bool | isCompatibleWith (Option const &other) |
Checks whether the given option is compatible with the current one. | |
uint_fast64_t | getArgumentCount () const |
Retrieves the argument count this option expects. | |
ArgumentBase const & | getArgument (uint_fast64_t argumentIndex) const |
Retrieves the i-th argument of this option. | |
ArgumentBase & | getArgument (uint_fast64_t argumentIndex) |
Retrieves the i-th argument of this option. | |
ArgumentBase const & | getArgumentByName (std::string const &argumentName) const |
Returns a reference to the argument with the specified long name. | |
ArgumentBase & | getArgumentByName (std::string const &argumentName) |
Returns a reference to the argument with the specified long name. | |
std::string const & | getLongName () const |
Retrieves the long name of this option. | |
bool | getHasShortName () const |
Retrieves whether this option has a short name. | |
std::string const & | getShortName () const |
Retrieves the short name of this option. | |
std::string const & | getDescription () const |
Retrieves the description of the option. | |
std::string const & | getModuleName () const |
Retrieves the name of the module to which this option belongs. | |
bool | getIsRequired () const |
Retrieves whether the option is required. | |
bool | getRequiresModulePrefix () const |
Retrieves whether the option requires the module name as a prefix. | |
bool | getHasOptionBeenSet () const |
Retrieves whether the option has been set. | |
bool | getHasOptionBeenSetWithModulePrefix () const |
Retrieves whether the option has been set by including the module prefix. | |
bool | getIsAdvanced () const |
Retrieves whether the option is only displayed in the advanced help. | |
std::vector< std::shared_ptr< ArgumentBase > > const & | getArguments () const |
Retrieves the arguments of the option. | |
uint_fast64_t | getPrintLength () const |
Retrieves the (print) length of the option. | |
Friends | |
class | SettingsManager |
class | modules::ModuleSettings |
std::ostream & | operator<< (std::ostream &out, Option const &option) |
storm::settings::Option::Option | ( | std::string const & | moduleName, |
std::string const & | longOptionName, | ||
std::string const & | optionDescription, | ||
bool | isOptionRequired, | ||
bool | requireModulePrefix, | ||
bool | isAdvanced, | ||
std::vector< std::shared_ptr< ArgumentBase > > const & | optionArguments = std::vector<std::shared_ptr<ArgumentBase>>() |
||
) |
Creates an option with the given parameters.
moduleName | The module to which this option belongs. |
longOptionName | The long option name. |
optionDescription | The description of the option. |
isOptionRequired | Sets whether the option is required to appear. |
requireModulePrefix | A flag that indicates whether this option requires to be prefixed with the module name. |
isAdvanced | A flag that indicates whether this option is only displayed in the advanced help |
optionArguments | The arguments of the option. |
Definition at line 16 of file Option.cpp.
storm::settings::Option::Option | ( | std::string const & | moduleName, |
std::string const & | longOptionName, | ||
std::string const & | shortOptionName, | ||
std::string const & | optionDescription, | ||
bool | isOptionRequired, | ||
bool | requireModulePrefix, | ||
bool | isAdvanced, | ||
std::vector< std::shared_ptr< ArgumentBase > > const & | optionArguments = std::vector<std::shared_ptr<ArgumentBase>>() |
||
) |
Creates an option with the given parameters.
moduleName | The module to which this option belongs. |
longOptionName | The long option name. |
shortOptionName | The short option name. |
optionDescription | The description of the option. |
isOptionRequired | Sets whether the option is required to appear. |
requireModulePrefix | A flag that indicates whether this option requires to be prefixed with the |
isAdvanced | A flag that indicates whether this option is only displayed in the advanced help |
optionArguments | The arguments of the option. |
Definition at line 22 of file Option.cpp.
ArgumentBase & storm::settings::Option::getArgument | ( | uint_fast64_t | argumentIndex | ) |
Retrieves the i-th argument of this option.
argumentIndex | The index of the argument to retrieve. |
Definition at line 74 of file Option.cpp.
ArgumentBase const & storm::settings::Option::getArgument | ( | uint_fast64_t | argumentIndex | ) | const |
Retrieves the i-th argument of this option.
argumentIndex | The index of the argument to retrieve. |
Definition at line 69 of file Option.cpp.
ArgumentBase & storm::settings::Option::getArgumentByName | ( | std::string const & | argumentName | ) |
Returns a reference to the argument with the specified long name.
argumentName | The name of the argument to retrieve. |
Definition at line 86 of file Option.cpp.
ArgumentBase const & storm::settings::Option::getArgumentByName | ( | std::string const & | argumentName | ) | const |
Returns a reference to the argument with the specified long name.
argumentName | The name of the argument to retrieve. |
Definition at line 79 of file Option.cpp.
uint_fast64_t storm::settings::Option::getArgumentCount | ( | ) | const |
Retrieves the argument count this option expects.
Definition at line 65 of file Option.cpp.
std::vector< std::shared_ptr< ArgumentBase > > const & storm::settings::Option::getArguments | ( | ) | const |
Retrieves the arguments of the option.
Definition at line 196 of file Option.cpp.
std::string const & storm::settings::Option::getDescription | ( | ) | const |
Retrieves the description of the option.
Definition at line 105 of file Option.cpp.
bool storm::settings::Option::getHasOptionBeenSet | ( | ) | const |
Retrieves whether the option has been set.
Definition at line 125 of file Option.cpp.
bool storm::settings::Option::getHasOptionBeenSetWithModulePrefix | ( | ) | const |
Retrieves whether the option has been set by including the module prefix.
Definition at line 129 of file Option.cpp.
bool storm::settings::Option::getHasShortName | ( | ) | const |
Retrieves whether this option has a short name.
Definition at line 97 of file Option.cpp.
bool storm::settings::Option::getIsAdvanced | ( | ) | const |
Retrieves whether the option is only displayed in the advanced help.
Definition at line 121 of file Option.cpp.
bool storm::settings::Option::getIsRequired | ( | ) | const |
Retrieves whether the option is required.
Definition at line 113 of file Option.cpp.
std::string const & storm::settings::Option::getLongName | ( | ) | const |
Retrieves the long name of this option.
Definition at line 93 of file Option.cpp.
std::string const & storm::settings::Option::getModuleName | ( | ) | const |
Retrieves the name of the module to which this option belongs.
Definition at line 109 of file Option.cpp.
uint_fast64_t storm::settings::Option::getPrintLength | ( | ) | const |
Retrieves the (print) length of the option.
Definition at line 177 of file Option.cpp.
bool storm::settings::Option::getRequiresModulePrefix | ( | ) | const |
Retrieves whether the option requires the module name as a prefix.
Definition at line 117 of file Option.cpp.
std::string const & storm::settings::Option::getShortName | ( | ) | const |
Retrieves the short name of this option.
Definition at line 101 of file Option.cpp.
bool storm::settings::Option::isCompatibleWith | ( | Option const & | other | ) |
Checks whether the given option is compatible with the current one.
If not, an exception is thrown.
other | The other option with which to check compatibility. |
Definition at line 28 of file Option.cpp.
|
friend |
|
friend |
Definition at line 200 of file Option.cpp.
|
friend |