ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::cli::Command Struct Reference

Description:

A command of a ALib CLI command line.

Definition at line 538 of file arguments.inl.

Inheritance diagram for alib::cli::Command:
[legend]
Collaboration diagram for alib::cli::Command:
[legend]

Public Field Index:

CommandDeclDeclaration = nullptr
 The underlying declaration.
 
List< MonoAllocator, Parameter *, Recycling::Shared > ParametersMandatory
 Mandatory parameters parsed.
 
List< MonoAllocator, Parameter *, Recycling::Shared > ParametersOptional
 Optional parameters parsed.
 
- Public Field Index: inherited from alib::cli::Parsed
CommandLineCmdLine
 The cli command line.
 
integer ConsumedArguments
 
integer Position
 

Public Method Index:

 Command (CommandLine *cmdLine)
 
ALIB_DLL ParameterGetParsedParameter (const String &name)
 
ALIB_DLL String GetParsedParameterArg (const String &name)
 
ALIB_DLL bool Read (CommandDecl &decl)
 
- Public Method Index: inherited from alib::cli::Parsed
 Parsed (CommandLine *cmdLine)
 

Field Details:

◆ Declaration

CommandDecl* alib::cli::Command::Declaration = nullptr

The underlying declaration.

Definition at line 541 of file arguments.inl.

◆ ParametersMandatory

List<MonoAllocator, Parameter*, Recycling::Shared> alib::cli::Command::ParametersMandatory

Mandatory parameters parsed.

Definition at line 544 of file arguments.inl.

◆ ParametersOptional

List<MonoAllocator, Parameter*, Recycling::Shared> alib::cli::Command::ParametersOptional

Optional parameters parsed.

Definition at line 547 of file arguments.inl.

Constructor(s) / Destructor Details:

◆ Command()

alib::cli::Command::Command ( CommandLine * cmdLine)
inline

Constructor

Parameters
cmdLineThe command line instance.

Definition at line 534 of file commandline.inl.

Here is the call graph for this function:

Method Details:

◆ GetParsedParameter()

Parameter * alib::cli::Command::GetParsedParameter ( const String & name)

Searches in ParametersMandatory and ParametersOptional for parameter name.

Parameters
nameThe declaration name of the parameter.
Returns
A pointer to the parameter, nullptr if parameter was not parsed.

Definition at line 185 of file arguments.cpp.

◆ GetParsedParameterArg()

String alib::cli::Command::GetParsedParameterArg ( const String & name)

Searches in ParametersMandatory and ParametersOptional for parameter name and returns its (first) argument.

Parameters
nameThe declaration name of the parameter.
Returns
The argument string, NULL_STRING if parameter was not parsed if not given.

Definition at line 209 of file arguments.cpp.

Here is the call graph for this function:

◆ Read()

bool alib::cli::Command::Read ( CommandDecl & decl)

Tries to read the object from the front of CommandLine::ArgsLeft.

Parameters
declThe declaration used for reading.
Returns
The true on success, false otherwise.

Definition at line 140 of file arguments.cpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following files: