A declaration for an 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 void DefineOptions() has to be invoked for (each) enum type.
Definition at line 256 of file arguments.inl.
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 260 of file arguments.inl.
|
protected |
A copy (!) of the enum record.
Definition at line 263 of file arguments.inl.
|
protected |
The resource information of the enumeration type given with construction.
Definition at line 266 of file arguments.inl.
|
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 276 of file arguments.inl.
|
inline |
Returns the type and integral value of the enumeration element used with construction.
Definition at line 286 of file arguments.inl.
|
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 330 of file arguments.inl.
|
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 323 of file arguments.inl.
|
inline |
Returns the identifier of the option if double hyphen '–' is used.
Definition at line 290 of file arguments.inl.
|
inline |
Returns the identifier of the option if single hyphen '-' is used.
Definition at line 298 of file arguments.inl.
|
inline |
Returns the minimum parse length of the identifier if double hyphen '–' is used.
Definition at line 294 of file arguments.inl.
|
inline |
The number of CLI arguments to consume and store in ListMA< String, Recycling::Shared > Args with method bool Read(OptionDecl&, String&, const integer) .
Definition at line 312 of file arguments.inl.
|
inline |
If an option is a shortcut to another one, this string replaces the argument given.
Definition at line 316 of file arguments.inl.
|
inline |
An optional separator string (usually "="), that separates the parameter name from a parameter value.
Definition at line 307 of file arguments.inl.