ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
cli.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_app of the \aliblong.
4///
5/// Copyright 2013-2026 A-Worx GmbH, Germany.
6/// Published under #"mainpage_license".
7//==================================================================================================
8ALIB_EXPORT namespace alib { namespace app {
9
10class CLIUtil;
11
12
13//==================================================================================================
14/// This class provides a foundation for software executables that processes command-line
15/// parameters.
16///
17/// \see
18/// "Utility" methods which could have been implemented as an interface of this
19/// class have instead been located as static methods in friend class #"CLIUtil" which
20/// receive a pointer to an instance of this type.
21///
22/// ## Friends ##
23/// class #"CLIUtil"
24///
25///\I{#############################################################################################}
26/// @throws Exception #"alib::app::CLIExceptions;2" \I{CLANGDUMMY}
27//==================================================================================================
29 //################################################################################################
30 // Type definitions
31 //################################################################################################
32 #if !DOXYGEN
33 // This friend provides utility methods for using this class.
34 friend class CommandDecl;
35 friend struct Command;
36 friend struct Option;
37 friend struct Parameter;
38 friend class CLIUtil;
39 #endif
40
41 //################################################################################################
42 // Type definitions
43 //################################################################################################
44 public:
45
46 //################################################################################################
47 // protected fields
48 //################################################################################################
49 protected:
50 /// Monotonic allocator used for all resourced static definitions as well as the data
51 /// used during parsing.
53
54 /// The element recycler shared between lists of strings.
56
57 /// The element recycler shared between fields #"Command::ParametersMandatory;*" and
58 /// #"Command::ParametersOptional;*".
60
61 //################################################################################################
62 // Fields
63 //################################################################################################
64 public:
65 /// Application information text.
66 /// Used as a sort of "header" output by class #"CLIUtil" .
68
69 //########################################### Arguments ##########################################
70 /// A vector of args. If the type of CLI argument strings provided with the constructor does
71 /// not match the #"ALIB_CHARACTERS_WIDE;default ALib string width", the strings get
72 /// converted.<br>
73 /// Values that are 'consumed' by options that get defined, are \b not removed from this
74 /// list. Instead, they are removed from index vector #"ArgsLeft".
76
77 /// A vector of args. If constructor variant accepting #"%characters::wchar"-strings is used,
78 /// those unicode strings get converted to 1-byte strings using the current locale.<br>
79 /// Values that are 'consumed' by options that get defined are removed.
81
82 //################################ Declarations (from custom enums) ##############################
83 /// Commands defined.
85
86 /// Possible Options.
88
89 /// Possible Parameters.
91
92 /// Possible Errors.
94
95 //####################################### Parsed CLI objects #####################################
96
97 /// The options parsed in the order of their appearance.
99
100 /// List of arguments that start with a hyphen and are ignored by this class due to the
101 /// fact that they were not recognized.
102 ///
103 /// \see Method #"ReadOptions" for details on this.
105
106 /// A list of commands actually parsed. Filled with method #"ReadNextCommands".
108
109 /// The next command in #"CommandsParsed" to be processed. Used with method #"NextCommand".
111
112 /// The maximum length of token names:
113 /// - 0: Commands
114 /// - 1: Options
115 ///
116 /// Note: Used for formatted help/dump output. (0= command, 1= option, 2= param)
117 integer MaxNameLength[3] ={ 0, 0, 0 };
118
119 /// The resource pool used to fetch resources from.
120 /// Several resources are loaded from this in addition to what is loaded as enum
121 /// meta-information of the cli declaration objects.
122 ///
123 /// It is recommended to have the main application implement a custom module, as
124 /// #"alib_mod_bs_custommods;described here".
126
127 /// The resource category to fetch CLI resources within field #"Resources".
129
130 //################################################################################################
131 // Constructor/destructor
132 //################################################################################################
133 public:
134 /// Constructor.
150
151 /// Virtual empty destructor.
152 virtual ~CommandLine() {}
153
154 //################################################################################################
155 // Definition interface
156 //################################################################################################
157 public:
158 /// Returns the allocator used for all command parsing, resourced enum record creation
159 /// and so on. This allocator might be used for allocations that align with (or are shorter
160 /// as) the lifecycle of the instance of this class.
161 ///
162 /// @return The internal allocator
163 MonoAllocator& GetAllocator() noexcept { return allocator; }
164
165 /// Helper function that uses fields #".Resources" and #".ResourceCategory" to fetch a
166 /// resourced string.<br>
167 ///
168 /// With debug-builds, this method asserts that a resource was found. If this is not
169 /// wanted, use #".TryResource".
170 ///
171 /// @param name The resource name.
172 /// @return The resource string, respectively a \e nulled string on failure.
173 const String& GetResource( const NString& name )
174 { return Resources->Get( ResourceCategory, name ALIB_DBG(, true) ); }
175
176 /// Helper function that uses fields #"Resources" and #".ResourceCategory" to fetch a
177 /// resourced string.<br>
178 ///
179 /// \note
180 /// Usually, it is recommended to use #".GetResource", which asserts with debug-builds
181 /// if a resource was not found.
182 ///
183 /// @param name The resource name.
184 /// @return The resource string, respectively a \e nulled string on failure.
185 const String& TryResource( const NString& name )
186 { return Resources->Get( ResourceCategory, name ALIB_DBG(, false) ); }
187
188
189 /// Simple helper method that invokes #".Init(resources::ResourcePool*, NCString)"
190 /// providing the resource pool and categery of the given \p{resModule}.
191 ///
192 /// @param resModule The module used to load resource strings.
193 void Init( camp::Camp* resModule )
194 { Init( &resModule->GetResourcePool(), resModule->ResourceCategory ); }
195
196 /// Initializes this class. This function has to be invoked after construction and
197 /// after \alib #"alib_mod_bs;was bootstrapped".
198 ///
199 /// This method accesses global \alib variables #"ARG_C;2", #"ARG_VN;2", and
200 /// #"ARG_VW;2", and thus those have to be set by the user's <c>main()</c>-function
201 /// properly.
202 ///
203 /// A resource pool has to be provided along with a corresponding resource category
204 /// to use. While it is not necessary to do, it is recommended to create a custom
205 /// \alib module, which holds such resource pool. For this case, overloaded
206 /// helper method #".Init(camp::Camp*)" is provided which calls this method by forwarding
207 /// the pool and category name from that module.
208 ///
209 /// @param resourcePool The resource pool used to load resource strings.
210 /// @param resCategory The resource category used to load resource strings.
212 virtual
213 void Init( resources::ResourcePool* resourcePool, NCString resCategory );
214
215 /// Defines parameters given with enumeration \p{TEnum}.
216 /// #"alib_enums_records;ALib Enum Records" of type #"ERParameterDecl" need to
217 /// be associated to the given enumeration type \p{TEnum}.
218 ///
219 /// @tparam TEnum The enum type.
220 template<typename TEnum>
221 requires ( EnumRecords<TEnum>::template AreOfType<ERParameterDecl>() )
223 for( auto recordIt= EnumRecords<TEnum>::begin()
224 ; recordIt!= EnumRecords<TEnum>::end ()
225 ; ++ recordIt )
226 {
227 ParameterDecls.emplace_back( allocator().New<ParameterDecl>(recordIt.Enum() ) );
228
229 if ( MaxNameLength[2] < recordIt->EnumElementName.Length() )
230 MaxNameLength[2]= recordIt->EnumElementName.Length();
231 } }
232
233 /// Removes a recognizable parameter previously defined with #".DefineParameters".
234 /// @see Chapter #"alib_app_cli_detail_undef" of the Programmer's Manual.
235 /// @param parameter The enumeration element that identifies the parameter to undefine.
236 void UndefineParameter(Enum parameter) {
237 for ( auto it= ParameterDecls.begin(); it!= ParameterDecls.end() ; ++it )
238 if ( (*it)->Element() == parameter ) {
239 ParameterDecls.erase( it );
240 return;
241 }
242 ALIB_ERROR("CLI", "Parameter '{}' not defined!", parameter)
243 }
244
245
246 /// Defines commands given with enumeration \p{TEnum}.
247 /// #"alib_enums_records;ALib Enum Records" of type #"ERCommandDecl" need to
248 /// be associated to the given enumeration type \p{TEnum}.
249 /// @tparam TEnum The enum type.
250 template<typename TEnum>
251 requires( EnumRecords<TEnum>::template AreOfType<ERCommandDecl>() )
253 for( auto recordIt= EnumRecords<TEnum>::begin()
254 ; recordIt!= EnumRecords<TEnum>::end ()
255 ; ++ recordIt )
256 {
257 CommandDecls.emplace_back( allocator().New<CommandDecl>(recordIt.Enum(), *this ) );
258
259 auto& name= CommandDecls.back()->Identifier();
260 if ( MaxNameLength[0] < name.Length() )
261 MaxNameLength[0]= name.Length();
262 } }
263
264 /// Removes a recognizable command previously defined with #".DefineCommands".
265 /// @see Chapter #"alib_app_cli_detail_undef" of the Programmer's Manual.
266 /// @param command The enumeration element that identifies the command to undefine.
267 void UndefineCommand(Enum command) {
268 for ( auto it= CommandDecls.begin(); it!= CommandDecls.end() ; ++it )
269 if ( (*it)->Element() == command ) {
270 CommandDecls.erase( it );
271 return;
272 }
273 ALIB_ERROR("CLI", "Command '{}' not defined!", command)
274 }
275
276
277 /// Defines options given with enumeration \p{TEnum}.
278 /// #"alib_enums_records;ALib Enum Records" of type #"EROptionDecl" need to
279 /// be associated to the given enumeration type \p{TEnum}.
280 /// @tparam TEnum The enum type.
281 template<typename TEnum>
282 requires ( EnumRecords<TEnum>::template AreOfType<EROptionDecl>() )
284 for( auto recordIt= EnumRecords<TEnum>::begin()
285 ; recordIt!= EnumRecords<TEnum>::end ()
286 ; ++ recordIt )
287 {
288 OptionDecls.emplace_back( allocator().New<OptionDecl>(recordIt.Enum() ) );
289
290 if ( MaxNameLength[1] < recordIt->EnumElementName.Length() )
291 MaxNameLength[1]= recordIt->EnumElementName.Length();
292 } }
293
294 /// Removes a recognizable option previously defined with #".DefineOptions".
295 /// @see Chapter #"alib_app_cli_detail_undef" of the Programmer's Manual.
296 /// @param option The enumeration element that identifies the option to undefine.
297 void UndefineOption(Enum option) {
298 for ( auto it= OptionDecls.begin(); it!= OptionDecls.end() ; ++it )
299 if ( (*it)->Element() == option ) {
300 OptionDecls.erase( it );
301 return;
302 }
303 ALIB_ERROR("CLI", "Option '{}' not defined!", option)
304 }
305
306 /// Defines exit-codes given with enumeration \p{TEnum}.
307 /// #"alib_enums_records;ALib Enum Records" of type #"ERExitCodeDecl" need to
308 /// be associated to the given enumeration type \p{TEnum}.
309 ///
310 /// @tparam TEnum The enum type.
311 template<typename TEnum>
312 requires ( EnumRecords<TEnum>::template AreOfType<ERExitCodeDecl>() )
314 for( auto recordIt= EnumRecords<TEnum>::begin()
315 ; recordIt!= EnumRecords<TEnum>::end ()
316 ; ++ recordIt )
317 ExitCodeDecls.EmplaceUnique( recordIt.Enum(),
318 allocator().New<ExitCodeDecl>(recordIt.Enum()) );
319 }
320
321 /// Removes a recognizable exit-code previously defined with #".DefineExitCodes".
322 /// @see Chapter #"alib_app_cli_detail_undef" of the Programmer's Manual.
323 /// @param exitCode The enumeration element that identifies the exitCode to undefine.
324 void UndefineExitCode(Enum exitCode) {
325 ALIB_DBG( auto cnt= )
326 ExitCodeDecls.EraseUnique(exitCode);
327 ALIB_ASSERT_ERROR(cnt==1, "CLI", "ExitCode '{}' not defined!", exitCode)
328 }
329
330
331 //################################################################################################
332 // Parsing interface
333 //################################################################################################
334 public:
335 /// Finalizes Initialization and has to be called after all invocations of:
336 /// - DefineCommands,
337 /// - DefineOptions,
338 /// - DefineParameters and
339 /// - DefineExitCodes,
340 ///
341 /// have been performed. All options recognized get collected in list #".Options"
342 /// The arguments of the options get removed from #".ArgsLeft".
343 ///
344 /// In case of options that have own parameter arguments, such arguments may not be fully
345 /// removed. This depends on whether it is possible with the simple flags and values
346 /// provided in #"OptionDecl" to enable class #"app::Option" to fully detect
347 /// them. Therefore, after this method is invoked, for options with more complex syntax,
348 /// custom code may be needed to pull the "remainders" of option arguments from #".ArgsLeft".
349 /// For this, the inherited field #"^Option::Position;*" is quite useful, as well as the method
350 /// #".RemoveArg".
351 ///
352 /// It has to be ensured that before the next step, which is the invocation of
353 /// #".ReadNextCommands", all option-related CLI arguments are cleaned away!
354 ///
355 /// For this reason, this method removes all arguments that start with a
356 /// hyphen \c '-' from the #".ArgsLeft", even if they got \e not recognized. Those CLI arguments
357 /// get collected in #".OptionArgsIgnored".
358 /// Finding unrecognized options is not considered an error, because other libraries used
359 /// with the software might read CLI options autonomously.
360 ///
361 /// \note
362 /// A good sample for this is class #"CLIVariablesPlugin" used with \alib
363 /// configuration variables. After this method has been invoked, vector
364 /// #".OptionArgsIgnored" may/should be passed to the plug-in #"%CLIVariablesPlugin" of
365 /// (all) #"Configuration" object(s) used with the application. For this,
366 /// an invocation, similar to this may be used with all \alibmods that use an own
367 /// configuration object:
368 ///
369 /// XYZModule.GetConfig()->GetPluginTypeSafe<alib::variables::CLIVariablesPlugin>()->SetArgs( &OptionArgsIgnored );
370 ///
371 /// In the case that other libraries have more complex option syntax, e.g., options
372 /// consisting of multiple arguments or such that do not even start with a hyphen character,
373 /// then, this method should be called <b>only after a custom code removes such 3rd party
374 /// options in a reliable way!</b>
375 ///
376 /// If all this was not done, the "remainder" of custom options might confuse parsing
377 /// of commands and its parameters and most probably would lead to an
378 /// "unknown" command error when the remainders of non-removed 3rd party option arguments
379 /// are consumed later.
380 ///
381 /// As a consequence of this approach, a subsequent call to this method has no effect.
383 virtual
384 void ReadOptions();
385
386 /// Searches and returns the last occurrence of the specified option.
387 ///
388 /// This method is to be used with options that overwrite previous values in case
389 /// that it was given multiple times as a CLI argument. Instead, options that may occur
390 /// multiple times without overriding a previous occurrence are to be processed
391 /// "manually" by examining field #".Options".
392 ///
393 /// @param element The option's declaration enum element.
394 /// @return A pointer to the parsed option, respectively \c nullptr if not given.
396 Option* GetOption( Enum element );
397
398 /// Parses as many commands as possible and stores them in #".CommandsParsed". Prior
399 /// to invoking this method, all CLI declarations have to be made. Furthermore, usually
400 /// method #".ReadOptions" has to be invoked before this method.
401 ///
402 /// The name of the method indicates that one or more, but maybe not all commands are read.
403 /// The reason for this behavior lies in the fact that commands may be defined that
404 /// do their own, specifically coded parsing. As a matter of the fact that the flags and
405 /// options of structs #"CommandDecl" and #"ParameterDecl" are kept rather
406 /// simple to match the most usual cases, the parsing of arguments of a command often
407 /// has to be left to be done by custom code. Mostly just when processing (executing) a
408 /// command. In contrast to the need of parsing (and processing) all CLI options,
409 /// given before processing commands, this is not a problem. The usual inner part of a
410 /// command processing loop then looks like this:
411 /// - Check if #".CommandsParsed" is empty
412 /// - Invoke this method (#"%ReadNextCommands" )
413 /// - If still no command is found, break loop
414 /// - Remove and process first command in #".CommandsParsed".
415 ///
416 /// A similar parsing approach is supported with the method #".NextCommand". The only difference
417 /// is that the parsed commands stay in #".CommandsParsed" and instead field #".NextCommandIt"
418 /// indicates the position of the next command to read. This way, commands may refer
419 /// to previous ones if this is needed.
420 ///
421 /// As a final note, it should be mentioned that implementing a "dry run" option on the
422 /// level of command parsing, for the reasons explained above, might need some specific
423 /// custom code to be able to parse all commands (without processing them). If such
424 /// functionality is wanted, it is best to separate custom command parsing from
425 /// command execution (the opposite was recommended above). Only the last command in the list
426 /// has to be 'manually' processed, as the previous ones obviously got parsed well.
427 /// With this approach, all commands can be parsed without executing them. Static utility
428 /// method #"CLIUtil::DumpParseResults;*" is a predefined way to then write information
429 /// about all options and commands parsed.<br>
430 /// A lower level "dry run", that receives information about the concrete actions that the
431 /// processing of commands would perform, is of course a different, application specific
432 /// task.
434 virtual
435 void ReadNextCommands();
436
437 /// Returns the next item in vector #".NextCommand". If needed, #".ReadNextCommands" is
438 /// invoked.
439 /// @return The next command parsed from CLI argument list. \c nullptr, if no more commands
440 /// are found.
442 virtual
444
445 /// Retrieves the number of arguments.
446 /// @return The number of arguments given.
447 virtual
448 int ArgCount() { return int(ArgStrings.size()); }
449
450 /// Retrieves the argument at the given position.<br>
451 /// In debug-builds, this method asserts the index is in the available range.
452 /// @param idx The requested argument's index.
453 /// @return The element \p{idx} of vector #ArgStrings.
454 virtual
456 ALIB_ASSERT_ERROR( idx >= 0 && size_t(idx) < ArgStrings.size(),
457 "CLI", "Argument index out of bounds" )
458 return ArgStrings[size_t(idx)];
459 }
460
461 /// Retrieves the next argument from the list without removing it.
462 ///
463 /// \see Method #PopArg, #RemoveArg and #ReadNextCommands.
464 ///
465 /// @return The first argument of (respectively remaining in) the list.
466 /// If no argument is available, a \e nulled string is returned.
467 virtual
469 {
470 return ArgsLeft.size() > 0 ? ArgStrings[size_t(ArgsLeft[0])]
471 : String();
472 }
473
474 /// Retrieves the next argument and removes it from list #ArgsLeft.
475 /// \see Method #PeekArg, #RemoveArg and #ReadNextCommands.
476 /// @return The first argument of vector #ArgsLeft.
477 /// If no argument is available, a \e nulled string is returned.
479 virtual
480 String PopArg();
481
482 /// Removes the argument at position \p{argNo}.
483 /// If the argument is not in #ArgsLeft, an \alib_assertion is raised.
484 ///
485 /// \see Method #PeekArg, #PopArg and #ReadNextCommands.
486 ///
487 /// @param argNo The argument number to remove.
488 /// @return \c false if the arg was removed before, \c true if the arg was removed now.
490 bool RemoveArg( integer argNo );
491}; // class CommandLine
492
493
494
495//##################################################################################################
496// Definitions of methods of related objects that can be only mede after CommandLine is defined
497//##################################################################################################
498inline
500: Parsed( cmdLine )
501, Args ( cmdLine->stringListRecycler ) {}
502
504: Parsed( cmdLine )
505, Args ( cmdLine->stringListRecycler ) {}
506
507template<typename TEnum>
508CommandDecl::CommandDecl( TEnum element, CommandLine& cmdLine )
509: declElement (element)
510, resourceInfo(element)
511, CmdLine (cmdLine )
512, Parameters (cmdLine.allocator) {
513 // make a copy of the resourced record
515
517}
518
520: Parsed ( cmdLine )
521, ParametersMandatory( cmdLine->paramListRecycler )
522, ParametersOptional ( cmdLine->paramListRecycler ) {}
523
524
525} // namespace alib[::basecamp]
526
527/// Type alias in namespace #"%alib".
529
530
531} // namespace [alib]
532
533
#define ALIB_DLL
#define A_CHAR(STR)
#define ALIB_ERROR(domain,...)
#define ALIB_EXPORT
#define ALIB_DBG(...)
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
#define ALIB_RESOURCED_IN_CAMP(T, Camp, ResName)
CommandLine & CmdLine
The command-line instance we belong to.
ListMA< ParameterDecl * > Parameters
Command parameters.
ERCommandDecl record
A copy (!) of the enum record.
CommandDecl(TEnum element, CommandLine &cmdLine)
Definition cli.hpp:508
ResourceInfo resourceInfo
The resource information of the enumeration type given with construction.
Enum declElement
The enumeration element given with construction.
HashMap< MonoAllocator, Enum, ExitCodeDecl * > ExitCodeDecls
Possible Errors.
Definition cli.hpp:93
MonoAllocator & GetAllocator() noexcept
Definition cli.hpp:163
const String & TryResource(const NString &name)
Definition cli.hpp:185
ListMA< Command * > CommandsParsed
A list of commands actually parsed. Filled with method #"ReadNextCommands".
Definition cli.hpp:107
CommandLine()
Constructor.
Definition cli.hpp:135
ListMA< Command * >::iterator NextCommandIt
The next command in #"CommandsParsed" to be processed. Used with method #"NextCommand".
Definition cli.hpp:110
void UndefineParameter(Enum parameter)
Definition cli.hpp:236
virtual String PopArg()
Definition cli.cpp:164
NCString ResourceCategory
The resource category to fetch CLI resources within field #"Resources".
Definition cli.hpp:128
MonoAllocator allocator
Definition cli.hpp:52
ListMA< CommandDecl * > CommandDecls
Commands defined.
Definition cli.hpp:84
virtual ~CommandLine()
Virtual empty destructor.
Definition cli.hpp:152
ListMA< Parameter *, Recycling::Shared >::SharedRecyclerType paramListRecycler
Definition cli.hpp:59
ListMA< String, Recycling::Shared >::SharedRecyclerType stringListRecycler
The element recycler shared between lists of strings.
Definition cli.hpp:55
Option * GetOption(Enum element)
Definition cli.cpp:117
ListMA< OptionDecl * > OptionDecls
Possible Options.
Definition cli.hpp:87
void UndefineExitCode(Enum exitCode)
Definition cli.hpp:324
resources::ResourcePool * Resources
Definition cli.hpp:125
void Init(camp::Camp *resModule)
Definition cli.hpp:193
virtual void ReadOptions()
Definition cli.cpp:57
ListMA< ParameterDecl * > ParameterDecls
Possible Parameters.
Definition cli.hpp:90
const String & GetResource(const NString &name)
Definition cli.hpp:173
virtual String GetArg(integer idx)
Definition cli.hpp:455
integer MaxNameLength[3]
Definition cli.hpp:117
ListMA< String, Recycling::Shared > OptionArgsIgnored
Definition cli.hpp:104
void UndefineCommand(Enum command)
Definition cli.hpp:267
bool RemoveArg(integer argNo)
Definition cli.cpp:173
virtual Command * NextCommand()
Definition cli.cpp:152
virtual void ReadNextCommands()
Definition cli.cpp:125
virtual String PeekArg()
Definition cli.hpp:468
StdVectorMA< integer > ArgsLeft
Definition cli.hpp:80
StdVectorMA< String > ArgStrings
Definition cli.hpp:75
virtual int ArgCount()
Definition cli.hpp:448
ListMA< Option * > Options
The options parsed in the order of their appearance.
Definition cli.hpp:98
void DefineParameters()
Definition cli.hpp:222
void UndefineOption(Enum option)
Definition cli.hpp:297
typename detail::RecyclingSelector< TRecycling > ::template HookType< MonoAllocator, detail::ListElement< T > > SharedRecyclerType
Definition list.hpp:98
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
const RecordsTraits< TEnum >::Type & GetRecord(TEnum element)
Definition records.hpp:182
Definition alox.cpp:14
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TString< nchar > NString
Type alias in namespace #"%alib".
Definition string.hpp:2174
strings::TCString< nchar > NCString
Type alias in namespace #"%alib".
Definition cstring.hpp:408
app::CommandLine CommandLine
Type alias in namespace #"%alib".
Definition cli.hpp:528
containers::List< T, MonoAllocator, TRecycling > ListMA
Type alias in namespace #"%alib".
Definition list.hpp:689
lang::integer integer
Type alias in namespace #"%alib".
Definition integers.hpp:149
enumrecords::EnumRecords< TEnum > EnumRecords
Type alias in namespace #"%alib".
Definition records.hpp:475
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
Definition string.hpp:2165
app::AppCamp APP
The singleton instance of the camp class used by class #"App".
Definition appcamp.cpp:1
std::vector< T, StdMA< T > > StdVectorMA
Type alias in namespace #"%alib".
boxing::Enum Enum
Type alias in namespace #"%alib".
Definition enum.hpp:210
A command argument of the command-line.
ListMA< Parameter *, Recycling::Shared > ParametersMandatory
Mandatory parameters parsed.
ListMA< Parameter *, Recycling::Shared > ParametersOptional
Optional parameters parsed.
Command(CommandLine *cmdLine)
Definition cli.hpp:519
ListMA< String, Recycling::Shared > Args
Arguments belonging to this option.
Option(CommandLine *cmdLine)
Definition cli.hpp:503
A declaration for a #"app::Parameter".
ListMA< String, Recycling::Shared > Args
Arguments belonging to us.
Parameter(CommandLine *cmdLine)
Definition cli.hpp:499
Parsed(CommandLine *cmdLine)
static ForwardIterator begin()
Definition records.hpp:373
static constexpr ForwardIterator end()
Definition records.hpp:381