12 #ifndef WIBBLE_CONSUMER_H
13 #define WIBBLE_CONSUMER_H
19 template<
typename T >
23 virtual void consume(
const T &a ) = 0;
28 template<
typename T,
typename W >
35 return this->
wrapped().consume( a );
39 while ( !s.
empty() ) {
46 template<
typename T,
typename Self >
49 Self &
self() {
return *
static_cast< Self *
>( this ); }
50 const Self &
self()
const {
return *
static_cast< const Self *
>( this ); }
54 bool operator<=(
const Self &o )
const {
return this <= &o; }
64 template<
typename T >
65 struct Consumer: Amorph< Consumer< T >, ConsumerInterface< T > >,
66 ConsumerMixin< T, Consumer< T > >
89 template<
typename T,
typename Out >
101 template<
typename R >
107 template<
typename Out >
114 template<
typename T >
116 return consumer( std::inserter( c, c.end() ) );
120 template<
typename T >