2// #################################################################################################
4// Resources of ALib Camp "App"
6// Copyright 2025 A-Worx GmbH, Germany
7// Published under Boost Software License (a free software license, see LICENSE.txt)
8// #################################################################################################
10//------------------------------------------ CLI Exceptions ----------------------------------------
13E0 ~ 1 , NoCommandGiven , ED1
14E1 ~ 2 , UnknownCommand , ED2
15E2 ~ 10 , ParsingOptions , ED10
16E3 ~ 11 , MissingOptionValue , ED11
17E4 ~ 12 , IllegalOptionNameContinuation , ED12
18E5 ~ 20 , ParsingCommand , ED20
19E6 ~ 21 , MissingParameterValue , ED21
21// messages of general exceptions
23ED2 Unknown command found with CLI argument{!Q[]}={!Q}
25 Error parsing option. Usage:\n
28 Error parsing command. Usage: {}\n
31// messages of internal exceptions
33 Missing argument(s) of option {!Q<>} found with CLI argument{!Q[]}={!Q}.\n
34 Expected {}, given {}.
36 Option identifier {!Q<>} found at start of CLI argument{!Q[]}={!Q},\n
37 while CLI argument string continues with non-argument identifier characters.
39 Missing argument(s) of parameter {!Q<>} found with CLI argument{!Q[]}={!Q}.\n
40 Quantity expected {}, quantity given {}.
42//------------------------------------------ Single Strings ----------------------------------------
45//--------------------------------------------- Commands -------------------------------------------
47//enum ident minread Params
54THlpCmdSht_help Shows general help or help on topics,
56 Shows general help, respectively detail help on the optionally given TOPIC(s), which
57 can be a command or an option - or a parameter of such.\n
58 If command 'help' is given, no further CLI commands are processed and execution is stopped.
60THlpCmdSht_version Shows the version of this software.
61THlpCmdLng_version Shows the version of this software.
62THlpCmdSht_info Shows information about this software.
63THlpCmdLng_info Shows information about this software.
66//--------------------------------------------- Options --------------------------------------------
68 //enum ident minread identChar in-arg-separ. args to consume ShortcutTo
70 1, help ,4, h, = ,0, ,
71 2, version ,7, , ,0, ,
72 3, dryrun ,6, d, = ,0, ,
73 4, config ,6, c, = ,1, ,
74 5, verbose ,7, v, = ,0,
76TOptUsg_help --help[[=]TOPIC]
77TOptHlp_help Displays usage information.
78TOptUsg_version --version
79TOptHlp_version Displays the version of this software.
80TOptUsg_dryrun -d|--dryrun[=yes|no]
81TOptHlp_dryrun Enables dryrun-mode for sandbox testing. No changes are performed.
82TOptUsg_config --config=filename1[[,filename2],filename3]...
83TOptHlp_config Allows to change the name (and path) of the configuration file(s)
84TOptUsg_verbose --verbose[=\level\]
85TOptHlp_verbose Changes verbosity to 'VERBOSE' or the optionally given preset.
88//-------------------------------------------- Parameters ------------------------------------------
89// enum name minIdentLen identifier in-arg-sep delim args to consume isOptional
90// (if empty -> mandatory!)
92 1, TOPIC ,1, , = , ,-1 ,1
94Parameters< Parameters::
95THlpParSht_TOPIC Optional parameter of command (or option) 'help'.
96THlpParLng_TOPIC Denotes a specific topic that the help command should be verbose about.
99//-------------------------------------------- ExitCodes -------------------------------------------
100ExitCodes< ExitCodes::
104 2, ErrUnknownCommand ,
105 3, ErrParsingOption ,
106 4, ErrParsingCommand ,
107 5, ErrMissingCmdParam ,
108 6, ErrMissingOptParam ,
109 7, ErrBadParamValue ,
110 10, ErrConfigFileNotFound ,
111 11, ErrConfigFileNotWritable ,
114TExit0 Success (no error).
115TExit1 No command given.
116TExit2 Unknown command {!Q} given.
117TExit3 Unknown option {!Q} was given.
118TExit4 An error occurred when parsing the command {!Q}.
119TExit5 Missing a mandatory parameter {!Q} of the given command {!Q}.
120TExit6 Missing a mandatory parameter {!Q} of the given option {!Q}.
121TExit7 Parameter {!Q} is not suitable for command or option {!Q}.
122TExit10 Configuration file {!Q} not found.
123TExit11 Configuration file {!Q} not writeable.
124TExit127 An unexpected (unhandled) internal error occurred.
127//-------------------------------------------- Help Texts ------------------------------------------
130HlpHdlExtCds EXIT-CODES:
132HlpHdlDscr DESCRIPTION:
133HlpHdlPDscr PARAMETER DESCRIPTION:
134HlpHdlTopic Help on {} {!Q<>}:\n