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::cDomainRational Class Reference

#include <cDomainRational.h>

Inheritance diagram for fib::cDomainRational:
Collaboration diagram for fib::cDomainRational:

List of all members.

Public Member Functions

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

Protected Member Functions

void decomposeDoubleFib (const doubleFib dNumber, longFib &lInOutMantissa, longFib &lInOutExponent) const
- Protected Member Functions inherited from fib::cDomainRationalBasis
 cDomainRationalBasis (const cDomainIntegerBasis &dfMantissa, const cDomainIntegerBasis &dfExponent)
 cDomainRationalBasis (const cDomainRationalBasis &domainRational)
virtual ~cDomainRationalBasis ()

Additional Inherited Members

- Protected Attributes inherited from fib::cDomainRationalBasis
cDomainIntegerBasispDomainMantissa
cDomainIntegerBasispDomainExponent

Detailed Description

Definition at line 52 of file cDomainRational.h.


Constructor & Destructor Documentation

fib::cDomainRational::cDomainRational ( const cDomainIntegerBasis dfMantissa,
const cDomainIntegerBasis dfExponent 
)

The constructor for rational number domains.

Parameters:
dfMantissathe domain for the mantisse of the rational domain
dfExponentthe domain for the exponent of the rational domain
fib::cDomainRational::cDomainRational ( const TiXmlElement *  pXmlElement,
intFib outStatus 
)

This constructor restores a domain in the XML -format from an TinyXml element.

Parameters:
pXmlNodea pointer to the TinyXml node wher the domain is stored in
outStatusan integervalue with the errorvalue possible errorvalues are:
  • 0 loading successful
  • -1 loading error, invalid pXmlElement
  • -2 loading error, invalid data in pXmlElement
  • 1 loading warning, invalid data in pXmlElement, error could be corrected
  • 2 loading warning, invalid data in pXmlElement, maybe the loaded object is wrong
fib::cDomainRational::cDomainRational ( const cDomainRational domain)

The copyconstructor for natural numer domains.

Parameters:
domainthe rational number domain to copy

Member Function Documentation

virtual cDomainRational* fib::cDomainRational::clone ( ) const
virtual

This Method clones this object.

Returns:
a clone of this object

Implements fib::cDomainRationalBasis.

void fib::cDomainRational::decomposeDoubleFib ( const doubleFib  dNumber,
longFib lInOutMantissa,
longFib lInOutExponent 
) const
protected

Decompses a doubleFib number into it's mantissa and exponent part.

Parameters:
dNumberthe number to decompose
lInOutMantissaa pointer to the longFib field wher the mantissa should be stored
lInOutExponenta pointer to the longFib field wher the exponent should be stored
virtual unsignedIntFib fib::cDomainRational::getCompressedSize ( ) const
virtual

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

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

Implements fib::cDomain.

virtual unsignedIntFib fib::cDomainRational::getCompressedSizeForValue ( ) const
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

Implements fib::cDomainSingle.

doubleFib fib::cDomainRational::getMaximum ( ) const
virtual

This method returns the biggest value in the domain.

Returns:
the biggest value in the domain

Implements fib::cDomainSingle.

virtual doubleFib fib::cDomainRational::getMinimum ( ) const
virtual

This method returns the smalest value in the domain.

Returns:
the smalest value in the domain

Implements fib::cDomainSingle.

virtual doubleFib fib::cDomainRational::getNull ( ) const
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

Implements fib::cDomainSingle.

virtual string fib::cDomainRational::getType ( ) const
virtual
Returns:
the type of the domain as an string

Implements fib::cDomain.

virtual bool fib::cDomainRational::isElement ( const doubleFib  dValue) const
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 true is returned, else false

Implements fib::cDomainSingle.

virtual bool fib::cDomainRational::isInBoundaries ( const doubleFib  dValue) const
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 and lower than the maximum value.

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

Implements fib::cDomainSingle.

virtual intFib fib::cDomainRational::restore ( cReadBits iBitStream)
virtual

This method restores a domain from a bitstream, wher it is stored in the compressed fib -format.

See also:
store
Parameters:
iBitStreamthe stream where the domain is stored in, because the stream is an cReadBits, any number of bits can be readed from it
Returns:
an integervalue with the errorvalue possible errorvalues are:
  • 0 loading successful
  • -1 loading error, invalid pXmlElement
  • -2 loading error, invalid data in pXmlElement
  • 1 loading warning, invalid data in pXmlElement, error could be corrected
  • 2 loading warning, invalid data in pXmlElement, maybe the loaded object is wrong

Implements fib::cDomain.

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

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

See also:
storeValue
restoreValue
storeUnscaledValue
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
Returns:
the restored value

Implements fib::cDomainRationalBasis.

virtual intFib fib::cDomainRational::restoreXml ( const TiXmlElement *  pXmlElement)
virtual

This method restores a domain in the XML -format from an TinyXml element.

Parameters:
pXmlNodea pointer to the TinyXml node wher the domain is stored in
Returns:
an integervalue with the errorvalue possible errorvalues are:
  • 0 loading successful
  • -1 loading error, invalid pXmlElement
  • -2 loading error, invalid data in pXmlElement
  • 1 loading warning, invalid data in pXmlElement, error could be corrected
  • 2 loading warning, invalid data in pXmlElement, maybe the loaded object is wrong

Implements fib::cDomain.

virtual doubleFib fib::cDomainRational::round ( const doubleFib  dValue) const
virtual

This method round the given value dValue to an value in the domain of this object. The rounded vale 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

Implements fib::cDomainSingle.

virtual bool fib::cDomainRational::store ( ostream &  stream,
char &  cRestBits,
unsigned char &  uiRestBitPosition 
) const
virtual

This method stores this domain in the compressed fib -format 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:
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

Implements fib::cDomain.

virtual bool fib::cDomainRational::storeValue ( doubleFib  dValue,
ostream &  stream,
char &  cRestBits,
unsigned char &  uiRestBitPosition 
) const
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

Implements fib::cDomainRationalBasis.

virtual bool fib::cDomainRational::storeXml ( ostream &  ostream) const
virtual

This method stores this domain in the XML -format into the given stream.

Parameters:
ostreamthe stream where domains should be stored to
Returns:
true if this domain are stored, else false

Implements fib::cDomain.


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