2.10.0
Freundlich's C++ toolkit
Public Types | Public Member Functions
fcppt::options::product< Left, Right > Class Template Reference

Detailed Description

template<typename Left, typename Right>
class fcppt::options::product< Left, Right >

A product of two parsers.

This parser first applies its left parser and if that succeeds also applies its right parser. Use fcppt::options::apply to create a product of two or more parsers. The result type is a record that contains the elements of both Left and Right. Therefore, Left and Right must have disjoint label sets.

See also
fcppt::options::apply

Public Types

typedef fcppt::record::disjoint_product< fcppt::options::result_of< Left >, fcppt::options::result_of< Right > > result_type
 

Public Member Functions

 product (Left &&, Right &&)
 
 product (product const &)
 
 product (product &&)
 
productoperator= (product const &)
 
productoperator= (product &&)
 
 ~product ()
 
fcppt::options::parse_result< result_typeparse (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::string usage () const
 

Member Typedef Documentation

◆ result_type

template<typename Left , typename Right >
typedef fcppt::record::disjoint_product< fcppt::options::result_of< Left >, fcppt::options::result_of< Right > > fcppt::options::product< Left, Right >::result_type

Constructor & Destructor Documentation

◆ product() [1/3]

template<typename Left , typename Right >
fcppt::options::product< Left, Right >::product ( Left &&  ,
Right &&   
)

◆ product() [2/3]

template<typename Left , typename Right >
fcppt::options::product< Left, Right >::product ( product< Left, Right > const &  )

◆ product() [3/3]

template<typename Left , typename Right >
fcppt::options::product< Left, Right >::product ( product< Left, Right > &&  )

◆ ~product()

template<typename Left , typename Right >
fcppt::options::product< Left, Right >::~product ( )

Member Function Documentation

◆ flag_names()

template<typename Left , typename Right >
fcppt::options::flag_name_set fcppt::options::product< Left, Right >::flag_names ( ) const

◆ operator=() [1/2]

template<typename Left , typename Right >
product& fcppt::options::product< Left, Right >::operator= ( product< Left, Right > const &  )

◆ operator=() [2/2]

template<typename Left , typename Right >
product& fcppt::options::product< Left, Right >::operator= ( product< Left, Right > &&  )

◆ option_names()

template<typename Left , typename Right >
fcppt::options::option_name_set fcppt::options::product< Left, Right >::option_names ( ) const

◆ parse()

template<typename Left , typename Right >
fcppt::options::parse_result< result_type > fcppt::options::product< Left, Right >::parse ( fcppt::options::state &&  ,
fcppt::options::parse_context const &   
) const

◆ usage()

template<typename Left , typename Right >
fcppt::string fcppt::options::product< Left, Right >::usage ( ) const