15 #if !ALIB_CHARACTERS_WIDE
17 for (
int i= 1; i <
ARG_C ; ++i ) {
26 for (
int i= 1; i <
ARG_C ; ++i ) {
32 #if ALIB_CHARACTERS_NATIVE_WCHAR
34 for (
int i= 1; i <
ARG_C ; ++i ) {
45 for (
int i= 1; i <
ARG_C ; ++i ) {
62 auto argNo=
ArgsLeft[size_t(argIdx)];
81 if( option->
Read( **optionDeclIt, arg, argNo ) )
88 (*optionDeclIt)->HelpUsageLine() );
118 for(
auto optionIt=
Options.rbegin() ; optionIt !=
Options.rend() ; optionIt ++ )
119 if( (*optionIt)->Declaration->Element() == element )
127 bool lastCommandFullyParsed=
true;
128 while( lastCommandFullyParsed &&
ArgsLeft.size() > 0 ) {
135 lastCommandFullyParsed= command->
Read( *commandDecl );
141 commandDecl->HelpTextShort() );
#define ALIB_CALLER_NULLED
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_BOXING_VTABLE_DEFINE(TMapped, Identifier)
static AString GetCommandUsageFormat(CommandLine &cmdLine, CommandDecl &commandDecl)
ListMA< Command * > CommandsParsed
A list of commands actually parsed. Filled with method #"ReadNextCommands".
ListMA< Command * >::iterator NextCommandIt
The next command in #"CommandsParsed" to be processed. Used with method #"NextCommand".
NCString ResourceCategory
The resource category to fetch CLI resources within field #"Resources".
ListMA< CommandDecl * > CommandDecls
Commands defined.
Option * GetOption(Enum element)
ListMA< OptionDecl * > OptionDecls
Possible Options.
resources::ResourcePool * Resources
void Init(camp::Camp *resModule)
virtual void ReadOptions()
virtual String GetArg(integer idx)
ListMA< String, Recycling::Shared > OptionArgsIgnored
bool RemoveArg(integer argNo)
virtual Command * NextCommand()
virtual void ReadNextCommands()
StdVectorMA< integer > ArgsLeft
StdVectorMA< String > ArgStrings
ListMA< Option * > Options
The options parsed in the order of their appearance.
const String & ShortcutReplacementString()
Exception & Add(const lang::CallerInfo &ci, TEnum type, TArgs &&... args)
void DbgDisableBufferReplacementWarning()
TChar CharAtStart() const
constexpr bool IsNotEmpty() const
@ ParsingOptions
General option parse error. Adds option help text.
@ ParsingCommand
General parameter parse error. Adds command help text.
constexpr String NULL_STRING
A nulled string of the default character type.
strings::TCString< nchar > NCString
Type alias in namespace #"%alib".
NLocalString< 1024 > NString1K
Type alias name for #"TLocalString;TLocalString<nchar,1024>".
lang::integer integer
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
LocalString< 1024 > String1K
Type alias name for #"TLocalString;TLocalString<character,1024>".
exceptions::Exception Exception
Type alias in namespace #"%alib".
boxing::Enum Enum
Type alias in namespace #"%alib".
A command argument of the command-line.
bool Read(CommandDecl &decl)
bool Read(OptionDecl &decl, String &arg, const integer argNo)
OptionDecl * Declaration
The declaration struct.
integer ConsumedArguments