Argument class interface.
More...
#include <argument_base.hpp>
Argument class interface.
Definition at line 26 of file argument_base.hpp.
◆ argument_base()
ap::detail::argument_base::argument_base |
( |
const argument_name & |
name | ) |
|
|
inlineprotected |
◆ bypass_required_enabled()
virtual bool ap::detail::argument_base::bypass_required_enabled |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
true
if bypassing the required status is enabled for the argument, false
otherwise.
◆ count()
virtual std::size_t ap::detail::argument_base::count |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
- The number of times the positional argument is used.
◆ desc()
|
protectedpure virtualnoexcept |
- Parameters
-
verbose | The verbosity mode value. |
flag_char | The character used for the argument flag prefix. |
- Returns
- An argument descriptor object for the argument.
◆ has_parsed_values()
virtual bool ap::detail::argument_base::has_parsed_values |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
true
if the argument has parsed values., false
otherwise.
◆ has_value()
virtual bool ap::detail::argument_base::has_value |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
true
if the argument has a value, false
otherwise.
◆ help()
const std::optional< std::string > & ap::detail::argument_base::help |
( |
| ) |
const |
|
inlineprotectednoexcept |
- Returns
- Optional help message for the positional argument.
Definition at line 41 of file argument_base.hpp.
◆ is_required()
virtual bool ap::detail::argument_base::is_required |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
true
if the argument is required, false
otherwise
◆ is_used()
virtual bool ap::detail::argument_base::is_used |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
true
if the argument has been used, false
otherwise.
◆ mark_used()
virtual bool ap::detail::argument_base::mark_used |
( |
| ) |
|
|
protectedpure virtual |
Mark the argument as used.
- Returns
true
if the argument accepts further values, false
otherwise.
◆ name()
- Returns
- Reference the name of the positional argument.
Definition at line 36 of file argument_base.hpp.
◆ nvalues_ordering()
virtual std::weak_ordering ap::detail::argument_base::nvalues_ordering |
( |
| ) |
const |
|
protectedpure virtualnoexcept |
- Returns
- The ordering relationship of argument range.
◆ set_value()
virtual bool ap::detail::argument_base::set_value |
( |
const std::string & |
value | ) |
|
|
protectedpure virtual |
Set the value for the argument.
- Parameters
-
value | The string representation of the value. |
- Returns
true
if the argument accepts further values, false
otherwise.
◆ value()
virtual const std::any & ap::detail::argument_base::value |
( |
| ) |
const |
|
protectedpure virtual |
- Returns
- Reference to the stored value of the argument.
◆ values()
virtual const std::vector< std::any > & ap::detail::argument_base::values |
( |
| ) |
const |
|
protectedpure virtual |
- Returns
- Reference to the vector of parsed values of the argument.
◆ ::ap::argument_parser
◆ _help_msg
std::optional<std::string> ap::detail::argument_base::_help_msg |
|
protected |
◆ _name
The documentation for this class was generated from the following file: