4.6.0
Freundlich's C++ toolkit
|
A required switch.
This parser is similar to fcppt::options::switch_ but instead of returning true or false, it only succeeds if its flag is given.
Public Types | |
using | result_type = fcppt::record::object<fcppt::record::element<Label, fcppt::unit>> |
Public Member Functions | |
unit_switch (fcppt::options::optional_short_name &&short_name, fcppt::options::long_name &&long_name, fcppt::options::optional_help_text &&help_text) | |
Constructs a unit 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 |
using fcppt::options::unit_switch< Label >::result_type = fcppt::record::object<fcppt::record::element<Label, fcppt::unit>> |
fcppt::options::unit_switch< Label >::unit_switch | ( | fcppt::options::optional_short_name && | short_name, |
fcppt::options::long_name && | long_name, | ||
fcppt::options::optional_help_text && | help_text ) |
Constructs a unit 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 |