1#ifndef STORM_SETTINGS_OPTION_H_
2#define STORM_SETTINGS_OPTION_H_
10#include <unordered_map>
46 bool requireModulePrefix,
bool isAdvanced,
47 std::vector<std::shared_ptr<ArgumentBase>>
const&
optionArguments = std::vector<std::shared_ptr<ArgumentBase>>());
63 std::vector<std::shared_ptr<ArgumentBase>>
const&
optionArguments = std::vector<std::shared_ptr<ArgumentBase>>());
185 std::vector<std::shared_ptr<ArgumentBase>>
const&
getArguments()
const;
198 std::string longName;
204 std::string shortName;
207 std::string description;
210 std::string moduleName;
216 bool requireModulePrefix;
225 bool hasBeenSetWithModulePrefix;
228 std::vector<std::shared_ptr<ArgumentBase>> arguments;
231 std::unordered_map<std::string, std::shared_ptr<ArgumentBase>> argumentNameMap;
249 std::vector<std::shared_ptr<ArgumentBase>>
const&
optionArguments = std::vector<std::shared_ptr<ArgumentBase>>());
256 void setHasOptionBeenSet(
bool newValue =
true);
263 void setHasOptionBeenSetWithModulePrefix(
bool newValue =
true);
This class serves as the (untemplated) base class of argument classes.
This class represents one command-line option.
bool getHasShortName() const
Retrieves whether this option has a short name.
std::string const & getModuleName() const
Retrieves the name of the module to which this option belongs.
std::string const & getDescription() const
Retrieves the description of the option.
uint_fast64_t getArgumentCount() const
Retrieves the argument count this option expects.
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
bool getHasOptionBeenSetWithModulePrefix() const
Retrieves whether the option has been set by including the module prefix.
friend std::ostream & operator<<(std::ostream &out, Option const &option)
std::string const & getShortName() const
Retrieves the short name of this option.
std::vector< std::shared_ptr< ArgumentBase > > const & getArguments() const
Retrieves the arguments of the option.
bool getIsAdvanced() const
Retrieves whether the option is only displayed in the advanced help.
ArgumentBase const & getArgument(uint_fast64_t argumentIndex) const
Retrieves the i-th argument of this option.
std::string const & getLongName() const
Retrieves the long name of this option.
uint_fast64_t getPrintLength() const
Retrieves the (print) length of the option.
bool getRequiresModulePrefix() const
Retrieves whether the option requires the module name as a prefix.
bool getIsRequired() const
Retrieves whether the option is required.
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
bool isCompatibleWith(Option const &other)
Checks whether the given option is compatible with the current one.
Provides the central API for the registration of command line options and parsing the options from th...
This is the base class of the settings for a particular module.
SettingsType const & getModule()
Get module.