ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Fields | Public Methods | List of all members
Command Struct Reference

#include <arguments.hpp>

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

Class Description

A command of a ALib CLI command line.

Definition at line 640 of file arguments.hpp.

Public Fields

CommandDeclDeclaration = nullptr
 
List< Parameter *, Recycling::SharedParametersMandatory
 
List< Parameter *, Recycling::SharedParametersOptional
 
- Public Fields inherited from Parsed
CommandLineCmdLine
 
integer Position
 
integer QtyArgsConsumed
 

Public Methods

 Command (CommandLine *cmdLine)
 
ALIB_API ParameterGetParsedParameter (const String &name)
 
ALIB_API String GetParsedParameterArg (const String &name)
 
ALIB_API bool Read (CommandDecl &decl)
 
- Public Methods inherited from Parsed
 Parsed (CommandLine *cmdLine)
 

Constructor & Destructor Documentation

◆ Command()

Command ( CommandLine cmdLine)
inline

Constructor

Parameters
cmdLineThe command line instance.

Definition at line 623 of file commandline.hpp.

Member Function Documentation

◆ GetParsedParameter()

Parameter * 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 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, NullString() 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 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:

Member Data Documentation

◆ Declaration

CommandDecl* Declaration = nullptr

The underlying declaration.

Definition at line 643 of file arguments.hpp.

◆ ParametersMandatory

List<Parameter*, Recycling::Shared> ParametersMandatory

Mandatory parameters parsed.

Definition at line 646 of file arguments.hpp.

◆ ParametersOptional

List<Parameter*, Recycling::Shared> ParametersOptional

Optional parameters parsed.

Definition at line 649 of file arguments.hpp.


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