ALib C++ Framework
by
Library Version: 2511 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 474 of file arguments.inl.

Inheritance diagram for alib::cli::Command:
alib::cli::Parsed

Public Field Index:

CommandDeclDeclaration = nullptr
 The underlying declaration.
ListMA< Parameter *, Recycling::Shared > ParametersMandatory
 Mandatory parameters parsed.
ListMA< 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)
ParameterGetParsedParameter (const String &name)
String GetParsedParameterArg (const String &name)
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 477 of file arguments.inl.

◆ ParametersMandatory

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

Mandatory parameters parsed.

Definition at line 480 of file arguments.inl.

◆ ParametersOptional

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

Optional parameters parsed.

Definition at line 483 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 524 of file commandline.inl.

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 174 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 196 of file arguments.cpp.

◆ Read()

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

Tries to read the object from the front of StdVectorMA< integer > ArgsLeft.

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

Definition at line 132 of file arguments.cpp.


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