ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
arguments.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_cli of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6/// Published under #"mainpage_license".
7//==================================================================================================
8ALIB_EXPORT namespace alib::cli {
9
10/// Struct used as parent for types
11/// - #"cli::Command",
12/// - #"cli::Option", and
13/// - #"cli::Parameter".
14///
15/// Stores
16/// - a pointer to the #"CommandLine" object,
17/// - the position in #"ARG_VN", respectively #"ARG_VW" where the object was found, and
18/// - the number of arguments consumed when reading the object.
19///
20/// \note
21/// For technical reasons, other members that are shared between the derived types named above,
22/// have to be declared (each three times) with the types themselves.
23struct Parsed
24{
25 /// The cli command-line.
27
28 /// The index in #"ARG_VN", respectively #"ARG_VW", that this instance (derived option
29 /// or parameter) was found at.
31
32 /// The number of command-line arguments that a command consumed. This includes the command name
33 /// itself. If the method \b Read of derived types leaves this to <c>0</c>, then the option or
34 /// parameter was not found.
36
37 /// Constructor
38 /// @param cmdLine The command-line instance.
39 Parsed( CommandLine* cmdLine )
40 : CmdLine (cmdLine)
41 , Position ((std::numeric_limits<integer>::max)())
42 , ConsumedArguments(0) {}
43};
44
45
46//##################################################################################################
47// Decl and Def versions of commands, options, parameters and ExitCodes
48//##################################################################################################
49
50
51/// #"alib_enums_records;ALib Enum Record" type used by class #"ParameterDecl".
53 /// The identifier of the parameter.
55
56 /// An optional separator string (usually "=") that separates the parameter name from a
57 /// value given within the parameter itself.
59
60 /// A separator character for parsing multiple values.
61 /// If set to <c>'C'</c>, method #"ParameterDecl::ValueListSeparator;*" will return
62 /// <c>','</c> instead.
64
65 /// The number of arguments to consume and store in #"Parameter::Args;*".
66 /// If negative, parsing stops. If previous field, separator string is set and this
67 /// value is equal or greater to \c 1, then a missing separator string leads to
68 /// a parsing exception.
70
71 /// Denotes if this is an optional parameter.
73
74 /// Default constructor leaving the record undefined. (Implementation required as documented
75 /// #"EnumRecordPrototype();here".)
76 ERParameterDecl() noexcept =default;
77
78 /// Implementation of #"EnumRecordPrototype::Parse;*".
80 void Parse();
81 };
82
83/// A parameter of a #"CommandDecl".
84///
85/// Construction is done by passing a custom enum element of an enum type equipped with
86/// #"alib_enums_records;ALib Enum Records" of type #"ERParameterDecl".
87///
88/// When bootstrapping \alib_cli_nl, the method #"CommandLine::DefineParameters;*" has to be
89/// invoked for (each) enum type.
91{
92 protected:
93 /// The enumeration element given with construction.
95
96 /// A copy (!) of the enum record.
98
99 /// The resource information of the enumeration type given with construction.
101
102 public:
103 /// Templated constructor which takes an enum element of a custom type equipped with
104 /// #"alib_enums_records;ALib Enum Records" of type #"ERParameterDecl".
105 ///
106 /// @tparam TEnum C++ enum type equipped with corresponding \alib Enum Records.
107 /// @param element The enum element
108 template<typename TEnum>
109 ParameterDecl( TEnum element )
110 : declElement( element )
111 , resourceInfo(element) {
112 // make a copy of the resourced record
114
115 // fix separator character
116 if( record.valueListSeparator == 'C' )
117 record.valueListSeparator= ',';
118 }
119
120 /// Returns the type and integral value of the enumeration element used with construction.
121 /// @return The enumeration element used with construction.
122 const Enum& Element() const { return declElement; }
123
124 /// Returns the name of the parameter. This is not the identifier. The name is just for
125 /// help and configuration output.
126 ///
127 /// \see Method #".Identifier".
128 ///
129 /// @return The name of the enum element.
130 const String& Name() { return record.EnumElementName; }
131
132 /// Returns the identifier of the parameter. If this is empty, the parameter is not optional
133 /// and hence has no identifier.
134 ///
135 /// @return The name of the enum element.
136 const String& Identifier() { return record.identifier; }
137
138 /// Returns the minimum parse length of the identifier.
139 /// @return The minimum characters to satisfy the parameter.
140 int MinimumRecognitionLength() { return record.MinimumRecognitionLength; }
141
142 /// An optional separator string (usually "="), that separates the parameter name from a
143 /// parameter value.
144 /// @return The separator string.
145 const String& ValueSeparator() { return record.valueSeparator; }
146
147 /// A separator character for parsing multiple values.
148 /// @return The separator character.
150 { return record.valueListSeparator != 'C' ? record.valueListSeparator : ','; }
151
152 /// The number of CLI arguments to consume and store in #"Option::Args;*" with method
153 /// #"Parameter::Read;*".
154 ///
155 /// @return The parameter identifier.
156 int QtyExpectedArgsFollowing() { return record.RequiredArguments; }
157
158 /// Returns \c true if the parameter is optional. The information about this attribute is
159 /// used to create help messages and usage format strings only. It does not automatically
160 /// raise an exception if a parameter is not given. Such exception or other error treatment
161 /// is up to the user code.
162 /// @return \c true if the parameter is optional, \c false otherwise.
163 bool IsOptional() { return record.isOptional; }
164
165 /// Returns the short help text.
166 /// Loads the string from #".resourceInfo" using resource name \c "THelpParShtNN",
167 /// where \c NN is the enum element's integral value.
168 /// @return The help text.
170 { return resourceInfo.Get( NString64("THlpParSht_" ) << Name() ALIB_DBG(, true) ); }
171
172 /// Returns the long help text.
173 /// Loads the string from #".resourceInfo" using resource name \c "THelpParLngNN",
174 /// where \c NN is the enum element's integral value.
175 /// @return The help text.
177 { return resourceInfo.Get( String64("THlpParLng_" ) << Name() ALIB_DBG(, true)); }
178}; // ParameterDecl
179
180/// A declaration for a #"cli::Parameter".
181struct Parameter : public Parsed
182{
183 /// The underlying declaration.
185
186 /// Arguments belonging to us.
188
189 /// Constructor
190 /// @param cmdLine The command-line instance.
191 inline
192 Parameter( CommandLine* cmdLine );
193
194 /// Tries to read the object from the front of #"CommandLine::ArgsLeft;*".
195 /// Success is indicated by setting inherited fields #"Parsed::Position;*" and
196 /// #"Parsed::ConsumedArguments;*" to values greater than \c 0.
197 ///
198 /// If it could not be decided if the actual CLI argument contains this parameter, \c false
199 /// is returned to indicate that parsing commands has to stop now.
200 ///
201 /// This is done in the following cases:
202 /// - When #"ParameterDecl::Identifier;*" is empty and the parameter is
203 /// #"ParameterDecl::IsOptional;*" gives \c true.
204 /// - When it was successfully read, but #"ParameterDecl::QtyExpectedArgsFollowing;*"
205 /// is defined \c -1.
206 ///
207 /// See #"CommandLine;ReadNextCommands" for details
208 ///
209 /// @param decl The declaration used for reading
210 /// @return The \c true on success, \c false indicates that parsing has to end here.
212 bool Read( ParameterDecl& decl );
213};
214
215/// #"alib_enums_records;ALib Enum Record" type used by class #"OptionDecl".
217{
218 /// The name of the option as parsed from command-line if single hyphen <c>'-'</c> is used.
219 /// Defined as string to be able to have empty strings, which disables single character
220 /// options.
222
223 /// An optional separator string (usually "=") that separates the option name from a value
224 /// within the first argument itself.
225 /// If this is not given, field #".RequiredArguments" has to be \c 0.
227
228 /// The number of arguments to consume and store in #"Option::Args;*".
229 /// If this field is set and this value is not \c 0, then a missing separator string leads
230 /// to a parsing exception.
232
233 /// If not empty, the argument string will be replaced by this and the search for next options
234 /// continues.
235 /// Note: Shortcut options have to occur earlier in the enumeration's resource definition.
237
238 /// Defaulted constructor leaving the record undefined.
239 /// (Implementation required as documented
240 /// #"EnumRecordPrototype::EnumRecordPrototype();here".)
241 EROptionDecl() noexcept =default;
242
243 /// Implementation of #"EnumRecordPrototype::Parse;*".
245 void Parse();
246};
247
248/// A declaration for an #"cli::Option".
249///
250/// Construction is done by passing a custom enum element of an enum type equipped with
251/// #"alib_enums_records;ALib Enum Records" of type #"EROptionDecl".
252///
253/// When bootstrapping \alib_cli_nl, method #"CommandLine::DefineOptions;*" has to be
254/// invoked for (each) enum type.
255///
257{
258 protected:
259 /// The enumeration element given with construction.
261
262 /// A copy (!) of the enum record.
264
265 /// The resource information of the enumeration type given with construction.
267
268
269 public:
270 /// Templated constructor which takes an enum element of a custom type equipped with
271 /// #"alib_enums_records;ALib Enum Records" of type #"EROptionDecl".
272 ///
273 /// @tparam TEnum C++ enum type equipped with corresponding \alib Enum Records.
274 /// @param element The enum element
275 template<typename TEnum>
276 OptionDecl( TEnum element )
277 : declElement( element )
278 , resourceInfo(element)
279 {
280 // make a copy of the resourced record
282 }
283
284 /// Returns the type and integral value of the enumeration element used with construction.
285 /// @return The enumeration element used with construction.
286 const Enum& Element() const { return declElement; }
287
288 /// Returns the identifier of the option if double hyphen <c>'--'</c> is used.
289 /// @return The option identifier.
290 const String& Identifier() { return record.EnumElementName; }
291
292 /// Returns the minimum parse length of the identifier if double hyphen <c>'--'</c> is used.
293 /// @return The minimum characters to satisfy the option.
294 int MinimumRecognitionLength() { return record.MinimumRecognitionLength; }
295
296 /// Returns the identifier of the option if single hyphen <c>'-'</c> is used.
297 /// @return The option identifier.
299 {
300 return record.identifierChar.IsNotEmpty() ? record.identifierChar.CharAtStart()
301 : '\0';
302 }
303
304 /// An optional separator string (usually "="), that separates the parameter name from a
305 /// parameter value.
306 /// @return The separator string.
307 const String& ValueSeparator() { return record.valueSeparator; }
308
309 /// The number of CLI arguments to consume and store in #"Option::Args;*" with method
310 /// #"Option::Read;*".
311 /// @return The option identifier.
312 integer QtyExpectedArgsFollowing() { return record.RequiredArguments; }
313
314 /// If an option is a shortcut to another one, this string replaces the argument given.
315 /// @return The option identifier.
316 const String& ShortcutReplacementString() { return record.shortcutReplacementString; }
317
318
319 /// Returns a formal description of the usage.
320 /// Loads the string from #".resourceInfo" using resource name \c "TOptUsgNN",
321 /// where \c NN is the enum element's integral value.
322 /// @return The help text.
324 { return resourceInfo.Get( NString64("TOptUsg_" ) << Identifier() ALIB_DBG(, true) ); }
325
326 /// Returns the help text.
327 /// Loads the string from #".resourceInfo" using resource name \c "TOptHlpNN",
328 /// where \c NN is the enum element's integral value.
329 /// @return The help text.
331 { return resourceInfo.Get( NString64("TOptHlp_" ) << Identifier() ALIB_DBG(, true) ); }
332}; // OptionDecl
333
334/// An option of a command-line. Options are read "automatically" using their declaration
335/// information defined with externalized strings (resources) accessed through
336/// #"alib_enums_records;ALib Enum Records" associated with enum elements of enum custom types.
337///
338/// However, such automatic read is limited due to the fact, that the simple values and flags
339/// defined with #"OptionDecl", cannot provide the flexibility needed to perfectly
340/// parse options with a complex syntax.
341///
342/// In this case, the way out is to use custom code that invokes #"ReadOptions"
343/// and then processes all options that may have remaining arguments left in the list.
344/// By using the inherited field #"Parsed::Position", further arguments may be consumed from
345/// #"CommandLine::ArgsLeft".<br>
346/// Note that the term "processing all options" may mean a nested loop.
347/// The outer is over the option types in the field #"CommandLine::Options", the inner is over
348/// the vector of options per type.
349struct Option : public Parsed
350{
351 /// The declaration struct.
353
354 /// Arguments belonging to this option.
356
357 /// Constructor
358 /// @param cmdLine The command-line main object.
359 inline
360 Option( CommandLine* cmdLine );
361
362 /// Tries to read the object from the current CLI arg(s).
363 /// \note
364 /// Unlike the read methods #"Command::Read;*" and #"Parameter::Read;*", this
365 /// method expects the argument to test not only by number with \p{argNo} but as well
366 /// with string parameter \p{arg}.<br>
367 /// This redundancy is needed to easily implement shortcut options, that just
368 /// replace a shortcut option read to another one, probably with a preset argument included.
369 ///
370 /// @param decl The declaration used for reading.
371 /// @param arg The argument string starting with one or two hyphens.
372 /// @param argNo The position of reading.
373 /// @return The \c true on success, \c false otherwise.
375 bool Read( OptionDecl& decl, String& arg, const integer argNo );
376};
377
378/// #"alib_enums_records;ALib Enum Record" type used by class #"CommandDecl".
380{
381 /// List of parameters attached. Separated by <c>'/'</c>.
383
384 /// Default constructor leaving the record undefined.
385 /// (Implementation required as documented
386 /// #"EnumRecordPrototype();here".)
387 ERCommandDecl() noexcept =default;
388
389 /// Implementation of #"EnumRecordPrototype::Parse;*".
391 void Parse();
392};
393
394/// A declaration for a #"cli::Command".
395///
396/// Construction is done by passing a custom enum element of an enum type equipped with
397/// #"alib_enums_records;ALib Enum Records" of type #"ERCommandDecl".
398///
399/// When bootstrapping \alib_cli_nl, method #"CommandLine::DefineCommands;*" has to be
400/// invoked for (each) enum type.
401///
403{
404 protected:
405 /// The enumeration element given with construction.
407
408 /// A copy (!) of the enum record.
410
411 /// The resource information of the enumeration type given with construction.
413
414 public :
415 /// The command-line instance we belong to.
417
418 /// Command parameters.
420
421 /// Templated constructor which takes an enum element of a custom type equipped with
422 /// #"alib_enums_records;ALib Enum Records" of type #"ERCommandDecl".
423 ///
424 /// Field #".Parameters" is filled as specified in the enum record.
425 ///
426 /// @tparam TEnum C++ enum type equipped with corresponding \alib Enum Records.
427 /// @param element The enum element
428 /// @param cmdLine The command-line object. Will be stored.
429 template<typename TEnum>
430 inline
431 CommandDecl( TEnum element, CommandLine& cmdLine );
432
433 /// Returns the type and integral value of the enumeration element used with construction.
434 /// @return The enumeration element used with construction.
435 const Enum& Element() const { return declElement; }
436
437 /// Returns the identifier (name) of the command
438 /// @return The command identifier.
439 const String& Identifier() { return record.EnumElementName; }
440
441 /// Returns the minimum parse length of the identifier.
442 /// @return The minimum characters to satisfy the command to be parsed.
443 int MinimumRecognitionLength() { return record.MinimumRecognitionLength; }
444
445 /// Returns the short version of the help text.
446 /// Loads the string from #resourceInfo using resource name \c "THlpCmdShtNN",
447 /// where \c NN is the enum element's integral value.
448 /// @return The help text.
450 { return resourceInfo.Get( NString64("THlpCmdSht_" ) << Identifier() ALIB_DBG(, true) ); }
451
452 /// Returns the long version of the help text.
453 /// Loads the string from #resourceInfo using resource name \c "THlpCmdLngNN",
454 /// where \c NN is the enum element's integral value.
455 /// @return The help text.
457 { return resourceInfo.Get( NString64("THlpCmdLng_" ) << Identifier() ALIB_DBG(, true) ); }
458
459 /// Searches in #Parameters for the declaration of parameter \p{name}.
460 /// @param name The declaration name of the parameter.
461 /// @return A pointer to the parameter's declaration, \c nullptr if parameter was not
462 /// declared.
464 ParameterDecl* GetParameterDecl(const String& name );
465
466 protected:
467 /// Called from the constructor. Parses field #"ERCommandDecl::parameters;*" of the
468 /// enum record, and loads the corresponding parameters.
470 void addParamDecls();
471};
472
473/// A command of a \alib_cli_nl command-line.
474struct Command : public Parsed
475{
476 /// The underlying declaration.
478
479 /// Mandatory parameters parsed.
481
482 /// Optional parameters parsed.
484
485 /// Constructor
486 /// @param cmdLine The command-line instance.
487 inline
488 Command( CommandLine* cmdLine );
489
490 /// Tries to read the object from the front of #"CommandLine::ArgsLeft;*".
491 /// @param decl The declaration used for reading.
492 /// @return The \c true on success, \c false otherwise.
494 bool Read( CommandDecl& decl );
495
496 /// Searches in #ParametersMandatory and #ParametersOptional for parameter \p{name}.
497 /// @param name The declaration name of the parameter.
498 /// @return A pointer to the parameter, \c nullptr if parameter was not parsed.
500 Parameter* GetParsedParameter(const String& name );
501
502 /// Searches in #ParametersMandatory and #ParametersOptional for parameter \p{name} and returns
503 /// its (first) argument.
504 /// @param name The declaration name of the parameter.
505 /// @return The argument string, \b NULL_STRING if parameter was not parsed if not given.
507 String GetParsedParameterArg( const String& name );
508};
509
510/// #"alib_enums_records;ALib Enum Record" type used by class #"ExitCodeDecl".
511/// \note Field #"ERSerializable::MinimumRecognitionLength;*" is not read from the string,
512/// but set to fixed value \c 0.
514{
515 /// The CLI module exception associated to this exit-code.
517
518 /// Default constructor leaving the record undefined.
519 /// (Implementation required as documented
520 /// #"EnumRecordPrototype();here".)
521 ERExitCodeDecl() noexcept
522 : ERSerializable() {}
523
524 /// Implementation of #"EnumRecordPrototype::Parse;*".
526 void Parse();
527};
528
529/// An exit-code of a cli application.
530///
531/// Construction is done by passing a custom enum element of an enum type equipped with
532/// #"alib_enums_records;ALib Enum Records" of type #"ERExitCodeDecl".
533///
534/// When bootstrapping \alib_cli_nl, method #"CommandLine::DefineExitCodes;*" has to be
535/// invoked for (each) enum type.
536///
537/// Announcing the main application's exit-codes to the \alib_cli_nl module has two reasons:
538/// - The exit-codes are included in the help output text utility methods provided by class
539/// #"CommandLine".
540/// - \alib_cli_nl module exit-codes can be translated to valid exit-codes using
541/// method #"CLIUtil::GetExitCode;*".
543{
544 protected:
545 /// The enumeration element given with construction.
547
548 /// A copy (!) of the enum record.
550
551 /// The resource information of the enumeration type given with construction.
553
554
555 public:
556 /// Templated constructor which takes an enum element of a custom type equipped with
557 /// #"alib_enums_records;ALib Enum Records" of type #"ERExitCodeDecl".
558 ///
559 /// @tparam TEnum C++ enum type equipped with corresponding \alib Enum Records.
560 /// @param element The enum element.
561 template<typename TEnum>
562 ExitCodeDecl( TEnum element )
563 : declElement( element )
564 , resourceInfo(element)
565 {
566 // make a copy of the resourced record
568 }
569
570 /// Returns the name of the enum element
571 /// @return The name of the enum element.
572 const String& Name() { return record.EnumElementName; }
573
574 /// If an element of enum type #"cli::Exceptions" is associated with this exit-code, it
575 /// is returned. Otherwise, <c>cli::ExitCodes(-1)</c>.
576 ///
577 /// \see Method #"CLIUtil::GetExitCode;*".
578 /// @return The associated element of cli::Exceptions.
580 { return cli::Exceptions( record.associatedCLIException ); }
581
582 /// Returns the format string associated with this exit-code.
583 /// Loads the string from #resourceInfo using resource name \c "TExitNN",
584 /// where \c NN is the enum element's integral value.
585 /// @return The format string.
587 { return resourceInfo.Get( NString64("TExit" ) << declElement.Integral() ALIB_DBG(,true)); }
588};
589
590} // namespace [alib::cli]
#define ALIB_DLL
Definition alib.inl:573
#define ALIB_EXPORT
Definition alib.inl:562
#define ALIB_DBG(...)
Definition alib.inl:931
ERCommandDecl record
A copy (!) of the enum record.
ListMA< ParameterDecl * > Parameters
Command parameters.
CommandLine & CmdLine
The command-line instance we belong to.
CommandDecl(TEnum element, CommandLine &cmdLine)
const Enum & Element() const
const String & Identifier()
ResourceInfo resourceInfo
The resource information of the enumeration type given with construction.
const String & HelpTextShort()
Enum declElement
The enumeration element given with construction.
const String & HelpTextLong()
const String & FormatString()
ResourceInfo resourceInfo
The resource information of the enumeration type given with construction.
ExitCodeDecl(TEnum element)
cli::Exceptions AssociatedCLIException()
Enum declElement
The enumeration element given with construction.
ERExitCodeDecl record
A copy (!) of the enum record.
const String & Name()
OptionDecl(TEnum element)
const Enum & Element() const
EROptionDecl record
A copy (!) of the enum record.
const String & ValueSeparator()
Enum declElement
The enumeration element given with construction.
integer QtyExpectedArgsFollowing()
ResourceInfo resourceInfo
The resource information of the enumeration type given with construction.
const String & HelpUsageLine()
const String & ShortcutReplacementString()
const String & HelpText()
const String & Identifier()
character IdentifierChar()
const String & Identifier()
ParameterDecl(TEnum element)
const Enum & Element() const
const String & GetHelpTextLong()
const String & GetHelpTextShort()
ERParameterDecl record
A copy (!) of the enum record.
Definition arguments.inl:97
ResourceInfo resourceInfo
The resource information of the enumeration type given with construction.
Enum declElement
The enumeration element given with construction.
Definition arguments.inl:94
const String & Name()
const String & ValueSeparator()
const RecordsTraits< TEnum >::Type & GetRecord(TEnum element)
Definition records.inl:185
containers::List< T, MonoAllocator, TRecycling > ListMA
Type alias in namespace alib.
Definition list.inl:697
LocalString< 64 > String64
Type alias name for #"TLocalString;TLocalString<character,64>".
lang::integer integer
Type alias in namespace alib.
Definition integers.inl:149
strings::TString< character > String
Type alias in namespace alib.
Definition string.inl:2172
characters::nchar nchar
Type alias in namespace alib.
resources::ResourceInfo ResourceInfo
Type alias in namespace alib.
characters::character character
Type alias in namespace alib.
NLocalString< 64 > NString64
Type alias name for #"TLocalString;TLocalString<nchar,64>".
boxing::Enum Enum
Type alias in namespace alib.
Definition enum.inl:211
Parameter * GetParsedParameter(const String &name)
bool Read(CommandDecl &decl)
String GetParsedParameterArg(const String &name)
CommandDecl * Declaration
The underlying declaration.
Command(CommandLine *cmdLine)
ListMA< Parameter *, Recycling::Shared > ParametersMandatory
Mandatory parameters parsed.
ListMA< Parameter *, Recycling::Shared > ParametersOptional
Optional parameters parsed.
#"alib_enums_records;ALib Enum Record" type used by class #"CommandDecl".
void Parse()
Implementation of #"EnumRecordPrototype::Parse;*".
String parameters
List of parameters attached. Separated by '/'.
ERCommandDecl() noexcept=default
int associatedCLIException
The CLI module exception associated to this exit-code.
#"alib_enums_records;ALib Enum Record" type used by class #"OptionDecl".
EROptionDecl() noexcept=default
void Parse()
Implementation of #"EnumRecordPrototype::Parse;*".
#"alib_enums_records;ALib Enum Record" type used by class #"ParameterDecl".
Definition arguments.inl:52
void Parse()
Implementation of #"EnumRecordPrototype::Parse;*".
ERParameterDecl() noexcept=default
String identifier
The identifier of the parameter.
Definition arguments.inl:54
bool isOptional
Denotes if this is an optional parameter.
Definition arguments.inl:72
OptionDecl * Declaration
The declaration struct.
bool Read(OptionDecl &decl, String &arg, const integer argNo)
Definition arguments.cpp:64
ListMA< String, Recycling::Shared > Args
Arguments belonging to this option.
Option(CommandLine *cmdLine)
A declaration for a #"cli::Parameter".
Parameter(CommandLine *cmdLine)
ListMA< String, Recycling::Shared > Args
Arguments belonging to us.
ParameterDecl * Declaration
The underlying declaration.
bool Read(ParameterDecl &decl)
Parsed(CommandLine *cmdLine)
Definition arguments.inl:39
integer ConsumedArguments
Definition arguments.inl:35
CommandLine * CmdLine
The cli command-line.
Definition arguments.inl:26
ERSerializable() noexcept=default
Defaulted constructor leaving the record undefined.