Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WvTypedEncoder< IT, OT, S > Class Template Reference

#include <wvtypedencoder.h>

Inherits S.

Collaboration diagram for WvTypedEncoder< IT, OT, S >:

[legend]
List of all members.

Detailed Description

template<class IT, class OT, class S = WvEncoder>
class WvTypedEncoder< IT, OT, S >

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

See also:
WvEncoder

Definition at line 33 of file wvtypedencoder.h.

Public Types

typedef IT IType
typedef OT OType
typedef WvBufBase< ITypeIBuffer
typedef WvBufBase< OTypeOBuffer
typedef WvBufViewBase< ITypeIBufferView
typedef WvBufViewBase< OTypeOBufferView

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().


Member Typedef Documentation

template<class IT, class OT, class S = WvEncoder>
typedef WvBufBase<IType> WvTypedEncoder< IT, OT, S >::IBuffer
 

Reimplemented in WvFunctorEncoder< IT, OT, FT >, WvFunctorEncoder< float, signed short int, WvPCMNormFloatToSigned16Functor >, WvFunctorEncoder< double, signed short int, WvPCMNormDoubleToSigned16Functor >, WvFunctorEncoder< float, signed short int, WvPCMUnnormFloatToSigned16Functor >, WvFunctorEncoder< signed short int, float, WvPCMSigned16ToNormFloatFunctor >, WvFunctorEncoder< signed short int, double, WvPCMSigned16ToNormDoubleFunctor >, and WvFunctorEncoder< signed short int, float, WvPCMSigned16ToUnnormFloatFunctor >.

Definition at line 38 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
typedef WvBufViewBase<IType> WvTypedEncoder< IT, OT, S >::IBufferView
 

Definition at line 40 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
typedef IT WvTypedEncoder< IT, OT, S >::IType
 

Reimplemented in WvFunctorEncoder< IT, OT, FT >, WvFunctorEncoder< float, signed short int, WvPCMNormFloatToSigned16Functor >, WvFunctorEncoder< double, signed short int, WvPCMNormDoubleToSigned16Functor >, WvFunctorEncoder< float, signed short int, WvPCMUnnormFloatToSigned16Functor >, WvFunctorEncoder< signed short int, float, WvPCMSigned16ToNormFloatFunctor >, WvFunctorEncoder< signed short int, double, WvPCMSigned16ToNormDoubleFunctor >, and WvFunctorEncoder< signed short int, float, WvPCMSigned16ToUnnormFloatFunctor >.

Definition at line 36 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
typedef WvBufBase<OType> WvTypedEncoder< IT, OT, S >::OBuffer
 

Reimplemented in WvFunctorEncoder< IT, OT, FT >, WvFunctorEncoder< float, signed short int, WvPCMNormFloatToSigned16Functor >, WvFunctorEncoder< double, signed short int, WvPCMNormDoubleToSigned16Functor >, WvFunctorEncoder< float, signed short int, WvPCMUnnormFloatToSigned16Functor >, WvFunctorEncoder< signed short int, float, WvPCMSigned16ToNormFloatFunctor >, WvFunctorEncoder< signed short int, double, WvPCMSigned16ToNormDoubleFunctor >, and WvFunctorEncoder< signed short int, float, WvPCMSigned16ToUnnormFloatFunctor >.

Definition at line 39 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
typedef WvBufViewBase<OType> WvTypedEncoder< IT, OT, S >::OBufferView
 

Definition at line 41 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
typedef OT WvTypedEncoder< IT, OT, S >::OType
 

Reimplemented in WvFunctorEncoder< IT, OT, FT >, WvFunctorEncoder< float, signed short int, WvPCMNormFloatToSigned16Functor >, WvFunctorEncoder< double, signed short int, WvPCMNormDoubleToSigned16Functor >, WvFunctorEncoder< float, signed short int, WvPCMUnnormFloatToSigned16Functor >, WvFunctorEncoder< signed short int, float, WvPCMSigned16ToNormFloatFunctor >, WvFunctorEncoder< signed short int, double, WvPCMSigned16ToNormDoubleFunctor >, and WvFunctorEncoder< signed short int, float, WvPCMSigned16ToUnnormFloatFunctor >.

