ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Methods | Protected Fields | List of all members
ExitCodeDecl Class Reference

#include <arguments.hpp>

Collaboration diagram for ExitCodeDecl:
[legend]

Class 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 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 721 of file arguments.hpp.

Public Methods

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

Protected Fields

Enum declElement
 
ERExitCodeDecl record
 
ResourceInfo resourceInfo
 

Constructor & Destructor Documentation

◆ 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 743 of file arguments.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ AssociatedCLIException()

cli::Exceptions 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 CLIUtil::GetExitCode.
Returns
The associated element of cli::Exceptions.

Definition at line 767 of file arguments.hpp.

◆ FormatString()

const String& 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 778 of file arguments.hpp.

Here is the call graph for this function:

◆ Name()

const String& Name ( )
inline

Returns the name of the enum element

Returns
The name of the enum element.

Definition at line 755 of file arguments.hpp.

Member Data Documentation

◆ declElement

Enum declElement
protected

The enumeration element given with construction.

Definition at line 725 of file arguments.hpp.

◆ record

ERExitCodeDecl record
protected

A copy (!) of the enum record.

Definition at line 728 of file arguments.hpp.

◆ resourceInfo

ResourceInfo resourceInfo
protected

The resource information of the enumeration type given with construction.

Definition at line 731 of file arguments.hpp.


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