An exit code of a cli application.
Construction is done by passing a custom enum element of an enum type equipped with ALib Enum Records of type ERExitCodeDecl.
When bootstrapping ALib CLI, method CommandLine::DefineExitCodes has to be invoked for (each) enum type.
Announcing the main application's exit codes to the ALib CLI module has two reasons:
Definition at line 615 of file arguments.hpp.
#include <arguments.hpp>
Public Method Index: | |
template<typename TEnum > | |
ExitCodeDecl (TEnum element) | |
cli::Exceptions | AssociatedCLIException () |
const String & | FormatString () |
const String & | Name () |
Protected Field Index: | |
Enum | declElement |
The enumeration element given with construction. | |
ERExitCodeDecl | 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 619 of file arguments.hpp.
|
protected |
A copy (!) of the enum record.
Definition at line 622 of file arguments.hpp.
|
protected |
The resource information of the enumeration type given with construction.
Definition at line 625 of file arguments.hpp.
|
inline |
Templated constructor which takes an enum element of a custom type equipped with ALib Enum Records of type ERExitCodeDecl.
TEnum | C++ enum type equipped with corresponding ALib Enum Records. |
element | The enum element. |
Definition at line 635 of file arguments.hpp.
|
inline |
If an element of enum type Exceptions is associated with this exit code, it is returned. Otherwise cli::ExitCodes(-1)
.
Definition at line 655 of file arguments.hpp.
|
inline |
Returns the format string associated with this exit code. Loads the string from resourceInfo using resource name "TExitNN"
, where NN
is the enum element's integral value.
Definition at line 664 of file arguments.hpp.
|
inline |
Returns the name of the enum element
Definition at line 645 of file arguments.hpp.