Interface for the groups.
More...
#include <group_iface.hpp>
Interface for the groups.
Definition at line 33 of file group_iface.hpp.
◆ ArgPtr
◆ Arguments
◆ GroupIface()
template<typename T>
| Args::GroupIface::GroupIface |
( |
T && | name, |
|
|
bool | required = false ) |
|
inlineexplicit |
◆ ~GroupIface()
| virtual Args::GroupIface::~GroupIface |
( |
| ) |
|
|
inlinevirtual |
◆ addArg() [1/3]
Add argument.
- Note
- Developer should handle lifetime of the argument.
Definition at line 60 of file group_iface.hpp.
◆ addArg() [2/3]
Add argument.
- Note
- Developer should handle lifetime of the argument.
Definition at line 66 of file group_iface.hpp.
◆ addArg() [3/3]
◆ argumentName()
| const String & Args::GroupIface::argumentName |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ checkCorrectnessAfterParsing()
| void Args::GroupIface::checkCorrectnessAfterParsing |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ checkCorrectnessBeforeParsing()
| void Args::GroupIface::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
-
| flags | All known flags. |
| names | All known names. |
Implements Args::ArgIface.
Reimplemented in Args::OnlyOneGroup.
Definition at line 198 of file group_iface.hpp.
◆ children()
| const Arguments & Args::GroupIface::children |
( |
| ) |
const |
|
inline |
◆ clear()
| void Args::GroupIface::clear |
( |
| ) |
|
|
inlineoverridevirtual |
◆ description()
| const String & Args::GroupIface::description |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ findArgument()
|
|
inlineoverrideprotectedvirtual |
- Returns
- Argument for the given name.
- Return values
-
| Pointer | to the ArgIface if this argument handles argument with the given name. |
| nullptr | if this argument doesn't know about argument with name. |
- Note
- Looks only in children.
- Parameters
-
| name | Name of the argument. Can be for example "-t" or "--timeout". |
Implements Args::ArgIface.
Definition at line 163 of file group_iface.hpp.
◆ flag()
| const String & Args::GroupIface::flag |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isMisspelledName()
| bool Args::GroupIface::isMisspelledName |
( |
const String & | name, |
|
|
StringList & | possibleNames ) const |
|
inlineoverrideprotectedvirtual |
- Returns
- Is given name a misspelled name of the argument.
- Parameters
-
| name | Name to check (misspelled). |
| possibleNames | List of possible names for the given misspelled name. |
Implements Args::ArgIface.
Definition at line 232 of file group_iface.hpp.
◆ isRequired()
| bool Args::GroupIface::isRequired |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isWithValue()
| bool Args::GroupIface::isWithValue |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ longDescription()
| const String & Args::GroupIface::longDescription |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ name()
| String Args::GroupIface::name |
( |
| ) |
const |
|
inlineoverridevirtual |
- Returns
- Name of the argument.
If name is empty returned value should be a flag. I.e. for example "-t" or "--timeout"
Implements Args::ArgIface.
Definition at line 90 of file group_iface.hpp.
◆ process()
| void Args::GroupIface::process |
( |
Context & | | ) |
|
|
inlineoverrideprotectedvirtual |
Process argument's staff, for example take values from context.
This method invokes exactly at that moment when parser has found this argument.
Implements Args::ArgIface.
Definition at line 186 of file group_iface.hpp.
◆ setCmdLine()
| void Args::GroupIface::setCmdLine |
( |
CmdLine * | cmdLine | ) |
|
|
inlineoverrideprotectedvirtual |
◆ setRequired()
| virtual GroupIface & Args::GroupIface::setRequired |
( |
bool | on = true | ) |
|
|
inlinevirtual |
◆ valueSpecifier()
| const String & Args::GroupIface::valueSpecifier |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ m_children
The documentation for this class was generated from the following file: