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

Description:

This is the reference documentation of sub-namespace app of the ALib C++ Framework, which holds types of library module ALib App.

Besides this reference documentation, further documentation and source code samples for this module is provided with ALib Module App - Programmer's Manual.

Type Index:

class  App
class  AppCli
class  AppCliCamp

Enumeration Index:

enum class  Commands { Help = 1 , Version = 2 , Info = 3 , SetVariables = 4 }
 Built-in commands used with class AppCli. More...
enum class  ExitCodes {
  ErrNoCmdGiven = 1 , ErrUnknownCommand = 2 , ErrParsingOption = 3 , ErrParsingCommand = 4 ,
  ErrMissingCmdParam = 5 , ErrMissingOptParam = 6 , ErrBadParamValue = 7
}
 Built-in exit-code used with class AppCli. More...
enum class  Options {
  Help = 1 , Version = 2 , DryRun = 3 , Config = 4 ,
  Verbose = 5
}
 Built-in options used with class AppCli. More...
enum class  Parameters { Topic = 1 , DryRunMode = 2 }
 Built-in parameters of commands and options used with class AppCli. More...

Function Index:

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

Variable Index:

AppAPP_SINGLETON = nullptr

Enumeration Details:

◆ Commands

enum class alib::app::Commands
strong

Built-in commands used with class AppCli.

Enumerator
Help 

Show help text.

Version 

Show version information.

Info 

Show info and configuration details.

SetVariables 

Store a variable persistently in the configuration file.

Definition at line 19 of file appclienums.inl.

◆ ExitCodes

enum class alib::app::ExitCodes
strong

Built-in exit-code used with class AppCli.

Enumerator
ErrNoCmdGiven 

No command given.

ErrUnknownCommand 

Unknown command.

ErrParsingOption 

Error when parsing an option.

ErrParsingCommand 

Error when parsing a command.

ErrMissingCmdParam 

Missing parameter of a command.

ErrMissingOptParam 

Missing parameter of an option.

ErrBadParamValue 

Bad parameter value.

Definition at line 44 of file appclienums.inl.

◆ Options

enum class alib::app::Options
strong

Built-in options used with class AppCli.

Enumerator
Help 

Alternative to command 'help' as many people are used to pass the help command as an option.

Version 

Alternative to command 'version' as many people are used to pass the version command as an option.

DryRun 

Show help text.

Config 

Change name of config file(s).

Verbose 

Be verbose.

Definition at line 27 of file appclienums.inl.

◆ Parameters

enum class alib::app::Parameters
strong

Built-in parameters of commands and options used with class AppCli.

Enumerator
Topic 

Used with command help to optionally denote a help topic.

DryRunMode 

Used with command dryrun to optionally denote level.

Definition at line 38 of file appclienums.inl.

Function Details:

◆ Get()

template<typename TApp = app::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 721 of file app.inl.

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 40 of file app.cpp.