|
| | option (std::string_view name, std::string_view value_name, std::optional< std::string_view > description=std::nullopt) |
| | Creates an option without a short alias.
|
| |
| | option (std::string_view name, char alias, std::string_view value_name, std::optional< std::string_view > description=std::nullopt) |
| | Creates an option with a short alias.
|
| |
| std::string const & | value_name () const noexcept override |
| | Returns the value placeholder name.
|
| |
| void | default_value (T value) |
| | Sets the default option value.
|
| |
| std::string | usage () const override |
| | Returns generated help usage for this option.
|
| |
| bool | expects_value () const noexcept override |
| | Checks whether this option expects a value.
|
| |
| std::optional< std::any > | default_value () const override |
| | Returns the configured default value.
|
| |
| bool | is_repeatable () const noexcept |
| | Checks whether this option accepts multiple occurrences.
|
| |
| | switch_base (std::string_view name, std::optional< std::string_view > description=std::nullopt) |
| | Creates a switch without a short alias.
|
| |
| | switch_base (std::string_view name, char alias, std::optional< std::string_view > description=std::nullopt) |
| | Creates a switch with a short alias.
|
| |
| | switch_base (std::string_view name, std::optional< std::string_view > description=std::nullopt) |
| | Creates a switch without a short alias.
|
| |
| | switch_base (std::string_view name, char alias, std::optional< std::string_view > description=std::nullopt) |
| | Creates a switch with a short alias.
|
| |
|
virtual | ~switch_base ()=default |
| | Destroys the switch definition.
|
| |
| std::string const & | name () const noexcept |
| | Returns the long switch name.
|
| |
| std::optional< char > | alias () const noexcept |
| | Returns the short switch alias.
|
| |
| std::optional< std::string > const & | description () const noexcept |
| | Returns the switch description.
|
| |
|
void | mark_as_action () noexcept |
| | Marks this switch as a mutually exclusive command action.
|
| |
| bool | is_action () const noexcept |
| | Checks whether this switch is a command action.
|
| |
template<parseable_value T>
class kaycxx::cli::option< T >
Typed command line option definition.
- Template Parameters
-
| T | Parsed option value type. |