LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::combinedCodec Class Reference

This is the base class for data encoding and decoding. More...

#include <ltiCombinedCodec.h>

Inheritance diagram for lti::combinedCodec:
Inheritance graph
[legend]
Collaboration diagram for lti::combinedCodec:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 combinedCodec (const dataCodec &c1, const dataCodec &c2)
 combinedCodec (const parameters &par)
 combinedCodec (const combinedCodec &other)
virtual ~combinedCodec ()
virtual const char * getTypeName () const
combinedCodeccopy (const combinedCodec &other)
combinedCodecoperator= (const combinedCodec &other)
virtual functorclone () const
virtual int estimateEncodedSize (int originalSize) const
virtual int estimateDecodedSize (int encodedSize) const

Protected Member Functions

virtual bool decodeImplementation (const buffer &src, buffer &dest, int nsrc, int &ndest) const
virtual bool encodeImplementation (const buffer &src, buffer &dest, int nsrc, int &ndest) const

Detailed Description

This is the base class for data encoding and decoding.

This an abstract class.


Constructor & Destructor Documentation

lti::combinedCodec::combinedCodec ( const dataCodec c1,
const dataCodec c2 
)

default constructor

lti::combinedCodec::combinedCodec ( const parameters par  ) 

Construct a functor using the given parameters.

lti::combinedCodec::combinedCodec ( const combinedCodec other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::combinedCodec::~combinedCodec (  )  [virtual]

destructor


Member Function Documentation

virtual functor* lti::combinedCodec::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

combinedCodec& lti::combinedCodec::copy ( const combinedCodec other  ) 

Copy another dataCodec.

Reimplemented from lti::dataCodec.

virtual bool lti::combinedCodec::decodeImplementation ( const buffer src,
buffer dest,
int  nsrc,
int &  ndest 
) const [protected, virtual]

Implementation of on-copy data decoder.

This method must not, under no circumstances, resize the destination vector.

Returns:
true if the decoding could be performed successfully.
Parameters:
src the source of the data.
dest the destination for the decoded data.
nsrc tells how many elements of the src vector must be decoded.
ndest tells how many elements of the destination vector can be used for the decoded data. When the method returns, this value tells how many elements were actually used, or notEnoughSpace if not enough elements were available.

Implements lti::dataCodec.

virtual bool lti::combinedCodec::encodeImplementation ( const buffer src,
buffer dest,
int  nsrc,
int &  ndest 
) const [protected, virtual]

Implementation of on-copy data encoder.

This method must not, under no circumstances, resize the destination vector.

Returns:
true if the decoding could be performed successfully.
Parameters:
src the source of the data.
dest the destination for the encoded data.
nsrc tells how many elements of the src vector must be decoded.
ndest tells how many elements of the destination vector can be used for the decoded data. When the method returns, this value tells how many elements were actually used, or notEnoughSpace if not enough elements were available.

Implements lti::dataCodec.

virtual int lti::combinedCodec::estimateDecodedSize ( int  encodedSize  )  const [virtual]

Computes the default buffer size for decoded data.

The source of the encoded data buffer is given as argument. The default is to return the given value.

Parameters:
encodedSize the size of the data buffer to be decoded
Returns:
the estimated size of the decoded data.

Reimplemented from lti::dataCodec.

virtual int lti::combinedCodec::estimateEncodedSize ( int  originalSize  )  const [virtual]

Computes the default buffer size for encoded data.

The source of the original data buffer is given as argument. The default is to return the given value.

Parameters:
originalSize the size of the data buffer to be encoded
Returns:
the estimated size of the encoded data.

Reimplemented from lti::dataCodec.

virtual const char* lti::combinedCodec::getTypeName (  )  const [virtual]

returns the name of this type ("combinedCodec")

Reimplemented from lti::dataCodec.

combinedCodec& lti::combinedCodec::operator= ( const combinedCodec other  ) 

Copy another dataCodec.

Reimplemented from lti::dataCodec.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:00 2010 for LTI-Lib by Doxygen 1.6.1