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

#include <cDomainReference.h>

Inheritance diagram for fib::cDomainReference:
Collaboration diagram for fib::cDomainReference:

List of all members.

Public Member Functions

 cDomainReference (const cTypeElement &inOriginalType, const vector< unsignedIntFib > vecInElementDomains=vector< unsignedIntFib >())
 cDomainReference (const cDomainReference &domain)
 ~cDomainReference ()
virtual bool isReference () const
virtual string getType () const
virtual cDomainReferenceclone () const
virtual bool operator== (const cDomain &domain) const
virtual unsignedIntFib getCompressedSize () 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)
const cTypeElementgetTypeElement () const
const vector< unsignedIntFib > & getElement () const
- Public Member Functions inherited from fib::cDomain
virtual ~cDomain ()=0
virtual bool isScalar () const
virtual bool isVector () const
virtual bool equal (const cDomain &domain) const

Protected Attributes

cTypeElementpOriginalType
vector< unsignedIntFibvecElementDomains

Additional Inherited Members

- 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 50 of file cDomainReference.h.


Constructor & Destructor Documentation

fib::cDomainReference::cDomainReference ( const cTypeElement inOriginalType,
const vector< unsignedIntFib vecInElementDomains = vector< unsignedIntFib >() 
)

The constructor for unscaled integer number domains. If lInMinNumber is the minimal number and ulMaxNumber the maximal number of the domain {lInMinNumber, ..., ulMaxNumber} is the domain.

Parameters:
inOriginalTypea reference the type of the element to which domain this domain refer to
See also:
pOriginalType
Parameters:
vecInElementDomainsThe subdomain of the domain of the element to which it is refered. The element with index i is a subdomain of the domain with index i-1 .
See also:
vecElementDomains
fib::cDomainReference::cDomainReference ( const cDomainReference domain)

The copy constructor for the reference domain.

Parameters:
domainthe reference domain to copy
fib::cDomainReference::~cDomainReference ( )

destructor


Member Function Documentation

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

This Method clones this object.

Returns:
a clone of this object

Implements fib::cDomain.

virtual unsignedIntFib fib::cDomainReference::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.

const vector<unsignedIntFib>& fib::cDomainReference::getElement ( ) const
See also:
vecElementDomains
Returns:
The subdomain of the domain of the element to which it is refered to. The element with index i is a subdomain of the domain with index i-1 .
virtual string fib::cDomainReference::getType ( ) const
virtual
Returns:
the type of the domain as a string

Implements fib::cDomain.

const cTypeElement* fib::cDomainReference::getTypeElement ( ) const

This method returns a pointer to the type of the element to which domain this domain refer to.

See also:
pOriginalType
Returns:
a pointer to the type of the element to which domain this domain refer to
virtual bool fib::cDomainReference::isReference ( ) const
virtual
Returns:
true if the object represents a reference domain, else false
See also:
cDomainReference

Reimplemented from fib::cDomain.

virtual bool fib::cDomainReference::operator== ( const cDomain domain) const
virtual

This Method checks if the given domain is equal to this domain.

Parameters:
domainthe domain which should be equal to this domain
Returns:
true if the given domain is equal to this domain, else false

Reimplemented from fib::cDomain.

virtual intFib fib::cDomainReference::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 integer value 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 intFib fib::cDomainReference::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 integer value 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 bool fib::cDomainReference::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::cDomainReference::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.


Member Data Documentation

cTypeElement* fib::cDomainReference::pOriginalType
protected

The type of the element to which domain this domain refer to.

Definition at line 56 of file cDomainReference.h.

vector<unsignedIntFib> fib::cDomainReference::vecElementDomains
protected

The subdomain of the domain of the element to which it is refered. The element with index i is a subdomain of the domain with index i-1 .

Definition at line 62 of file cDomainReference.h.


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