args-parser 6.3.6
Loading...
Searching...
No Matches
Args::AllOfGroup Class Referencefinal

Group of args where all arguments should be defined. More...

#include <groups.hpp>

Inheritance diagram for Args::AllOfGroup:
Collaboration diagram for Args::AllOfGroup:

Public Member Functions

template<typename T>
 AllOfGroup (T &&name, bool required=false)
virtual ~AllOfGroup ()
ArgType type () const override
bool isDefined () const override
Public Member Functions inherited from Args::GroupIface
template<typename T>
 GroupIface (T &&name, bool required=false)
virtual ~GroupIface ()
const Argumentschildren () const
GroupIfaceaddArg (ArgIface &arg)
 Add argument.
GroupIfaceaddArg (ArgIface *arg)
 Add argument.
virtual GroupIfaceaddArg (ArgPtr arg)
 Add argument.
String name () const override
bool isWithValue () const override
bool isRequired () const override
virtual GroupIfacesetRequired (bool on=true)
 Set required flag.
const Stringflag () const override
const StringargumentName () const override
const StringvalueSpecifier () const override
const Stringdescription () const override
const StringlongDescription () const override
void clear () override
 Clear state of the argument.
Public Member Functions inherited from Args::ArgIface
 ArgIface ()
virtual ~ArgIface ()
virtual const StringdefaultValue () const
CmdLinecmdLine () const

Protected Member Functions

void checkCorrectnessBeforeParsing (StringList &flags, StringList &names) const override
 Check correctness of the argument before parsing.
void checkCorrectnessAfterParsing () const override
 Check correctness of the argument after parsing.
Protected Member Functions inherited from Args::GroupIface
ArgIfacefindArgument (const String &name) override
void process (Context &) override
 Process argument's staff, for example take values from context.
void checkCorrectnessBeforeParsing (StringList &flags, StringList &names) const override
 Check correctness of the argument before parsing.
void checkCorrectnessAfterParsing () const override
 Check correctness of the argument after parsing.
void setCmdLine (CmdLine *cmdLine) override
 Set command line parser.
bool isMisspelledName (const String &name, StringList &possibleNames) const override

Additional Inherited Members

Public Types inherited from Args::GroupIface
using ArgPtr = std::unique_ptr<ArgIface, details::Deleter<ArgIface>>
 Smart pointer to the argument.
using Arguments = std::vector<ArgPtr>
 List of child arguments.
Protected Attributes inherited from Args::GroupIface
Arguments m_children
 List of children.

Detailed Description

Group of args where all arguments should be defined.

Definition at line 118 of file groups.hpp.

Constructor & Destructor Documentation

◆ AllOfGroup()

template<typename T>
Args::AllOfGroup::AllOfGroup ( T && name,
bool required = false )
inlineexplicit

Definition at line 122 of file groups.hpp.

◆ ~AllOfGroup()

virtual Args::AllOfGroup::~AllOfGroup ( )
inlinevirtual

Definition at line 129 of file groups.hpp.

Member Function Documentation

◆ checkCorrectnessAfterParsing()

void Args::AllOfGroup::checkCorrectnessAfterParsing ( ) const
inlineoverrideprotectedvirtual

Check correctness of the argument after parsing.

Implements Args::ArgIface.

Definition at line 175 of file groups.hpp.

◆ checkCorrectnessBeforeParsing()

void Args::AllOfGroup::checkCorrectnessBeforeParsing ( StringList & flags,
StringList & names ) const
inlineoverrideprotectedvirtual

Check correctness of the argument before parsing.

Implementation of this method must add his flag and name to the flags and names.

Parameters
flagsAll known flags.
namesAll known names.

Implements Args::ArgIface.

Definition at line 154 of file groups.hpp.

◆ isDefined()

bool Args::AllOfGroup::isDefined ( ) const
inlineoverridevirtual
Returns
Is this argument defined?

Implements Args::ArgIface.

Definition at line 140 of file groups.hpp.

◆ type()

ArgType Args::AllOfGroup::type ( ) const
inlineoverridevirtual
Returns
Type of the argument.

Implements Args::ArgIface.

Definition at line 134 of file groups.hpp.


The documentation for this class was generated from the following file: