latest version v1.9 - last update 10 Apr 2010 |
Encodes a byte array to an array of bits. More...
#include <ltiBinarizationCodec.h>
Classes | |
class | parameters |
The parameters for the class binarizationCodec. More... | |
Public Member Functions | |
binarizationCodec () | |
binarizationCodec (const parameters &par) | |
binarizationCodec (const binarizationCodec &other) | |
virtual | ~binarizationCodec () |
virtual const char * | getTypeName () const |
const parameters & | getParameters () const |
binarizationCodec & | copy (const binarizationCodec &other) |
binarizationCodec & | operator= (const binarizationCodec &other) |
virtual functor * | clone () const |
virtual int | estimateEncodedSize (int originalSize) const |
virtual int | estimateDecodedSize (int originalSize) 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 |
Encodes a byte array to an array of bits.
In the encoded array, each bit will represent a byte in the original array.
lti::binarizationCodec::binarizationCodec | ( | ) |
default constructor
lti::binarizationCodec::binarizationCodec | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::binarizationCodec::binarizationCodec | ( | const binarizationCodec & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::binarizationCodec::~binarizationCodec | ( | ) | [virtual] |
destructor
virtual functor* lti::binarizationCodec::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
binarizationCodec& lti::binarizationCodec::copy | ( | const binarizationCodec & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::dataCodec.
virtual bool lti::binarizationCodec::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.
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::binarizationCodec::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.
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::binarizationCodec::estimateDecodedSize | ( | int | originalSize | ) | const [virtual] |
Computes the default buffer size for decoded data.
The source of the original data buffer is given as argument. The default is to return the given value.
originalSize | the size of the data buffer to be decoded |
Reimplemented from lti::dataCodec.
virtual int lti::binarizationCodec::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.
originalSize | the size of the data buffer to be encoded |
Reimplemented from lti::dataCodec.
const parameters& lti::binarizationCodec::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::dataCodec.
virtual const char* lti::binarizationCodec::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("binarizationCodec")
Reimplemented from lti::dataCodec.
binarizationCodec& lti::binarizationCodec::operator= | ( | const binarizationCodec & | other | ) |