Definition at line 37 of file wvtypedencoder.h.


Member Function Documentation

template<class IT, class OT, class S = WvEncoder>
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.

template<class IT, class OT, class S = WvEncoder>
virtual bool WvTypedEncoder< IT, OT, S >::_finish WvBuf outbuf  )  [inline, protected, virtual]
 

Wrapper implementation of _finish().

Definition at line 116 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
virtual bool WvTypedEncoder< IT, OT, S >::_typedencode IBuffer inbuf,
OBuffer outbuf,
bool  flush
[protected, pure virtual]
 

Typed variant of _encode().

See also:
_encode(WvBuf&, WvBuf&, bool)

Implemented in WvSimpleAudioEncoder, WvSimpleAudioDecoder, WvRealToComplexFFTEncoder, WvComplexToRealFFTEncoder, WvPowerSpectrumEncoder, WvFunctorEncoder< IT, OT, FT >, WvOggSpeexEncoder, WvOggSpeexDecoder, WvOggVorbisEncoder, WvOggVorbisDecoder, WvSpeexEncoder, WvSpeexDecoder, WvFunctorEncoder< float, signed short int, WvPCMNormFloatToSigned16Functor >, WvFunctorEncoder< double, signed short int, WvPCMNormDoubleToSigned16Functor >, WvFunctorEncoder< float, signed short int, WvPCMUnnormFloatToSigned16Functor >, WvFunctorEncoder< signed short int, float, WvPCMSigned16ToNormFloatFunctor >, WvFunctorEncoder< signed short int, double, WvPCMSigned16ToNormDoubleFunctor >, and WvFunctorEncoder< signed short int, float, WvPCMSigned16ToUnnormFloatFunctor >.

template<class IT, class OT, class S = WvEncoder>
virtual bool WvTypedEncoder< IT, OT, S >::_typedfinish OBuffer outbuf  )  [inline, protected, virtual]
 

Typed variant of _finish().

See also:
_finish(WvBuf&)

Reimplemented in WvSimpleAudioEncoder, WvSimpleAudioDecoder, WvOggSpeexEncoder, WvOggSpeexDecoder, WvOggVorbisEncoder, WvOggVorbisDecoder, WvSpeexEncoder, and WvSpeexDecoder.

Definition at line 103 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
bool WvTypedEncoder< IT, OT, S >::encode WvBuf inbuf,
WvBuf outbuf,
bool  flush = false,
bool  finish = false
[inline]
 

Definition at line 76 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
bool WvTypedEncoder< IT, OT, S >::encode IBuffer inbuf,
OBuffer outbuf,
bool  flush = false,
bool  finish = false
[inline]
 

Typed variant of encode().

See also:
encode(WvBuf&, WvBuf&, bool, bool)

Definition at line 47 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
bool WvTypedEncoder< IT, OT, S >::finish WvBuf outbuf  )  [inline]
 

Definition at line 86 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
bool WvTypedEncoder< IT, OT, S >::finish OBuffer outbuf  )  [inline]
 

Typed variant of finish().

See also:
finish(WvBuf)

Definition at line 70 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
bool WvTypedEncoder< IT, OT, S >::flush WvBuf inbuf,
WvBuf outbuf,
bool  finish = false
[inline]
 

Definition at line 81 of file wvtypedencoder.h.

template<class IT, class OT, class S = WvEncoder>
bool WvTypedEncoder< IT, OT, S >::flush IBuffer inbuf,
OBuffer outbuf,
bool  finish = false
[inline]
 

Typed variant of flush().

See also:
flush(WvBuf, WvBuf, bool)

Definition at line 59 of file wvtypedencoder.h.


The documentation for this class was generated from the following file:
Generated on Tue Oct 5 01:09:32 2004 for WvStreams by doxygen 1.3.7