|
| SwitchArgument (std::string description, bool &storage) |
| Create a switch argument with aliases defined by the description, using an external variable to store the value. More...
|
|
| SwitchArgument (std::string description, char flag, bool &storage) |
| Create a switch argument that is identified by a flag, using an external variable to store the value. More...
|
|
| SwitchArgument (std::string description, const std::string &name, bool &storage) |
| Create a switch argument that is identified by a name, using an external variable to store the value. More...
|
|
| SwitchArgument (std::string description, char flag, const std::string &name, bool &storage) |
| Create a switch argument that is identified by both a flag and a name, using an external variable to store the value. More...
|
|
| SwitchArgument (std::string description) |
| Create a switch argument with aliases defined by the description, using an internal variable to store the value. More...
|
|
| SwitchArgument (std::string description, char flag) |
| Create a switch argument that is identified by a flag, using an external variable to store the value. More...
|
|
| SwitchArgument (std::string description, const std::string &name) |
| Create a switch argument that is identified by a name, using an external variable to store the value. More...
|
|
| SwitchArgument (std::string description, char flag, const std::string &name) |
| Create a switch argument that is identified by both a flag and a name, using an external variable to store the value. More...
|
|
| SwitchArgument (const SwitchArgument &)=default |
| SwitchArgument copy constructor.
|
|
| SwitchArgument (SwitchArgument &&)=default |
| SwitchArgument move constructor.
|
|
virtual | ~SwitchArgument () |
| SwitchArgument destructor.
|
|
SwitchArgument & | operator= (const SwitchArgument &other)=default |
| SwitchArgument assignment operator.
|
|
SwitchArgument & | operator= (SwitchArgument &&other)=default |
| SwitchArgument move assignment operator.
|
|
bool | takes_value () const override |
| See Argument::takes_value()
|
|
void | set () const override |
| See Argument::set()
|
|
std::unique_ptr< BaseArgument > | clone () const &override |
| See BaseArgument::clone().
|
|
std::unique_ptr< BaseArgument > | clone ()&&override |
| See BaseArgument::clone().
|
|
const ST & | value () const |
| Returns the value of this argument. More...
|
|
virtual TypedArgument & | check (TypedArgumentCheckFunc< bool, multi > typedCheckFunc) |
| See Argument::check()
|
|
| Argument (std::string description) |
| Create an argument with flag and/or name set by description. More...
|
|
| Argument (std::string description, char flag) |
| Create an argument that is identified by a flag. More...
|
|
| Argument (std::string description, std::string name) |
| Create an argument that is identified by a name. More...
|
|
| Argument (std::string description, char flag, std::string name) |
| Create an argument that is identified by both a name and flag. More...
|
|
| Argument (const Argument &)=default |
| Argument copy constructor.
|
|
| Argument (Argument &&)=default |
| Argument move constructor.
|
|
virtual | ~Argument () |
| Argument destructor.
|
|
Argument & | operator= (const Argument &other)=default |
| Argument assignment operator.
|
|
Argument & | operator= (Argument &&other)=default |
| Argument move assignment operator.
|
|
Argument & | alias (char flag) |
| An a flag alias for the argument. More...
|
|
Argument & | alias (std::string name) |
| An a name alias for the argument. More...
|
|
Argument & | alias (char flag, std::string name) |
| An both a flag and name alias for the argument. More...
|
|
const std::string & | description () const |
| Returns the description of this argument. More...
|
|
virtual Argument & | check (ArgumentCheckFunc checkFunc) |
| Set the check function to use. More...
|
|
bool | matches () const |
| Returns a pointer to this argument if it matches as a positional argument, otherwise a null-pointer. More...
|
|
bool | matches (char flag) const |
| Returns a pointer to this argument if it matches the given flag with any alias, otherwise a null-pointer. More...
|
|
bool | matches (const std::string &name) const |
| Returns a pointer to this argument if it matches the given name with any alias, otherwise a null-pointer. More...
|
|
void | find_all_arguments (std::vector< const Argument * > &collector) const override |
| See BaseArgument::find_all_arguments()
|
|
Argument & | many (bool many=true) |
| Allow the argument to occur multiple times or not. More...
|
|
Argument & | min (unsigned int min) |
| Set the minimum number of required occurrences if set. More...
|
|
unsigned int | min () const |
| Returns the minimum number of occurrences of this argument for it to be satisfied if set. More...
|
|
Argument & | max (unsigned int max) |
| Set the maximum number of required occurrences. More...
|
|
unsigned int | max () const |
| Returns the maximum number of occurrences of this argument. More...
|
|
unsigned int | count () const override |
| See BaseArgument::count()
|
|
bool | can_set () const |
| Returns whether this argument is still allowed to occur on the command line. More...
|
|
void | check_valid () const override |
| See BaseArgument::check_valid()
|
|
std::string | usage () const override |
| See BaseArgument::usage()
|
|
virtual std::string | ident () const |
| Print a string representation of this argument to the given stream. More...
|
|
| BaseArgument () |
| Base constructor.
|
|
| BaseArgument (const BaseArgument &)=default |
| BaseArgument copy constructor.
|
|
| BaseArgument (BaseArgument &&)=default |
| BaseArgument move constructor.
|
|
virtual | ~BaseArgument () |
| BaseArgument destructor.
|
|
BaseArgument & | operator= (const BaseArgument &)=default |
| BaseArgument assignment operator.
|
|
BaseArgument & | operator= (BaseArgument &&)=default |
| BaseArgument move assignment operator.
|
|
| operator bool () const |
| Boolean conversion operator (so you can do things like if (arg) { ... More...
|
|
BaseArgument & | set_required (bool required=true) |
| Mark the argument as required or not. More...
|
|
bool | required () const |
| Returns whether the argument is required. More...
|
|
|
using | ST = typename std::conditional< !multi, bool, std::vector< bool > >::type |
| Alias for the storage type (which is a vector for MultiValueArgument types)
|
|
| TypedArgument (std::string description, ST *storage) |
| Create a TypedArgument with given description and storage pointer. More...
|
|
| TypedArgument (std::string description, char flag, ST *storage) |
| Create a TypedArgument with given description and storage pointer, aliased to the given flag. More...
|
|
| TypedArgument (std::string description, const std::string &name, ST *storage) |
| Create a TypedArgument with given description and storage pointer, aliased to the given name. More...
|
|
| TypedArgument (std::string description, char flag, const std::string &name, ST *storage) |
| Create a TypedArgument with given description and storage pointer, aliased to the given flag and name. More...
|
|
std::enable_if<!m >::type | check () const override |
| See Argument::check()
|
|
std::enable_if< m >::type | check () const override |
| See Argument::check()
|
|
SwitchArgument is a specialization for TypedArgument, which does not accept values (it switches).
When allowed to occur multiple times, the value is inverted each time it occurs. Use this to keep track of the actual value in a variable.