ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::cli::ExitCodeDecl Class Reference

Description:

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 void 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 542 of file arguments.inl.

Public Method Index:

template<typename TEnum>
 ExitCodeDecl (TEnum element)
cli::Exceptions AssociatedCLIException ()
const StringFormatString ()
const StringName ()

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.

Field Details:

◆ declElement

Enum alib::cli::ExitCodeDecl::declElement
protected

The enumeration element given with construction.

Definition at line 546 of file arguments.inl.

◆ record

ERExitCodeDecl alib::cli::ExitCodeDecl::record
protected

A copy (!) of the enum record.

Definition at line 549 of file arguments.inl.

◆ resourceInfo

ResourceInfo alib::cli::ExitCodeDecl::resourceInfo
protected

The resource information of the enumeration type given with construction.

Definition at line 552 of file arguments.inl.

Constructor(s) / Destructor Details:

◆ ExitCodeDecl()

template<typename TEnum>
alib::cli::ExitCodeDecl::ExitCodeDecl ( TEnum element)
inline

Templated constructor which takes an enum element of a custom type equipped with ALib Enum Records of type ERExitCodeDecl.

Template Parameters
TEnumC++ enum type equipped with corresponding ALib Enum Records.
Parameters
elementThe enum element.

Definition at line 562 of file arguments.inl.

Method Details:

◆ AssociatedCLIException()

cli::Exceptions alib::cli::ExitCodeDecl::AssociatedCLIException ( )
inline

If an element of enum type Exceptions is associated with this exit-code, it is returned. Otherwise, cli::ExitCodes(-1).

See also
Method static integer GetExitCode(CommandLine&, Exception&) .
Returns
The associated element of cli::Exceptions.

Definition at line 579 of file arguments.inl.

◆ FormatString()

const String & alib::cli::ExitCodeDecl::FormatString ( )
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.

Returns
The format string.

Definition at line 586 of file arguments.inl.

◆ Name()

const String & alib::cli::ExitCodeDecl::Name ( )
inline

Returns the name of the enum element

Returns
The name of the enum element.

Definition at line 572 of file arguments.inl.


The documentation for this class was generated from the following file: