9 #ifndef __WVFUNCTORENCODER_H
10 #define __WVFUNCTORENCODER_H
12 #include "wvtypedencoder.h"
30 template<
class IT,
class OT,
class FT>
50 while ( (count = inbuf.optgettable()) )
52 size_t avail = outbuf.optallocable();
57 const IType *indata = inbuf.get(count);
58 OType *outdata = outbuf.alloc(count);
60 *(outdata++) = f(*(indata++));
74 #endif // __WVFUNCTORENCODER_H
The generic buffer base type.
Functor specifies the functor type which must have an operator() with a signature compatible with inv...
bool flush(IBuffer &inbuf, OBuffer &outbuf, bool finish=false)
Typed variant of flush().
virtual bool _reset()
Template method implementation of reset().
virtual bool _typedencode(IBuffer &inbuf, OBuffer &outbuf, bool flush)
Typed variant of _encode().
This template facilitates the creation and use of encoders that manipulate typed buffers.