The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fib::cDomainSingle Class Reference

#include <cDomainSingle.h>

Inheritance diagram for fib::cDomainSingle:
Collaboration diagram for fib::cDomainSingle:

List of all members.

Public Member Functions

virtual bool isScalar () const
virtual bool isVector () const
virtual bool isElement (const doubleFib dValue) const =0
virtual bool isInBoundaries (const doubleFib dValue) const =0
virtual doubleFib round (const doubleFib dValue) const =0
virtual doubleFib getMaximum () const =0
virtual doubleFib getMinimum () const =0
virtual doubleFib getNull () const =0
virtual cDomainSingleclone () const =0
virtual unsignedIntFib getCompressedSizeForValue () const =0
virtual bool storeValue (doubleFib dValue, ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const =0
virtual doubleFib restoreValue (cReadBits &iBitStream, intFib &outStatus) const =0
- Public Member Functions inherited from fib::cDomain
virtual ~cDomain ()=0
virtual string getType () const =0
virtual bool isReference () const
virtual bool equal (const cDomain &domain) const
virtual bool operator== (const cDomain &domain) const
virtual unsignedIntFib getCompressedSize () const =0
virtual bool storeXml (ostream &ostream) const =0
virtual intFib restoreXml (const TiXmlElement *pXmlElement)=0
virtual bool store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const =0
virtual intFib restore (cReadBits &iBitStream)=0

Static Public Member Functions

static cDomainSinglecreateGoodDomain (list< doubleFib > &liValues)
- Static Public Member Functions inherited from fib::cDomain
static cDomainrestoreXml (const TiXmlElement *pXmlElement, intFib &outStatus)
static cDomainrestore (cReadBits &iBitStream, intFib &outStatus)

Detailed Description

Definition at line 54 of file cDomainSingle.h.


Member Function Documentation

virtual cDomainSingle* fib::cDomainSingle::clone ( ) const
pure virtual
static cDomainSingle* fib::cDomainSingle::createGoodDomain ( list< doubleFib > &  liValues)
static

This function creates creates a good domain wich contains all the numbers of the given list liValues. A domain is better than an other domain, if it takes less storage bits to store the numbers and the domain. Beware: You have to care that the returned domain is deleted. (if one was returned)

Parameters:
liValuesthe list with the values, for which a domain is to create
Returns:
a new domain which contains all the given values liValues
virtual unsignedIntFib fib::cDomainSingle::getCompressedSizeForValue ( ) const
pure virtual

This method evaluades the size of values in the domain in bits in the compressed file form.

See also:
store()
Returns:
the size of the domain in bits in the compressed form

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual doubleFib fib::cDomainSingle::getMaximum ( ) const
pure virtual

This method returns the biggest value in the domain.

Returns:
the biggest value in the domain

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual doubleFib fib::cDomainSingle::getMinimum ( ) const
pure virtual

This method returns the smalest value in the domain.

Returns:
the smalest value in the domain

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual doubleFib fib::cDomainSingle::getNull ( ) const
pure virtual

This method returns the nullvalue of the domain. The nullvalue is the value 0 rounded to an value in the domain.

Returns:
the nullvalue of the domain

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual bool fib::cDomainSingle::isElement ( const doubleFib  dValue) const
pure virtual

This method checks if the given value is an element of the domain. If the value dValue is an element of the domain true is returned, else false.

Parameters:
dValuethe value for which to check, if it is an element of the domain
Returns:
if the value dValue is an element of the domain true is returned, else false

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual bool fib::cDomainSingle::isInBoundaries ( const doubleFib  dValue) const
pure virtual

This method checks if the given value is inside the domain boundaries. If the value dValue is inside of the domain boundaries true is returned, else false. A value is inside of the vector domain boudaries, if it is greater than the minimum value minus the scaling factor and lower than the maximum value plus the scaling factor.

Parameters:
dValuethe value for which to check, if it is inside of the domain boundaries
Returns:
if the vector dValue is inside of the domain boundaries true is returned, else false

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual bool fib::cDomainSingle::isScalar ( ) const
inlinevirtual
Returns:
true if the object represents a scalar domain, else false

Reimplemented from fib::cDomain.

Definition at line 60 of file cDomainSingle.h.

virtual bool fib::cDomainSingle::isVector ( ) const
inlinevirtual
Returns:
true if the object represents a vector domain, else false

Reimplemented from fib::cDomain.

Definition at line 67 of file cDomainSingle.h.

virtual doubleFib fib::cDomainSingle::restoreValue ( cReadBits iBitStream,
intFib outStatus 
) const
pure virtual

This method restores the a value of the domain from the stream iBitStream wher it is stored in the compressed fib -format.

See also:
storeValue
cFibElement::restore
Parameters:
iBitStreamthe stream where this value is stored to in, because this stream is an cReadBits, any number of bits can be readed from it
outStatusAn reference to an integervalue where the errorvalue can be stored to. If the pointer is NULL no errorvalue will be given back. possible errorvalues are:
  • 0 loading successful
  • -1 loading error, invalid stream
  • -2 loading error, invalid data in stream
  • 1 loading warning, invalid data in stream, error could be corrected
  • 2 loading warning, invalid data in stream, maybe the loaded object is wrong

Implemented in fib::cDomainRational, fib::cDomainIntegerBasis, and fib::cDomainRationalBasis.

virtual doubleFib fib::cDomainSingle::round ( const doubleFib  dValue) const
pure virtual

This method round the given value dValue to an value in the domain of this object. The rounded value will be the value with the minimal distance to the given value dValue. If more of these exists the smales will be returned.

Parameters:
dValuethe value which should be rounded
Returns:
the rounded value of dValue

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, and fib::cDomainRational.

virtual bool fib::cDomainSingle::storeValue ( doubleFib  dValue,
ostream &  stream,
char &  cRestBits,
unsigned char &  uiRestBitPosition 
) const
pure virtual

This method stores the given value dValue in the compressed fib -format for the domain into the given stream. It is needed because the stream can yust store byts but the size of fib -elements can be any number of bits. Because of that ther have to be a possibility to exchange the missing bits betwean the fib -elements.

See also:
cFibElement::store
Parameters:
dValuethe value to store
streamthe stream where this domain should be stored to
cRestBitsthe not yet writen bits which should be stored
uiRestBitPositionthe number of bits in the cRestBits which should be writen respectively containing valid information
Returns:
true if the domain is stored, else false

Implemented in fib::cDomainInteger, fib::cDomainIntegerBit, fib::cDomainNaturalNumber, fib::cDomainNaturalNumberBit, fib::cDomainRational, and fib::cDomainRationalBasis.


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