4.4.0
|
|
Freundlich's C++ toolkit |
An optional parser.
Wraps a parser such that it may fail. The result type is a record that adds one layer of fcppt::optional::object to the elements of the result type of Parser.
Public Types | |
using | result_type = fcppt::record::map_elements< fcppt::options::result_of< Parser >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::optional::object >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::record::element_to_type >, fcppt::mpl::arg< 1 > > > > |
Public Member Functions | |
optional (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 |
using fcppt::options::optional< Parser >::result_type = fcppt::record::map_elements< fcppt::options::result_of<Parser>, fcppt::mpl::bind< fcppt::mpl::lambda<fcppt::optional::object>, fcppt::mpl:: bind<fcppt::mpl::lambda<fcppt::record::element_to_type>, fcppt::mpl::arg<1> >> > |
|
explicit |
fcppt::options::flag_name_set fcppt::options::optional< Parser >::flag_names | ( | ) | const |
fcppt::options::option_name_set fcppt::options::optional< Parser >::option_names | ( | ) | const |
fcppt::options::parse_result< result_type > fcppt::options::optional< Parser >::parse | ( | fcppt::options::state && | , |
fcppt::options::parse_context const & | |||
) | const |
fcppt::options::usage fcppt::options::optional< Parser >::usage | ( | ) | const |