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

Description:

A command argument of the command-line.

Definition at line 496 of file cliargtypes.hpp.

#include <cliargtypes.hpp>

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

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::app::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::app::Parsed
 Parsed (CommandLine *cmdLine)

Field Details:

◆ Declaration

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

The underlying declaration.

Definition at line 498 of file cliargtypes.hpp.

◆ ParametersMandatory

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

Mandatory parameters parsed.

Definition at line 501 of file cliargtypes.hpp.

◆ ParametersOptional

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

Optional parameters parsed.

Definition at line 504 of file cliargtypes.hpp.

Constructor(s) / Destructor Details:

◆ Command()

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

Constructor

Parameters
cmdLineThe command-line instance.

Definition at line 519 of file cli.hpp.

Here is the call graph for this function:

Method Details:

◆ GetParsedParameter()

Parameter * alib::app::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 144 of file cliargtypes.cpp.

◆ GetParsedParameterArg()

String alib::app::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 166 of file cliargtypes.cpp.

Here is the call graph for this function:

◆ Read()

bool alib::app::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 102 of file cliargtypes.cpp.

Here is the call graph for this function:

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