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, the method void DefineOptions() has to be invoked for (each) enum type.
Definition at line 283 of file cliargtypes.hpp.
#include <cliargtypes.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 286 of file cliargtypes.hpp.
|
protected |
A copy (!) of the enum record.
Definition at line 289 of file cliargtypes.hpp.
|
protected |
The resource information of the enumeration type given with construction.
Definition at line 292 of file cliargtypes.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 302 of file cliargtypes.hpp.
|
inline |
Returns the type and integral value of the enumeration element used with construction.
Definition at line 312 of file cliargtypes.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 356 of file cliargtypes.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 349 of file cliargtypes.hpp.
|
inline |
Returns the identifier of the option if double hyphen '–' is used.
Definition at line 316 of file cliargtypes.hpp.
|
inline |
Returns the identifier of the option if single hyphen '-' is used.
Definition at line 324 of file cliargtypes.hpp.
|
inline |
Returns the minimum parse length of the identifier if double hyphen '–' is used.
Definition at line 320 of file cliargtypes.hpp.
|
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 338 of file cliargtypes.hpp.
|
inline |
If an option is a shortcut to another one, this string replaces the argument given.
Definition at line 342 of file cliargtypes.hpp.
|
inline |
An optional separator string (usually "="), that separates the parameter name from a parameter value.
Definition at line 333 of file cliargtypes.hpp.