ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::app Namespace Reference

Type Index:

class  App
class  AppCamp
class  CLIUtil
struct  Command
 A command argument of the command-line. More...
class  CommandDecl
class  CommandLine
struct  ERCommandDecl
 ALib Enum Record type used by class CommandDecl. More...
struct  ERExitCodeDecl
struct  EROptionDecl
 ALib Enum Record type used by class OptionDecl. More...
struct  ERParameterDecl
 ALib Enum Record type used by class ParameterDecl. More...
class  ExitCodeDecl
struct  Option
class  OptionDecl
struct  Parameter
 A declaration for a Parameter. More...
class  ParameterDecl
struct  Parsed

Enumeration Index:

enum class  CLIExceptions {
  NoCommandGiven = 1 , UnknownCommand = 2 , ParsingOptions =10 , ParsingCommand =20 ,
  MissingOptionValue =11 , IllegalOptionNameContinuation =12 , MissingParameterValue =21
}

Function Index:

template<typename TApp = App>
TApp & Get ()

Variable Index:

AppAPP_SINGLETON = nullptr

Enumeration Details:

◆ CLIExceptions

enum class alib::app::CLIExceptions
strong

Exceptions of module alib::app. As usual with class Exception, some of the exceptions are "inner exceptions" that are caught internally and re-thrown with more information and a different exception code.

The in this respect "external" exceptions that have to be caught by users of the library, are:

  • NoCommandGiven,
  • UnknownCommand,
  • ParsingOptions and
  • ParsingCommand.
Enumerator
NoCommandGiven 

Unknown command given.

UnknownCommand 

Unknown command given.

ParsingOptions 

General option parse error. Adds option help text.

ParsingCommand 

General parameter parse error. Adds command help text.

MissingOptionValue 

Missing argument when reading option. (Will be generalized with ParsingOptions.)

IllegalOptionNameContinuation 

An option was given in long name, but continued after its name in an undefined way. (Will be generalized with ParsingOptions.)

MissingParameterValue 

Missing argument when reading parameter. (Will be generalized with ParameterError.)

Definition at line 24 of file cliargtypes.hpp.

Function Details:

◆ Get()

template<typename TApp = App>
TApp & alib::app::Get ( )
inline

Convenience function that returns the singleton instance of an ALib application.

Template Parameters
TAppThe app type to cast to.
Returns
The dereferenced pointer to APP_SINGLETON.

Definition at line 770 of file app.hpp.

Variable Details:

◆ APP_SINGLETON

App * alib::app::APP_SINGLETON = nullptr

The application singleton-instance. This defaults to nullptr and is set by the constructor of class App.

Definition at line 4 of file app.cpp.