ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::cli Namespace Reference

Description:


This is the reference documentation of sub-namespace cli of the ALib C++ Library , which holds types of library module ALib CLI .

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

Type Index:

class  Cli
 
class  CLIUtil
 
struct  Command
 
class  CommandDecl
 
class  CommandLine
 
struct  ERCommandDecl
 
struct  ERExitCodeDecl
 
struct  EROptionDecl
 
struct  ERParameterDecl
 
class  ExitCodeDecl
 
struct  Option
 
class  OptionDecl
 
struct  Parameter
 
class  ParameterDecl
 
struct  Parsed
 

Enumeration Index:

enum class  DryRunModes { Off , CLIArgs , CLIDeclarations , Application }
 
enum class  Exceptions {
  NoCommandGiven = 1 , UnknownCommand = 2 , ParsingOptions =10 , ParsingCommand =20 ,
  MissingOptionValue =11 , IllegalOptionNameContinuation =12 , MissingParameterValue =21 , END_OF_ENUM
}
 

Enumeration Details:

◆ DryRunModes

enum class DryRunModes
strong

Dry run modes.

Enumerator
Off 

No dry run.

CLIArgs 

Displays the results of the command line argument parsing.

CLIDeclarations 

Just displays the cli setup. This is more for debugging or interested users.

Application 

Dry run on application level: Given commands are invoked, nothing is executed, but probably log information is written. Application specific behavior. This is the default if no argument is given to the dry-run opton

Definition at line 96 of file cli.hpp.

◆ Exceptions

enum class Exceptions
strong

Exceptions of module alib::cli. 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 72 of file cli.hpp.