|
args-parser 6.3.6
|
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 |
| MultiArg & | setValue (const String &v) override |
| Set value. | |
| virtual const StringList & | values () const |
| size_t | count () const |
| const String & | defaultValue () const override |
| MultiArg & | setDefaultValue (const String &v) override |
| Set default value. | |
| const StringList & | defaultValues () const |
| MultiArg & | 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 |
| Arg & | setWithValue (bool on=true) |
| Set is this argument with value. | |
| bool | isRequired () const override |
| Arg & | setRequired (bool on=true) |
| Set required. | |
| bool | isDefined () const override |
| Arg & | setDefined (bool on=true) |
| Set defined. | |
| const String & | flag () const override |
| Arg & | setFlag (Char f) |
| Set flag. | |
| const String & | argumentName () const override |
| Arg & | setArgumentName (const String &name) |
| Set argument name. | |
| const String & | valueSpecifier () const override |
| Arg & | setValueSpecifier (const String &vs) |
| Set value specifier. | |
| const String & | description () const override |
| Arg & | setDescription (const String &desc) |
| Set description. | |
| const String & | longDescription () const override |
| Arg & | 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 33 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 155 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 167 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 178 of file multi_arg.hpp.
|
inlinevirtual |
Definition at line 188 of file multi_arg.hpp.
|
inlineoverridevirtual |
Clear state of the argument.
Reimplemented from Args::Arg.
Definition at line 122 of file multi_arg.hpp.
|
inline |
Definition at line 218 of file multi_arg.hpp.
|
inlineoverridevirtual |
|
inline |
Definition at line 109 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 229 of file multi_arg.hpp.
Set default value.
Reimplemented from Args::Arg.
Definition at line 102 of file multi_arg.hpp.
|
inline |
Set default values.
Definition at line 115 of file multi_arg.hpp.
Set value.
Reimplemented from Args::Arg.
Definition at line 203 of file multi_arg.hpp.
|
inlineoverridevirtual |
Reimplemented from Args::Arg.
Definition at line 70 of file multi_arg.hpp.
|
inlineoverridevirtual |
Reimplemented from Args::Arg.
Definition at line 192 of file multi_arg.hpp.
|
inlinevirtual |
Definition at line 209 of file multi_arg.hpp.