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 339 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 |
The enumeration element given with construction.
Definition at line 343 of file arguments.hpp.
|
protected |
A copy (!) of the enum record.
Definition at line 346 of file arguments.hpp.
|
protected |
The resource information of the enumeration type given with construction.
Definition at line 349 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 361 of file arguments.hpp.
|
inline |
Returns the type and integral value of the enumeration element used with construction.
Definition at line 373 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 453 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 442 of file arguments.hpp.
|
inline |
Returns the identifier of the option if double hyphen '–'
is used.
Definition at line 382 of file arguments.hpp.
|
inline |
Returns the identifier of the option if single hyphen '-'
is used.
Definition at line 400 of file arguments.hpp.
|
inline |
Returns the minimum parse length of the identifier if double hyphen '–'
is used.
Definition at line 391 of file arguments.hpp.
|
inline |
The number of CLI arguments to consume and store in Option::Args with method Option::Read .
Definition at line 421 of file arguments.hpp.
|
inline |
If an option is a shortcut to another one, this string replaces the argument given.
Definition at line 430 of file arguments.hpp.
|
inline |
An optional separator string (usually "="), that separates the parameter name from a parameter value.
Definition at line 411 of file arguments.hpp.