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 |
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) |
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) |
bool | isok () const |
Returns true if the encoder has not encountered an error. | |
bool | isok () const |
Returns true if the encoder has not encountered an error. | |
bool | isfinished () const |
Returns true if the encoder can no longer encode data. | |
bool | isfinished () const |
Returns true if the encoder can no longer encode data. | |
WvString | geterror () const |
Returns an error message if any is available. | |
WvString | geterror () const |
Returns an error message if any is available. | |
bool | reset () |
Asks an encoder to reset itself to its initial state at creation time, if supported. | |
bool | reset () |
Asks an encoder to reset itself to its initial state at creation time, if supported. | |
bool | flushstrbuf (WvStringParm instr, WvBuf &outbuf, bool finish=false) |
Flushes data through the encoder from a string to a buffer. | |
bool | flushstrbuf (WvStringParm instr, WvBuf &outbuf, bool finish=false) |
Flushes data through the encoder from a string to a buffer. | |
bool | flushstrstr (WvStringParm instr, WvString &outstr, bool finish=false) |
Flushes data through the encoder from a string to a string. | |
bool | flushstrstr (WvStringParm instr, WvString &outstr, bool finish=false) |
Flushes data through the encoder from a string to a string. | |
bool | encodebufstr (WvBuf &inbuf, WvString &outstr, bool flush=false, bool finish=false) |
Encodes data from a buffer to a string. | |
bool | encodebufstr (WvBuf &inbuf, WvString &outstr, bool flush=false, bool finish=false) |
Encodes data from a buffer to a string. | |
bool | flushbufstr (WvBuf &inbuf, WvString &outstr, bool finish=false) |
Flushes data through the encoder from a buffer to a string. | |
bool | flushbufstr (WvBuf &inbuf, WvString &outstr, bool finish=false) |
Flushes data through the encoder from a buffer to a string. | |
WvString | strflushstr (WvStringParm instr, bool finish=false) |
Flushes data through the encoder from a string to a string. | |
WvString | strflushstr (WvStringParm instr, bool finish=false) |
Flushes data through the encoder from a string to a string. | |
WvString | strflushbuf (WvBuf &inbuf, bool finish=false) |
Flushes data through the encoder from a buffer to a string. | |
WvString | strflushbuf (WvBuf &inbuf, bool finish=false) |
Flushes data through the encoder from a buffer to a string. | |
bool | flushmembuf (const void *inmem, size_t inlen, WvBuf &outbuf, bool finish=false) |
Flushes data through the encoder from memory to a buffer. | |
bool | flushmembuf (const void *inmem, size_t inlen, WvBuf &outbuf, bool finish=false) |
Flushes data through the encoder from memory to a buffer. | |
bool | flushmemmem (const void *inmem, size_t inlen, void *outmem, size_t *outlen, bool finish=false) |
Flushes data through the encoder from memory to memory. | |
bool | flushmemmem (const void *inmem, size_t inlen, void *outmem, size_t *outlen, bool finish=false) |
Flushes data through the encoder from memory to memory. | |
bool | encodebufmem (WvBuf &inbuf, void *outmem, size_t *outlen, bool flush=false, bool finish=false) |
Encodes data from a buffer to memory. | |
bool | encodebufmem (WvBuf &inbuf, void *outmem, size_t *outlen, bool flush=false, bool finish=false) |
Encodes data from a buffer to memory. | |
bool | flushbufmem (WvBuf &inbuf, void *outmem, size_t *outlen, bool finish=false) |
Flushes data through the encoder from a buffer to memory. | |
bool | flushbufmem (WvBuf &inbuf, void *outmem, size_t *outlen, bool finish=false) |
Flushes data through the encoder from a buffer to memory. | |
bool | flushstrmem (WvStringParm instr, void *outmem, size_t *outlen, bool finish=false) |
Flushes data through the encoder from a string to memory. | |
bool | flushstrmem (WvStringParm instr, void *outmem, size_t *outlen, bool finish=false) |
Flushes data through the encoder from a string to memory. | |
WvString | strflushmem (const void *inmem, size_t inlen, bool finish=false) |
Flushes data through the encoder from memory to a string. | |
WvString | strflushmem (const void *inmem, size_t inlen, bool finish=false) |
Flushes data through the encoder from memory to a string. | |
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(). | |
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(). | |
void | setnotok () |
Sets 'okay' to false explicitly. | |
void | setnotok () |
Sets 'okay' to false explicitly. | |
void | seterror (WvStringParm message) |
Sets an error condition, then setnotok(). | |
void | seterror (WVSTRING_FORMAT_DECL) |
Sets an error condition, then setnotok(). | |
void | seterror (WvStringParm message) |
Sets an error condition, then setnotok(). | |
void | seterror (WVSTRING_FORMAT_DECL) |
Sets an error condition, then setnotok(). | |
void | setfinished () |
Sets 'finished' to true explicitly. | |
void | setfinished () |
Sets 'finished' to true explicitly. | |
virtual bool | _isok () const |
Template method implementation of isok(). | |
virtual bool | _isok () const |
Template method implementation of isok(). | |
virtual bool | _isfinished () const |
Template method implementation of isfinished(). | |
virtual bool | _isfinished () const |
Template method implementation of isfinished(). | |
virtual WvString | _geterror () const |
Template method implementation of geterror(). | |
virtual WvString | _geterror () const |
Template method implementation of geterror(). | |
virtual bool | _reset () |
Template method implementation of reset(). | |
virtual bool | _reset () |
Template method implementation of reset(). | |
Protected Attributes | |
bool | okay |
bool | finished |
WvString | errstr |
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 debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef IT WvTypedEncoder< IT, OT, S >::IType |
Definition at line 36 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef OT WvTypedEncoder< IT, OT, S >::OType |
Definition at line 37 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef WvBufBase<IType> WvTypedEncoder< IT, OT, S >::IBuffer |
Definition at line 38 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef WvBufBase<OType> WvTypedEncoder< IT, OT, S >::OBuffer |
Definition at line 39 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef WvBufViewBase<IType> WvTypedEncoder< IT, OT, S >::IBufferView |
Definition at line 40 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef WvBufViewBase<OType> WvTypedEncoder< IT, OT, S >::OBufferView |
Definition at line 41 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
typedef IT WvTypedEncoder< IT, OT, S >::IType |
Definition at line 36 of file include/wvtypedencoder.h.
typedef OT WvTypedEncoder< IT, OT, S >::OType |
Definition at line 37 of file include/wvtypedencoder.h.
typedef WvBufBase<IType> WvTypedEncoder< IT, OT, S >::IBuffer |
Definition at line 38 of file include/wvtypedencoder.h.
typedef WvBufBase<OType> WvTypedEncoder< IT, OT, S >::OBuffer |
Definition at line 39 of file include/wvtypedencoder.h.
typedef WvBufViewBase<IType> WvTypedEncoder< IT, OT, S >::IBufferView |
Definition at line 40 of file include/wvtypedencoder.h.
typedef WvBufViewBase<OType> WvTypedEncoder< IT, OT, S >::OBufferView |
Definition at line 41 of file include/wvtypedencoder.h.
|
inline |
Typed variant of encode().
Definition at line 47 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::finish(), and WvTypedEncoder< IT, OT, S >::flush().
|
inline |
Typed variant of flush().
Definition at line 59 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::finish().
Referenced by WvTypedEncoder< IT, OT, S >::_encode(), WvTypedEncoder< IT, unsigned char, S >::_encode(), WvTypedEncoder< unsigned char, unsigned char, S >::_encode(), WvFunctorEncoder< IT, OT, FT >::_typedencode(), WvTypedEncoder< IT, OT, S >::encode(), and WvTypedEncoder< IT, unsigned char, S >::encode().
|
inline |
Typed variant of finish().
Definition at line 70 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
Referenced by WvTypedEncoder< IT, OT, S >::encode(), WvTypedEncoder< IT, unsigned char, S >::encode(), WvTypedEncoder< IT, OT, S >::flush(), and WvTypedEncoder< IT, unsigned char, S >::flush().
|
inline |
Definition at line 76 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
|
inline |
Definition at line 81 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
|
inline |
Definition at line 86 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
|
protectedpure virtual |
Typed variant of _encode().
Implemented in WvFunctorEncoder< IT, OT, FT >, and WvFunctorEncoder< IT, OT, FT >.
Referenced by WvTypedEncoder< IT, OT, S >::_encode(), WvTypedEncoder< IT, unsigned char, S >::_encode(), and WvTypedEncoder< unsigned char, unsigned char, S >::_encode().
|
inlineprotectedvirtual |
Typed variant of _finish().
Definition at line 103 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
Referenced by WvTypedEncoder< IT, OT, S >::_finish(), WvTypedEncoder< IT, unsigned char, S >::_finish(), and WvTypedEncoder< unsigned char, unsigned char, S >::_finish().
|
inlineprotectedvirtual |
Wrapper implementation of _encode().
Implements WvEncoder.
Definition at line 107 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::_typedencode(), and WvTypedEncoder< IT, OT, S >::flush().
|
inlineprotectedvirtual |
Wrapper implementation of _finish().
Reimplemented from WvEncoder.
Definition at line 116 of file debian/libwvstreams-dev/usr/include/wvstreams/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::_typedfinish().
|
inline |
Typed variant of encode().
Definition at line 47 of file include/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::finish(), and WvTypedEncoder< IT, OT, S >::flush().
|
inline |
Typed variant of flush().
Definition at line 59 of file include/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::finish().
|
inline |
Typed variant of finish().
Definition at line 70 of file include/wvtypedencoder.h.
|
inline |
Definition at line 76 of file include/wvtypedencoder.h.
|
inline |
Definition at line 81 of file include/wvtypedencoder.h.
|
inline |
Definition at line 86 of file include/wvtypedencoder.h.
|
protectedpure virtual |
Typed variant of _encode().
Implemented in WvFunctorEncoder< IT, OT, FT >, and WvFunctorEncoder< IT, OT, FT >.
|
inlineprotectedvirtual |
Typed variant of _finish().
Definition at line 103 of file include/wvtypedencoder.h.
|
inlineprotectedvirtual |
Wrapper implementation of _encode().
Implements WvEncoder.
Definition at line 107 of file include/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::_typedencode(), and WvTypedEncoder< IT, OT, S >::flush().
|
inlineprotectedvirtual |
Wrapper implementation of _finish().
Reimplemented from WvEncoder.
Definition at line 116 of file include/wvtypedencoder.h.
References WvTypedEncoder< IT, OT, S >::_typedfinish().
|
inlineinherited |
Returns true if the encoder has not encountered an error.
This should only be used to record permanent failures. Transient errors (eg. bad block, but recoverable) should be detected in a different fashion.
Returns: true if the encoder is ok
Definition at line 90 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::_isok(), and WvEncoder::okay.
Referenced by WvEncoder::geterror().
|
inlineinherited |
Returns true if the encoder has not encountered an error.
This should only be used to record permanent failures. Transient errors (eg. bad block, but recoverable) should be detected in a different fashion.
Returns: true if the encoder is ok
Definition at line 90 of file include/wvencoder.h.
References WvEncoder::_isok(), and WvEncoder::okay.
|
inlineinherited |
Returns true if the encoder can no longer encode data.
This will be set when the encoder detects and end-of-data mark in its input, or when finish() is called.
Returns: true if the encoder is finished
Definition at line 101 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::_isfinished(), and WvEncoder::finished.
|
inlineinherited |
Returns true if the encoder can no longer encode data.
This will be set when the encoder detects and end-of-data mark in its input, or when finish() is called.
Returns: true if the encoder is finished
Definition at line 101 of file include/wvencoder.h.
References WvEncoder::_isfinished(), and WvEncoder::finished.
|
inherited |
Returns an error message if any is available.
Returns: the error message, or the null string is isok() == true
Definition at line 23 of file wvencoder.cc.
References WvEncoder::_geterror(), WvEncoder::errstr, and WvEncoder::isok().
|
inherited |
Returns an error message if any is available.
Returns: the error message, or the null string is isok() == true
|
inherited |
Asks an encoder to reset itself to its initial state at creation time, if supported.
This function may be called at any time, even if isok() == false, or isfinished() == true.
If the behaviour is not supported or an error occurs, then false is returned and afterwards isok() == false.
Returns: true on success
Definition at line 60 of file wvencoder.cc.
References WvEncoder::_reset(), WvEncoder::errstr, WvEncoder::finished, WvEncoder::okay, and WvEncoder::seterror().
|
inherited |
Asks an encoder to reset itself to its initial state at creation time, if supported.
This function may be called at any time, even if isok() == false, or isfinished() == true.
If the behaviour is not supported or an error occurs, then false is returned and afterwards isok() == false.
Returns: true on success
|
inherited |
Flushes data through the encoder from a string to a buffer.
"instr" is the input string "outbuf" is the output buffer "finish" is if true, calls finish() on success Returns: true on success
Definition at line 77 of file wvencoder.cc.
References WvEncoder::encode(), and WvEncoder::finish().
|
inherited |
Flushes data through the encoder from a string to a buffer.
"instr" is the input string "outbuf" is the output buffer "finish" is if true, calls finish() on success Returns: true on success
|
inherited |
Flushes data through the encoder from a string to a string.
The output data is appended to the target string.
"instr" is the input string "outstr" is the output string "finish" is if true, calls finish() on success Returns: true on success
Definition at line 86 of file wvencoder.cc.
References WvEncoder::encode(), and WvEncoder::finish().
Referenced by WvEncoder::strflushstr().
|
inherited |
Flushes data through the encoder from a string to a string.
The output data is appended to the target string.
"instr" is the input string "outstr" is the output string "finish" is if true, calls finish() on success Returns: true on success
|
inherited |
Encodes data from a buffer to a string.
The output data is appended to the target string.
"inbuf" is the input buffer "outstr" is the output string "flush" is if true, flushes the encoder "finish" is if true, calls finish() on success Returns: true on success
Definition at line 97 of file wvencoder.cc.
References WvEncoder::encode(), WvEncoder::finish(), and WvEncoder::flush().
Referenced by WvEncoder::flushbufstr().
|
inherited |
Encodes data from a buffer to a string.
The output data is appended to the target string.
"inbuf" is the input buffer "outstr" is the output string "flush" is if true, flushes the encoder "finish" is if true, calls finish() on success Returns: true on success
|
inlineinherited |
Flushes data through the encoder from a buffer to a string.
The output data is appended to the target string.
"inbuf" is the input buffer "outstr" is the output string "finish" is if true, calls finish() on success Returns: true on success
Definition at line 249 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::encodebufstr(), and WvEncoder::finish().
Referenced by WvEncoder::strflushbuf().
|
inlineinherited |
Flushes data through the encoder from a buffer to a string.
The output data is appended to the target string.
"inbuf" is the input buffer "outstr" is the output string "finish" is if true, calls finish() on success Returns: true on success
Definition at line 249 of file include/wvencoder.h.
References WvEncoder::encodebufstr(), and WvEncoder::finish().
|
inherited |
Flushes data through the encoder from a string to a string.
"inbuf" is the input buffer "finish" is if true, calls finish() on success Returns: the resulting encoded string, does not signal errors
Definition at line 107 of file wvencoder.cc.
References WvEncoder::finish(), and WvEncoder::flushstrstr().
Referenced by WvDBusServerAuth::authorize().
|
inherited |
Flushes data through the encoder from a string to a string.
"inbuf" is the input buffer "finish" is if true, calls finish() on success Returns: the resulting encoded string, does not signal errors
|
inherited |
Flushes data through the encoder from a buffer to a string.
"inbuf" is the input buffer "finish" is if true, calls finish() on success Returns: the resulting encoded string, does not signal errors
Definition at line 115 of file wvencoder.cc.
References WvEncoder::finish(), and WvEncoder::flushbufstr().
Referenced by WvX509Mgr::sign(), and WvEncoder::strflushmem().
|
inherited |
Flushes data through the encoder from a buffer to a string.
"inbuf" is the input buffer "finish" is if true, calls finish() on success Returns: the resulting encoded string, does not signal errors
|
inherited |
Flushes data through the encoder from memory to a buffer.
"inmem" is the input data pointer "inlen" is the input data length "outbuf" is the output buffer "finish" is if true, calls finish() on success Returns: true on success
Definition at line 123 of file wvencoder.cc.
References WvEncoder::encode(), and WvEncoder::finish().
|
inherited |
Flushes data through the encoder from memory to a buffer.
"inmem" is the input data pointer "inlen" is the input data length "outbuf" is the output buffer "finish" is if true, calls finish() on success Returns: true on success
|
inherited |
Flushes data through the encoder from memory to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"inmem" is the input data pointer "inlen" is the input data length "outmem" is the output data pointer "outlen" is the output data length, by reference "finish" is if true, calls finish() on success Returns: true on success
Definition at line 132 of file wvencoder.cc.
References WvEncoder::encodebufmem(), and WvEncoder::finish().
Referenced by unhexify().
|
inherited |
Flushes data through the encoder from memory to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"inmem" is the input data pointer "inlen" is the input data length "outmem" is the output data pointer "outlen" is the output data length, by reference "finish" is if true, calls finish() on success Returns: true on success
|
inherited |
Encodes data from a buffer to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"inmem" is the input data pointer "inlen" is the input data length "outmem" is the output data pointer "outlen" is the output data length, by reference "flush" is if true, flushes the encoder "finish" is if true, calls finish() on success Returns: true on success
Definition at line 140 of file wvencoder.cc.
References WvEncoder::encode(), WvEncoder::finish(), and WvBufBaseCommonImpl< T >::used().
Referenced by WvEncoder::flushbufmem(), and WvEncoder::flushmemmem().
|
inherited |
Encodes data from a buffer to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"inmem" is the input data pointer "inlen" is the input data length "outmem" is the output data pointer "outlen" is the output data length, by reference "flush" is if true, flushes the encoder "finish" is if true, calls finish() on success Returns: true on success
|
inlineinherited |
Flushes data through the encoder from a buffer to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"inbuf" is the input buffer "outmem" is the output data pointer "outlen" is the output data length, by reference "finish" is if true, calls finish() on success Returns: true on success
Definition at line 337 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::encodebufmem(), and WvEncoder::finish().
Referenced by WvEncoder::flushstrmem().
|
inlineinherited |
Flushes data through the encoder from a buffer to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"inbuf" is the input buffer "outmem" is the output data pointer "outlen" is the output data length, by reference "finish" is if true, calls finish() on success Returns: true on success
Definition at line 337 of file include/wvencoder.h.
References WvEncoder::encodebufmem(), and WvEncoder::finish().
|
inherited |
Flushes data through the encoder from a string to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"instr" is the input string "outmem" is the output data pointer "outlen" is the output data length, by reference "finish" is if true, calls finish() on success Returns: true on success
Definition at line 150 of file wvencoder.cc.
References WvEncoder::finish(), and WvEncoder::flushbufmem().
Referenced by WvX509::verify().
|
inherited |
Flushes data through the encoder from a string to memory.
The outlen parameter specifies by reference the length of the output buffer. It is updated in place to reflect the number of bytes copied to the output buffer. If the buffer was too small to hold the data, the overflow bytes will be discarded and false will be returned.
"instr" is the input string "outmem" is the output data pointer "outlen" is the output data length, by reference "finish" is if true, calls finish() on success Returns: true on success
|
inherited |
Flushes data through the encoder from memory to a string.
"inmem" is the input data pointer "inlen" is the input data length "finish" is if true, calls finish() on success Returns: the resulting encoded string, does not signal errors
Definition at line 158 of file wvencoder.cc.
References WvEncoder::finish(), and WvEncoder::strflushbuf().
|
inherited |
Flushes data through the encoder from memory to a string.
"inmem" is the input data pointer "inlen" is the input data length "finish" is if true, calls finish() on success Returns: the resulting encoded string, does not signal errors
|
inlineprotectedinherited |
Sets 'okay' to false explicitly.
Definition at line 371 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::okay.
Referenced by WvEncoder::seterror().
|
inlineprotectedinherited |
Sets 'okay' to false explicitly.
Definition at line 371 of file include/wvencoder.h.
References WvEncoder::okay.
|
inlineprotectedinherited |
Sets an error condition, then setnotok().
Definition at line 375 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::errstr, and WvEncoder::setnotok().
Referenced by WvBase64Decoder::_encode(), WvHexDecoder::_encode(), WvEncoder::reset(), and WvEncoder::seterror().
|
inlineprotectedinherited |
Sets an error condition, then setnotok().
Definition at line 379 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::seterror().
|
inlineprotectedinherited |
Sets an error condition, then setnotok().
Definition at line 375 of file include/wvencoder.h.
References WvEncoder::errstr, and WvEncoder::setnotok().
|
inlineprotectedinherited |
Sets an error condition, then setnotok().
Definition at line 379 of file include/wvencoder.h.
References WvEncoder::seterror().
|
inlineprotectedinherited |
Sets 'finished' to true explicitly.
Definition at line 383 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
References WvEncoder::finished.
Referenced by WvBase64Decoder::_encode(), and WvEncoder::finish().
|
inlineprotectedinherited |
Sets 'finished' to true explicitly.
Definition at line 383 of file include/wvencoder.h.
References WvEncoder::finished.
|
inlineprotectedvirtualinherited |
Template method implementation of isok().
Not called if any of the following cases are true:
Most implementations do not need to override this.
Returns: true if the encoder is ok
Reimplemented in WvEncoderChain, and WvEncoderChain.
Definition at line 400 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::isok().
|
inlineprotectedvirtualinherited |
Template method implementation of isok().
Not called if any of the following cases are true:
Most implementations do not need to override this.
Returns: true if the encoder is ok
Reimplemented in WvEncoderChain, and WvEncoderChain.
Definition at line 400 of file include/wvencoder.h.
|
inlineprotectedvirtualinherited |
Template method implementation of isfinished().
Not called if any of the following cases are true:
Most implementations do not need to override this.
Returns: true if the encoder is finished
Reimplemented in WvEncoderChain, and WvEncoderChain.
Definition at line 416 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::isfinished().
|
inlineprotectedvirtualinherited |
Template method implementation of isfinished().
Not called if any of the following cases are true:
Most implementations do not need to override this.
Returns: true if the encoder is finished
Reimplemented in WvEncoderChain, and WvEncoderChain.
Definition at line 416 of file include/wvencoder.h.
|
inlineprotectedvirtualinherited |
Template method implementation of geterror().
Not called if any of the following cases are true:
Most implementations do not need to override this.
Returns: the error message, or the null string if _isok() == true
Reimplemented in WvEncoderChain, and WvEncoderChain.
Definition at line 433 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::geterror().
|
inlineprotectedvirtualinherited |
Template method implementation of geterror().
Not called if any of the following cases are true:
Most implementations do not need to override this.
Returns: the error message, or the null string if _isok() == true
Reimplemented in WvEncoderChain, and WvEncoderChain.
Definition at line 433 of file include/wvencoder.h.
|
inlineprotectedvirtualinherited |
Template method implementation of reset().
When this method is invoked, the current local state will be okay == true and finished == false. If false is returned, then okay will be set to false.
May set a detailed error message if an error occurs.
Returns: true on success, false on error or if not supported
Reimplemented in WvBackslashEncoder, WvBackslashDecoder, WvBase64Encoder, WvBase64Decoder, WvBlowfishEncoder, WvEVPMDDigest, WvHMACDigest, WvCrc32Digest, WvAdler32Digest, WvNullEncoder, WvPassthroughEncoder, WvEncoderChain, WvFunctorEncoder< IT, OT, FT >, WvGzipEncoder, WvHexEncoder, WvHexDecoder, WvRSAEncoder, WvTripleDESEncoder, WvWordWrapEncoder, WvBackslashEncoder, WvBackslashDecoder, WvBase64Encoder, WvBase64Decoder, WvBlowfishEncoder, WvEVPMDDigest, WvHMACDigest, WvCrc32Digest, WvAdler32Digest, WvNullEncoder, WvPassthroughEncoder, WvEncoderChain, WvFunctorEncoder< IT, OT, FT >, WvGzipEncoder, WvHexEncoder, WvHexDecoder, WvRSAEncoder, WvTripleDESEncoder, and WvWordWrapEncoder.
Definition at line 498 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::reset().
|
inlineprotectedvirtualinherited |
Template method implementation of reset().
When this method is invoked, the current local state will be okay == true and finished == false. If false is returned, then okay will be set to false.
May set a detailed error message if an error occurs.
Returns: true on success, false on error or if not supported
Reimplemented in WvBackslashEncoder, WvBackslashDecoder, WvBase64Encoder, WvBase64Decoder, WvBlowfishEncoder, WvEVPMDDigest, WvHMACDigest, WvCrc32Digest, WvAdler32Digest, WvNullEncoder, WvPassthroughEncoder, WvEncoderChain, WvFunctorEncoder< IT, OT, FT >, WvGzipEncoder, WvHexEncoder, WvHexDecoder, WvRSAEncoder, WvTripleDESEncoder, WvWordWrapEncoder, WvBackslashEncoder, WvBackslashDecoder, WvBase64Encoder, WvBase64Decoder, WvBlowfishEncoder, WvEVPMDDigest, WvHMACDigest, WvCrc32Digest, WvAdler32Digest, WvNullEncoder, WvPassthroughEncoder, WvEncoderChain, WvFunctorEncoder< IT, OT, FT >, WvGzipEncoder, WvHexEncoder, WvHexDecoder, WvRSAEncoder, WvTripleDESEncoder, and WvWordWrapEncoder.
Definition at line 498 of file include/wvencoder.h.
|
protectedinherited |
false iff setnotok() was called
Definition at line 70 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::encode(), WvEncoder::finish(), WvEncoder::isok(), WvEncoder::reset(), WvEncoder::setnotok(), and WvEncoder::WvEncoder().
|
protectedinherited |
true iff setfinished()/finish() was called
Definition at line 71 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::encode(), WvEncoder::finish(), WvEncoder::isfinished(), WvEncoder::reset(), WvEncoder::setfinished(), and WvEncoder::WvEncoder().
|
protectedinherited |
the error message
Definition at line 72 of file debian/libwvstreams-dev/usr/include/wvstreams/wvencoder.h.
Referenced by WvEncoder::geterror(), WvEncoder::reset(), and WvEncoder::seterror().