16DOX_MARKER( [DOX_EXPR_TUT_CLI_CUSTOM_CAMP_IMPL])
17void SampleCamp::Bootstrap() {
20 resourcePool->BootstrapBulk( ResourceCategory,
25 "Command line tool 'date'. V. {}.{} (in fact a sample application only)\n"
26 "(c) 2023-{} AWorx GmbH. Published under MIT License (Open Source).\n"
27 "For more information, see: https://alib.dev\n"
33 "1," "now" ",1" "," ","
34 "2," "file" ",1" ",filename" ","
35 "99," "help" ",1" ",topic" ) EOS
37"Commands<",
A_CHAR(
"datesample::Commands::"),
39"THlpCmdSht_now",
A_CHAR(
"Reports the actual date/time"),
40"THlpCmdLng_now",
A_CHAR(
"Reports the actual date/time. May be omitted, as this is the\n"
41 "default if no command is given.") EOS
43"THlpCmdSht_file",
A_CHAR(
"Returns the date/time of a file. "),
44"THlpCmdLng_file",
A_CHAR(
"Returns the last modification date/time of a file.") EOS
46"THlpCmdSht_help",
A_CHAR(
"Displays usage information. "),
47"THlpCmdLng_help",
A_CHAR(
"Displays usage information. Can also be given as an "
48 "option '--help'.") EOS
52"Options<",
A_CHAR(
"datesample::Options::"),
55 "0," "format" ",1," "f," "=" ",1," ","
56"99," "help" ",1," "h," "=" ",0," ) EOS
58"TOptUsg_format",
A_CHAR(
"--format[=]\"placeholders\""),
59"TOptHlp_format",
A_CHAR(
"Sets the output format. The format specification is given with\n"
60 "documentation of ALib method CalendarDateTime::Format, found here:\n"
61 "https://alib.dev/classalib_1_1strings_1_1util_1_1CalendarDateTime.html" ) ,
62"TOptUsg_help" ,
A_CHAR(
"--help[[=]TOPIC]"),
63"TOptHlp_help" ,
A_CHAR(
"Displays usage information.")
70"0," "FILENAME" ",1," "" "," "=" "," ",-1" ",0" ","
71"1," "TOPIC" ",1," "" "," "=" "," ",-1" ",1" ) EOS
73"Parameters<",
A_CHAR(
"datesample::Parameters::"),
74"THlpParSht_FILENAME",
A_CHAR(
"Mandatory parameter of command 'file."),
75"THlpParLng_FILENAME",
A_CHAR(
"Denotes the file that is used for retrieving the modification date.\n"
76 "This parameter is mandatory to command file and has to be appended\n"
77 "to this command, separated by '='"),
78"THlpParSht_TOPIC" ,
A_CHAR(
"Optional parameter of command (or option) 'help'."),
79"THlpParLng_TOPIC" ,
A_CHAR(
"Denotes a specific topic that the help command should be verbose about.")
86"100," "ErrUnknownCommand" ",-1" ","
87"101," "ErrUnknownOption" ",-1" ","
88"102," "ErrMissingFilename" ",-1" ","
89"103," "ErrUnknownHelpTopic" ",-1" ","
90"255," "ErrInternalError" ",-1" ) EOS
92"ExitCodes<",
A_CHAR(
"datesample::"),
94 "TExit0" ,
A_CHAR(
"Success (no error).")
95,
"TExit100" ,
A_CHAR(
"An unknown command was given. Valid commands are 'now' and 'file'")
96,
"TExit101" ,
A_CHAR(
"An unknown option was given. The only valid option is '--format='FORMATSPEC'.")
97,
"TExit102" ,
A_CHAR(
"Command 'file' given without a filename argument.")
98,
"TExit103" ,
A_CHAR(
"Command or option 'help' given without an unknown subtopic.")
99,
"TExit255" ,
A_CHAR(
"Unspecified internal error.")
103"HlpCLIAppName",
A_CHAR(
"date"),
104"HlpUsage" ,
A_CHAR(
"date [format=\"FORMATSPEC\" [now]|[file FILENAME]"),
105"HlpHdlOpts" ,
A_CHAR(
"OPTIONS:" ),
106"HlpHdlCmds" ,
A_CHAR(
"COMMANDS:" ),
107"HlpHdlExtCds" ,
A_CHAR(
"EXIT-CODES:" ),
108"HlpHdlUsage" ,
A_CHAR(
"USAGE:" ),
109"HlpHdlDscr" ,
A_CHAR(
"DESCRIPTION:" ),
110"HlpHdlPDscr" ,
A_CHAR(
"PARAMETER DESCRIPTION:" ),
111"HlpHdlTopic" ,
A_CHAR(
"Help on {} {!Q<>}:\n" ),
116"This is a sample application provided with C++ library 'ALib'\n"
117"to demonstrate the use of its module \"ALib CLI\"."
135DOX_MARKER( [DOX_EXPR_TUT_CLI_CUSTOM_CAMP_IMPL])
137DOX_MARKER( [DOX_EXPR_TUT_CLI_CUSTOM_CAMP_SINGLETON])
139SampleCamp SAMPLE_CAMP;
140DOX_MARKER( [DOX_EXPR_TUT_CLI_CUSTOM_CAMP_SINGLETON])
void Bootstrap(camp::Camp &camp, const NString &name, character innerDelim=',', character outerDelim=',')
ShutdownPhases
Termination levels usable with #"alib_mod_bs_camps;Bootstrapping ALib Camps".