|
mlpack
2.2.5
|
A static object whose constructor registers a parameter with the CLI class. More...
Public Member Functions | |
| Option (const bool ignoreTemplate, const N defaultValue, const std::string &identifier, const std::string &description, const std::string &alias, const bool required=false, const bool input=true) | |
| Construct an Option object. More... | |
| Option (const std::string &identifier, const std::string &description, const std::string &alias) | |
| Constructs an Option object. More... | |
A static object whose constructor registers a parameter with the CLI class.
This should not be used outside of CLI itself, and you should use the PARAM_FLAG(), PARAM_DOUBLE(), PARAM_INT(), PARAM_STRING(), or other similar macros to declare these objects instead of declaring them directly.
Definition at line 32 of file option.hpp.
| Option | ( | const bool | ignoreTemplate, |
| const N | defaultValue, | ||
| const std::string & | identifier, | ||
| const std::string & | description, | ||
| const std::string & | alias, | ||
| const bool | required = false, |
||
| const bool | input = true |
||
| ) |
Construct an Option object.
When constructed, it will register itself with CLI.
| ignoreTemplate | Whether or not the template type matters for this option. Essentially differs options with no value (flags) from those that do, and thus require a type. |
| defaultValue | Default value this parameter will be initialized to. |
| identifier | The name of the option (no dashes in front; for –help, we would pass "help"). |
| description | A short string describing the option. |
| alias | Short name of the parameter. |
| required | Whether or not the option is required at runtime. |
| input | Whether or not the option is an input option. |
| Option | ( | const std::string & | identifier, |
| const std::string & | description, | ||
| const std::string & | alias | ||
| ) |
1.8.14