MLPACK
1.0.4
|
A static object whose constructor registers a parameter with the CLI class. More...
Public Member Functions | |
Option (bool ignoreTemplate, N defaultValue, const std::string &identifier, const std::string &description, const std::string &parent=std::string(""), bool required=false) | |
Construct an Option object. | |
Option (const std::string &identifier, const std::string &description, const std::string &parent=std::string("")) | |
Constructs an Option object. |
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 42 of file option.hpp.
mlpack::util::Option< N >::Option | ( | bool | ignoreTemplate, |
N | defaultValue, | ||
const std::string & | identifier, | ||
const std::string & | description, | ||
const std::string & | parent = std::string("") , |
||
bool | required = false |
||
) |
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. |
parent | Full pathname of the parent module that "owns" this option. The default is the root node (an empty string). |
required | Whether or not the option is required at runtime. |
mlpack::util::Option< N >::Option | ( | const std::string & | identifier, |
const std::string & | description, | ||
const std::string & | parent = std::string("") |
||
) |
Constructs an Option object.
When constructed, it will register a flag with CLI.
identifier | The name of the option (no dashes in front); for --help we would pass "help". |
description | A short string describing the option. |
parent | Full pathname of the parent module that "owns" this option. The default is the root node (an empty string). |