WvStreams
|
This template facilitates the creation and use of encoders that manipulate typed buffers. More...
#include <wvtypedencoder.h>
Public Types | |
typedef IT | IType |
typedef OT | OType |
typedef WvBufBase< IType > | IBuffer |
typedef WvBufBase< OType > | OBuffer |
typedef WvBufViewBase< IType > | IBufferView |
typedef WvBufViewBase< OType > | OBufferView |
Public Member Functions | |
bool | encode (IBuffer &inbuf, OBuffer &outbuf, bool flush=false, bool finish=false) |
Typed variant of encode(). | |
bool | flush (IBuffer &inbuf, OBuffer &outbuf, bool finish=false) |
Typed variant of flush(). | |
bool | finish (OBuffer &outbuf) |
Typed variant of finish(). | |
bool | encode (WvBuf &inbuf, WvBuf &outbuf, bool flush=false, bool finish=false) |
bool | flush (WvBuf &inbuf, WvBuf &outbuf, bool finish=false) |
bool | finish (WvBuf &outbuf) |
Protected Member Functions | |
virtual bool | _typedencode (IBuffer &inbuf, OBuffer &outbuf, bool flush)=0 |
Typed variant of _encode(). | |
virtual bool | _typedfinish (OBuffer &outbuf) |
Typed variant of _finish(). | |
virtual bool | _encode (WvBuf &inbuf, WvBuf &outbuf, bool flush) |
Wrapper implementation of _encode(). | |
virtual bool | _finish (WvBuf &outbuf) |
Wrapper implementation of _finish(). |
This template facilitates the creation and use of encoders that manipulate typed buffers.
A typed encoder accepts both typed and untyped buffers, but is implementated in terms of typed buffers. Untyped buffers are automatically wrapped into the required form before being passed on to the implementation.
This type is designed to function as a statically bound mixin to make it easier to incorporate typed encoders into untyped encoder hierarchies. This is somewhat ugly, but necessary.
"IT" is the input buffer datatype "OT" is the output buffer datatype "S" is the WvEncoder supertype
Definition at line 33 of file wvtypedencoder.h.
bool WvTypedEncoder< IT, OT, S >::encode | ( | IBuffer & | inbuf, |
OBuffer & | outbuf, | ||
bool | flush = false , |
||
bool | finish = false |
||
) | [inline] |
Typed variant of encode().
Definition at line 47 of file wvtypedencoder.h.
Referenced by WvTypedEncoder< IT, OT >::encode(), and WvTypedEncoder< IT, unsigned char, S >::encode().
bool WvTypedEncoder< IT, OT, S >::flush | ( | IBuffer & | inbuf, |
OBuffer & | outbuf, | ||
bool | finish = false |
||
) | [inline] |
Typed variant of flush().
Definition at line 59 of file wvtypedencoder.h.
Referenced by WvTypedEncoder< IT, OT >::encode(), WvTypedEncoder< IT, unsigned char, S >::encode(), WvTypedEncoder< IT, OT >::flush(), and WvTypedEncoder< IT, unsigned char, S >::flush().
bool WvTypedEncoder< IT, OT, S >::finish | ( | OBuffer & | outbuf | ) | [inline] |
Typed variant of finish().
Definition at line 70 of file wvtypedencoder.h.
Referenced by WvTypedEncoder< IT, OT >::encode(), WvTypedEncoder< IT, unsigned char, S >::encode(), WvTypedEncoder< IT, OT >::finish(), WvTypedEncoder< IT, OT >::flush(), and WvTypedEncoder< IT, unsigned char, S >::flush().
virtual bool WvTypedEncoder< IT, OT, S >::_typedencode | ( | IBuffer & | inbuf, |
OBuffer & | outbuf, | ||
bool | flush | ||
) | [protected, pure virtual] |
Typed variant of _encode().
Implemented in WvFunctorEncoder< IT, OT, FT >.
Referenced by WvTypedEncoder< IT, OT >::_encode(), WvTypedEncoder< IT, unsigned char, S >::_encode(), and WvTypedEncoder< unsigned char, unsigned char, S >::_encode().
virtual bool WvTypedEncoder< IT, OT, S >::_typedfinish | ( | OBuffer & | outbuf | ) | [inline, protected, virtual] |
Typed variant of _finish().
Definition at line 103 of file wvtypedencoder.h.
Referenced by WvTypedEncoder< IT, OT >::_finish(), WvTypedEncoder< IT, unsigned char, S >::_finish(), and WvTypedEncoder< unsigned char, unsigned char, S >::_finish().
virtual bool WvTypedEncoder< IT, OT, S >::_encode | ( | WvBuf & | inbuf, |
WvBuf & | outbuf, | ||
bool | flush | ||
) | [inline, protected, virtual] |
Wrapper implementation of _encode().
Definition at line 107 of file wvtypedencoder.h.
virtual bool WvTypedEncoder< IT, OT, S >::_finish | ( | WvBuf & | outbuf | ) | [inline, protected, virtual] |
Wrapper implementation of _finish().
Definition at line 116 of file wvtypedencoder.h.