7 #ifndef __WVTYPEDENCODER_H
8 #define __WVTYPEDENCODER_H
10 #include "wvencoder.h"
11 #include "wvbufbase.h"
32 template<
class IT,
class OT,
class S = WvEncoder>
63 return S::flush(inview, outview,
finish);
73 return S::finish(outview);
84 return S::flush(inbuf, outbuf,
finish);
88 return S::finish(outbuf);
96 virtual bool _typedencode(IBuffer &inbuf, OBuffer &outbuf,
129 template<
class IT,
class S>
134 typedef unsigned char OType;
158 return S::flush(inview, outbuf,
finish);
169 return S::flush(inbuf, outbuf,
finish);
177 virtual bool _typedencode(IBuffer &inbuf, OBuffer &outbuf,
211 typedef unsigned char IType;
212 typedef unsigned char OType;
247 #endif // __WVTYPEDENCODER
virtual bool _finish(WvBuf &outbuf)
Wrapper implementation of _finish().
bool encode(IBuffer &inbuf, OBuffer &outbuf, bool flush=false, bool finish=false)
Typed variant of encode().
virtual bool _finish(WvBuf &outbuf)
Wrapper implementation of _finish().
virtual bool _typedfinish(OBuffer &outbuf)
Typed variant of _finish().
virtual bool _typedfinish(OBuffer &outbuf)
Typed variant of _finish().
virtual bool _typedencode(IBuffer &inbuf, OBuffer &outbuf, bool flush)=0
Typed variant of _encode().
The generic buffer base type.
bool encode(IBuffer &inbuf, OBuffer &outbuf, bool flush=false, bool finish=false)
Typed variant of encode().
A buffer that provides a read-write view over another buffer with a different datatype.
Specialization of WvBufBase for unsigned char type buffers intended for use with raw memory buffers.
virtual bool _finish(WvBuf &outbuf)
Wrapper implementation of _finish().
bool flush(IBuffer &inbuf, OBuffer &outbuf, bool finish=false)
Typed variant of flush().
virtual bool _typedfinish(OBuffer &outbuf)
Typed variant of _finish().
bool flush(IBuffer &inbuf, OBuffer &outbuf, bool finish=false)
Typed variant of flush().
This template facilitates the creation and use of encoders that manipulate typed buffers.
bool finish(OBuffer &outbuf)
Typed variant of finish().
virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf, bool flush)
Wrapper implementation of _encode().
virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf, bool flush)
Wrapper implementation of _encode().
virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf, bool flush)
Wrapper implementation of _encode().