 |
ALib C++ Library
|
Library Version: 1912 R0
Documentation generated by
|
10 #if !defined (HPP_ALIB_CLI_CLIAPP)
14 #if !defined (HPP_ALIB_CLI_CLIUTIL)
18 #if !defined (HPP_ALIB_FS_MODULES_DISTRIBUTION)
21 #endif // !defined(ALIB_DOX)
24 namespace aworx {
namespace lib {
namespace cli {
40 #if !ALIB_CHARACTERS_WIDE
63 #if ALIB_CHARACTERS_NATIVE_WCHAR // use original strings only if aworx::wchar == wchar_t
99 while( argIdx < static_cast<integer>(
ArgsLeft.size()) )
102 auto argNo=
ArgsLeft[static_cast<size_t>(argIdx)];
123 if( option.
Read( **optionDeclIt, arg, argNo ) )
131 (*optionDeclIt)->HelpUsageLine() );
168 for(
auto optionIt=
Options.rbegin() ; optionIt !=
Options.rend() ; optionIt ++ )
169 if( (*optionIt)->Declaration->Element() == element )
178 bool lastCommandFullyParsed=
true;
179 while( lastCommandFullyParsed &&
ArgsLeft.size() > 0 )
188 lastCommandFullyParsed= command.
Read( *commandDecl );
194 commandDecl->HelpTextShort() );
251 ALIB_ERROR(
"Argument number {} already removed.", argNo )
ALIB_FORCE_INLINE T * Emplace(TArgs &&... args)
Option * GetOption(Enum element)
platform_specific integer
std::vector< String, StdContMA< String > > ArgStrings
ALIB_API bool Read(CommandDecl &decl)
const String & ShortcutReplacementString()
virtual ALIB_API void Init(Module *resModule)
void DbgDisableBufferReplacementWarning()
virtual String Arg(integer idx)
constexpr bool IsNotEmpty() const
ALIB_API void RemoveArg(integer argNo)
static ALIB_API AString GetCommandUsageFormat(CLIApp &cliApp, CommandDecl &commandDecl)
TChar CharAtStart() const
ALIB_API bool Read(OptionDecl &decl, String &arg, const integer argNo)
constexpr String NullString()
List< String, Recycling::Shared > OptionArgsIgnored
const wchar_t ** ArgWOriginal
General parameter parse error. Adds command help text.
std::vector< integer, StdContMA< integer > > ArgsLeft
virtual ALIB_API void ReadNextCommands()
Exception & Add(const NCString &file, int line, const NCString &func, TEnum type, TArgs &&... args)
lib::ALibDistribution ALIB
List< Command > CommandsParsed
List< Command >::Iterator NextCommandIt
#define ALIB_ASSERT_ERROR(cond,...)
List< CommandDecl * > CommandDecls
List< OptionDecl * > OptionDecls
virtual ALIB_API Command * NextCommand()
#define ALIB_CALLER_NULLED
virtual ALIB_API String PopArg()
virtual ALIB_API void ReadOptions()
lib::results::Exception Exception
Type alias in namespace aworx.
const char ** ArgNOriginal
General option parse error. Adds option help text.
strings::TString< TChar > EmplaceString(const strings::TString< TChar > &src)