4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::parse::base< Result, Ch, Skipper > Class Template Referenceabstract

Detailed Description

template<typename Result, typename Ch, typename Skipper>
class fcppt::parse::base< Result, Ch, Skipper >

Base class for a parser.

The type of a parser usually gets very complicated because it depends on all of its subparsers. In case we want to declare a parser as a member of a class for example, we want to use a simpler type. This is achieved by using fcppt::parse::make_base to create a parser of type base. The employed technique is also known as type erasure.

Inheritance diagram for fcppt::parse::base< Result, Ch, Skipper >:
fcppt::parse::tag

Public Types

using result_type = Result
 

Public Member Functions

virtual ~base ()
 
virtual fcppt::parse::result< Ch, result_typeparse (fcppt::reference< fcppt::parse::basic_stream< Ch > >, Skipper const &) const =0
 

Protected Member Functions

 base ()
 

Member Typedef Documentation

◆ result_type

template<typename Result , typename Ch , typename Skipper >
using fcppt::parse::base< Result, Ch, Skipper >::result_type = Result

Constructor & Destructor Documentation

◆ base()

template<typename Result , typename Ch , typename Skipper >
fcppt::parse::base< Result, Ch, Skipper >::base ( )
protected

◆ ~base()

template<typename Result , typename Ch , typename Skipper >
virtual fcppt::parse::base< Result, Ch, Skipper >::~base ( )
virtual

Member Function Documentation

◆ parse()

template<typename Result , typename Ch , typename Skipper >
virtual fcppt::parse::result< Ch, result_type > fcppt::parse::base< Result, Ch, Skipper >::parse ( fcppt::reference< fcppt::parse::basic_stream< Ch > > ,
Skipper const &  ) const
nodiscardpure virtual