ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
appclienums.inl
1//##################################################################################################
2// ALib C++ Framework
3// Configuration Sample
4//
5// Copyright 2025 A-Worx GmbH, Germany
6// Published under Boost Software License (a free software license, see LICENSE.txt)
7//##################################################################################################
8
9//==================================================================================================
10/// This is the reference documentation of sub-namespace \c app of the \aliblink, which
11/// holds types of library module \alib_app_nl.
12///
13/// Besides this reference documentation, further documentation and source code samples for this
14/// module is provided with #"alib_mod_app;ALib Module App - Programmer's Manual".
15//==================================================================================================
16ALIB_EXPORT namespace alib::app {
17
18/// Built-in commands used with class #"AppCli".
19enum class Commands {
20 Help = 1, ///< Show help text.
21 Version = 2, ///< Show version information.
22 Info = 3, ///< Show info and configuration details.
23 SetVariables = 4, ///< Store a variable persistently in the configuration file.
24};
25
26/// Built-in options used with class #"AppCli".
27enum class Options {
28 Help = 1, ///< Alternative to command 'help' as many people are used to
29 ///< pass the help command as an option.
30 Version = 2, ///< Alternative to command 'version' as many people are used to
31 ///< pass the version command as an option.
32 DryRun = 3, ///< Show help text.
33 Config = 4, ///< Change name of config file(s).
34 Verbose = 5, ///< Be verbose.
35};
36
37/// Built-in parameters of commands and options used with class #"AppCli".
38enum class Parameters {
39 Topic = 1, ///< Used with command \e help to optionally denote a help topic.
40 DryRunMode = 2, ///< Used with command \e dryrun to optionally denote level.
41};
42
43/// Built-in exit-code used with class #"AppCli".
44enum class ExitCodes {
45 ErrNoCmdGiven = 1, ///< No command given.
46 ErrUnknownCommand = 2, ///< Unknown command.
47 ErrParsingOption = 3, ///< Error when parsing an option.
48 ErrParsingCommand = 4, ///< Error when parsing a command.
49 ErrMissingCmdParam = 5, ///< Missing parameter of a command.
50 ErrMissingOptParam = 6, ///< Missing parameter of an option.
51 ErrBadParamValue = 7, ///< Bad parameter value.
52};
53
54
55} // namespace [alib::app]
56
57// assigning ALib enum records
58// Specifying our custom module to hold resources of our enum records
60ALIB_CAMP_ENUM( alib::app::Options , alib::cli::EROptionDecl , alib::APPCLI_CAMP , "Options" )
61ALIB_CAMP_ENUM( alib::app::Parameters , alib::cli::ERParameterDecl , alib::APPCLI_CAMP , "Parameters" )
62ALIB_CAMP_ENUM( alib::app::ExitCodes , alib::cli::ERExitCodeDecl , alib::APPCLI_CAMP , "ExitCodes" )
63ALIB_CAMP_ENUM( alib::app::App::BuiltInExitCodes, alib::cli::ERExitCodeDecl , alib::APPCLI_CAMP , "BIExitCodes" )
#define ALIB_EXPORT
Definition alib.inl:562
#define ALIB_CAMP_ENUM(T, TRecord, Camp, ResName)
Options
Built-in options used with class #"AppCli".
@ DryRun
Show help text.
@ Verbose
Be verbose.
@ Config
Change name of config file(s).
ExitCodes
Built-in exit-code used with class #"AppCli".
@ ErrUnknownCommand
Unknown command.
@ ErrMissingCmdParam
Missing parameter of a command.
@ ErrNoCmdGiven
No command given.
@ ErrParsingOption
Error when parsing an option.
@ ErrMissingOptParam
Missing parameter of an option.
@ ErrBadParamValue
Bad parameter value.
@ ErrParsingCommand
Error when parsing a command.
Commands
Built-in commands used with class #"AppCli".
@ Version
Show version information.
@ Info
Show info and configuration details.
@ Help
Show help text.
@ SetVariables
Store a variable persistently in the configuration file.
Parameters
Built-in parameters of commands and options used with class #"AppCli".
@ Topic
Used with command help to optionally denote a help topic.
@ DryRunMode
Used with command dryrun to optionally denote level.
app::AppCliCamp APPCLI_CAMP
The singleton instance of the camp class used by class #"AppCli".
#"alib_enums_records;ALib Enum Record" type used by class #"CommandDecl".