|
cli20 0.1.2
A C++20 typed-schema command-line parser
|
Parameter bag used when constructing ArgImpl or PositionalImpl with named fields. More...
#include <argument.hh>
Public Attributes | |
| std::string_view | help {} |
| Help text shown in --help output. | |
| Presence | presence {Presence::optional} |
| Whether the argument is required. | |
| std::optional< T > | default_value {} |
| Default value when the argument is absent. | |
| std::function< void(const T &)> | on_parse {} |
| Callback invoked once after parsing completes. | |
| std::string_view | env {} |
| Environment variable name to fall back to when the option is absent from the command line. | |
| bool | hidden {} |
| Whether this argument is omitted from generated help. | |
| std::string_view | deprecated {} |
| Optional deprecation message shown in generated help. | |
Parameter bag used when constructing ArgImpl or PositionalImpl with named fields.
Allows brace-initialisation with named members, e.g.:
| T | The storage value type of the argument. |
Definition at line 66 of file argument.hh.
| std::optional<T> cli::ArgParameter< T >::default_value {} |
Default value when the argument is absent.
Definition at line 70 of file argument.hh.
| std::string_view cli::ArgParameter< T >::deprecated {} |
Optional deprecation message shown in generated help.
Definition at line 77 of file argument.hh.
| std::string_view cli::ArgParameter< T >::env {} |
Environment variable name to fall back to when the option is absent from the command line.
Definition at line 73 of file argument.hh.
| std::string_view cli::ArgParameter< T >::help {} |
Help text shown in --help output.
Definition at line 67 of file argument.hh.
| bool cli::ArgParameter< T >::hidden {} |
Whether this argument is omitted from generated help.
Definition at line 75 of file argument.hh.
| std::function<void(const T&)> cli::ArgParameter< T >::on_parse {} |
Callback invoked once after parsing completes.
Definition at line 72 of file argument.hh.
| Presence cli::ArgParameter< T >::presence {Presence::optional} |
Whether the argument is required.
Definition at line 68 of file argument.hh.