A declaration for an cli::Option.
Construction is done by passing a custom enum element of an enum type equipped with ALib Enum Records of type EROptionDecl.
When bootstrapping ALib CLI, method CommandLine::DefineOptions has to be invoked for (each) enum type.
Definition at line 294 of file arguments.hpp.
#include <arguments.hpp>
Public Method Index: | |
template<typename TEnum > | |
OptionDecl (TEnum element) | |
const Enum & | Element () const |
const String & | HelpText () |
const String & | HelpUsageLine () |
const String & | Identifier () |
character | IdentifierChar () |
int | MinimumRecognitionLength () |
integer | QtyExpectedArgsFollowing () |
const String & | ShortcutReplacementString () |
const String & | ValueSeparator () |
Protected Field Index: | |
Enum | declElement |
The enumeration element given with construction. | |
EROptionDecl | record |
A copy (!) of the enum record. | |
ResourceInfo | resourceInfo |
The resource information of the enumeration type given with construction. | |
|
protected |
The enumeration element given with construction.
Definition at line 298 of file arguments.hpp.
|
protected |
A copy (!) of the enum record.
Definition at line 301 of file arguments.hpp.
|
protected |
The resource information of the enumeration type given with construction.
Definition at line 304 of file arguments.hpp.
|
inline |
Templated constructor which takes an enum element of a custom type equipped with ALib Enum Records of type EROptionDecl.
TEnum | C++ enum type equipped with corresponding ALib Enum Records. |
element | The enum element |
Definition at line 314 of file arguments.hpp.
|
inline |
Returns the type and integral value of the enumeration element used with construction.
Definition at line 324 of file arguments.hpp.
|
inline |
Returns the help text. Loads the string from resourceInfo using resource name "TOptHlpNN"
, where NN
is the enum element's integral value.
Definition at line 388 of file arguments.hpp.
|
inline |
Returns a formal description of the usage. Loads the string from resourceInfo using resource name "TOptUsgNN"
, where NN
is the enum element's integral value.
Definition at line 379 of file arguments.hpp.
|
inline |
Returns the identifier of the option if double hyphen '–'
is used.
Definition at line 331 of file arguments.hpp.
|
inline |
Returns the identifier of the option if single hyphen '-'
is used.
Definition at line 345 of file arguments.hpp.
|
inline |
Returns the minimum parse length of the identifier if double hyphen '–'
is used.
Definition at line 338 of file arguments.hpp.
|
inline |
The number of CLI arguments to consume and store in Option::Args with method Option::Read.
Definition at line 362 of file arguments.hpp.
|
inline |
If an option is a shortcut to another one, this string replaces the argument given.
Definition at line 369 of file arguments.hpp.
|
inline |
An optional separator string (usually "="), that separates the parameter name from a parameter value.
Definition at line 354 of file arguments.hpp.