4.6.0
Freundlich's C++ toolkit
|
A switch parser.
A switch parser is similar to fcppt::options::flag, but its value type is fixed to bool
, where its active value is true
and its inactive value is false
.
Public Types | |
using | result_type = typename impl::result_type |
Public Member Functions | |
switch_ (fcppt::options::optional_short_name &&short_name, fcppt::options::long_name &&long_name, fcppt::options::optional_help_text &&help_text) | |
Constructs a switch parser. | |
fcppt::options::parse_result< result_type > | parse (fcppt::options::state &&, fcppt::options::parse_context const &) const |
fcppt::options::flag_name_set | flag_names () const |
fcppt::options::option_name_set | option_names () const |
fcppt::options::usage | usage () const |
fcppt::options::optional_short_name const & | short_name () const |
fcppt::options::long_name const & | long_name () const |
fcppt::options::optional_help_text const & | help_text () const |
using fcppt::options::switch_< Label >::result_type = typename impl::result_type |
fcppt::options::switch_< Label >::switch_ | ( | fcppt::options::optional_short_name && | short_name, |
fcppt::options::long_name && | long_name, | ||
fcppt::options::optional_help_text && | help_text ) |
Constructs a switch parser.
short_name | An optional short name ("-f") this parser will match. |
long_name | The long name ("--flag") this parser will match. |
help_text | Optional help text for this flag. |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |