ALib C++ Library
Library Version: 2412 R0
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  CliCamp
 
class  CLIUtil
 
struct  Command
 A command of a ALib CLI 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 cli::Parameter. More...
 
class  ParameterDecl
 
struct  Parsed
 

Enumeration Index:

enum class  DryRunModes { Off , CLIArgs , CLIDeclarations , Application }
 Dry run modes. More...
 
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 88 of file clicamp.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 64 of file clicamp.hpp.