Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ConversionGeneralSettings.cpp
Go to the documentation of this file.
2
8
9namespace storm {
10namespace settings {
11namespace modules {
12
13const std::string ConversionGeneralSettings::moduleName = "general";
14const std::string ConversionGeneralSettings::helpOptionName = "help";
15const std::string ConversionGeneralSettings::helpOptionShortName = "h";
16const std::string ConversionGeneralSettings::versionOptionName = "version";
17const std::string ConversionGeneralSettings::verboseOptionName = "verbose";
18const std::string ConversionGeneralSettings::verboseOptionShortName = "v";
19const std::string ConversionGeneralSettings::debugOptionName = "debug";
20const std::string ConversionGeneralSettings::traceOptionName = "trace";
21const std::string ConversionGeneralSettings::configOptionName = "config";
22const std::string ConversionGeneralSettings::configOptionShortName = "c";
23
25 this->addOption(
26 storm::settings::OptionBuilder(moduleName, helpOptionName, false, "Shows available options, arguments and descriptions.")
27 .setShortName(helpOptionShortName)
28 .addArgument(
30 "filter",
31 "'frequent' for frequently used options, 'all' for the complete help, or a regular expression to show help for all matching entities.")
32 .setDefaultValueString("frequent")
33 .makeOptional()
34 .build())
35 .build());
36 this->addOption(storm::settings::OptionBuilder(moduleName, versionOptionName, false, "Prints the version information.").build());
37 this->addOption(
38 storm::settings::OptionBuilder(moduleName, verboseOptionName, false, "Enables more verbose output.").setShortName(verboseOptionShortName).build());
39 this->addOption(storm::settings::OptionBuilder(moduleName, debugOptionName, false, "Enables verbose and debug output.").build());
40 this->addOption(storm::settings::OptionBuilder(moduleName, traceOptionName, false, "Enables verbose and debug and trace output.").build());
41 this->addOption(
42 storm::settings::OptionBuilder(moduleName, configOptionName, false,
43 "If given, this file will be read and parsed for additional configuration settings.")
44 .setShortName(configOptionShortName)
45 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file from which to read the configuration.")
47 .build())
48 .build());
49}
50
52 return this->getOption(helpOptionName).getHasOptionBeenSet();
53}
54
56 return this->getOption(versionOptionName).getHasOptionBeenSet();
57}
58
60 return this->getOption(helpOptionName).getArgumentByName("filter").getValueAsString();
61}
62
64 return this->getOption(verboseOptionName).getHasOptionBeenSet();
65}
66
68 return this->getOption(debugOptionName).getHasOptionBeenSet();
69}
70
72 return this->getOption(traceOptionName).getHasOptionBeenSet();
73}
74
76 return this->getOption(configOptionName).getHasOptionBeenSet();
77}
78
80 return this->getOption(configOptionName).getArgumentByName("filename").getValueAsString();
81}
82
84 // Intentionally left empty.
85}
86
88 return true;
89}
90
91} // namespace modules
92} // namespace settings
93} // namespace storm
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
static ArgumentBuilder createStringArgument(std::string const &name, std::string const &description)
Creates a string argument with the given parameters.
static std::shared_ptr< ArgumentValidator< std::string > > createExistingFileValidator()
This class provides the interface to create an option...
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
Definition Option.cpp:79
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
Definition Option.cpp:125
bool isConfigSet() const
Retrieves whether the config option was set.
bool isDebugOutputSet() const
Retrieves whether the debug output option was set.
bool isTraceOutputSet() const
Retrieves whether the trace output option was set.
bool isVerboseSet() const
Retrieves whether the verbose option was set.
std::string getHelpFilterExpression() const
Retrieves the name of the module for which to show the help or "all" to indicate that the full help n...
bool isVersionSet() const
Retrieves whether the version option was set.
void finalize() override
Prepares the modules for further usage, should be called at the end of the initialization,...
std::string getConfigFilename() const
Retrieves the name of the file that is to be scanned for settings.
bool isHelpSet() const
Retrieves whether the help option was set.
bool check() const override
Checks whether the settings are consistent.
This is the base class of the settings for a particular module.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
SettingsType const & getModule()
Get module.
LabParser.cpp.
Definition cli.cpp:18