args-parser 6.3.3
|
MultiArg is a class that presents argument in the command line taht can be presented more than once or can have more than one value. More...
#include <multi_arg.hpp>
Public Member Functions | |
template<typename T > | |
MultiArg (Char flag, T &&name, bool isWithValue=false, bool isRequired=false) | |
Construct argument with flag and name. | |
MultiArg (Char flag, bool isWithValue=false, bool isRequired=false) | |
Construct argument only with flag, without name. | |
template<typename T > | |
MultiArg (T &&name, bool isWithValue=false, bool isRequired=false) | |
Construct argument only with name, without flag. | |
virtual | ~MultiArg () |
ArgType | type () const override |
const String & | value () const override |
void | setValue (const String &v) override |
Set value. | |
virtual const StringList & | values () const |
size_t | count () const |
const String & | defaultValue () const override |
void | setDefaultValue (const String &v) override |
const StringList & | defaultValues () const |
void | setDefaultValues (const StringList &v) |
Set default values. | |
void | clear () override |
Clear state of the argument. | |
Public Member Functions inherited from Args::Arg | |
template<typename T > | |
Arg (Char flag, T &&name, bool isWithValue=false, bool isRequired=false) | |
Construct argument with flag and name. | |
Arg (Char flag, bool isWithValue=false, bool isRequired=false) | |
Construct argument only with flag, without name. | |
template<typename T > | |
Arg (T &&name, bool isWithValue=false, bool isRequired=false) | |
Construct argument only with name, without flag. | |
virtual | ~Arg () |
String | name () const override |
bool | isWithValue () const override |
void | setWithValue (bool on=true) |
Set is this argument with value. | |
bool | isRequired () const override |
void | setRequired (bool on=true) |
Set required. | |
bool | isDefined () const override |
void | setDefined (bool on=true) |
Set defined. | |
const String & | flag () const override |
void | setFlag (Char f) |
Set flag. | |
const String & | argumentName () const override |
void | setArgumentName (const String &name) |
Set argument name. | |
const String & | valueSpecifier () const override |
void | setValueSpecifier (const String &vs) |
Set value specifier. | |
const String & | description () const override |
void | setDescription (const String &desc) |
Set description. | |
const String & | longDescription () const override |
void | setLongDescription (const String &desc) |
Set long description. | |
bool | isMisspelledName (const String &name, StringList &possibleNames) const override |
Public Member Functions inherited from Args::ArgIface | |
ArgIface () | |
virtual | ~ArgIface () |
CmdLine * | cmdLine () const |
Protected Member Functions | |
void | process (Context &context) override |
Process argument's staff, for example take values from context. | |
Protected Member Functions inherited from Args::Arg | |
ArgIface * | findArgument (const String &name) override |
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::ArgIface | |
virtual void | setCmdLine (CmdLine *cmdLine) |
Set command line parser. | |
MultiArg is a class that presents argument in the command line taht can be presented more than once or can have more than one value.
Definition at line 57 of file multi_arg.hpp.
Args::MultiArg::MultiArg | ( | Char | flag, |
T && | name, | ||
bool | isWithValue = false , |
||
bool | isRequired = false |
||
) |
Construct argument with flag and name.
flag | Flag for this argument. |
name | Name for this argument. |
isWithValue | Is this argument with value? |
isRequired | Is this argument required? |
Definition at line 178 of file multi_arg.hpp.
|
inlineexplicit |
Construct argument only with flag, without name.
flag | Flag for this argument. |
isWithValue | Is this argument with value? |
isRequired | Is this argument required? |
Definition at line 186 of file multi_arg.hpp.
|
explicit |
Construct argument only with name, without flag.
name | Name for this argument. |
isWithValue | Is this argument with value? |
isRequired | Is this argument required? |
Definition at line 194 of file multi_arg.hpp.
|
inlinevirtual |
Definition at line 202 of file multi_arg.hpp.
|
inlineoverridevirtual |
Clear state of the argument.
Reimplemented from Args::Arg.
Definition at line 144 of file multi_arg.hpp.
|
inline |
Definition at line 233 of file multi_arg.hpp.
|
inlineoverridevirtual |
|
inline |
Definition at line 132 of file multi_arg.hpp.
|
inlineoverrideprotectedvirtual |
Process argument's staff, for example take values from context.
This method invokes exactly at that moment when parser has found this argument.
context | Context of the command line. |
Reimplemented from Args::Arg.
Definition at line 244 of file multi_arg.hpp.
|
inlineoverridevirtual |
Set default value.
Reimplemented from Args::Arg.
Definition at line 126 of file multi_arg.hpp.
|
inline |
Set default values.
Definition at line 138 of file multi_arg.hpp.
|
inlineoverridevirtual |
Set value.
Reimplemented from Args::Arg.
Definition at line 218 of file multi_arg.hpp.
|
inlineoverridevirtual |
Reimplemented from Args::Arg.
Definition at line 95 of file multi_arg.hpp.
|
inlineoverridevirtual |
Reimplemented from Args::Arg.
Definition at line 207 of file multi_arg.hpp.
|
inlinevirtual |
Definition at line 224 of file multi_arg.hpp.