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

#include <cDomainElement.h>

Collaboration diagram for fib::cDomainElement:

List of all members.

Public Member Functions

 cDomainElement (const cTypeElement &typeElement, const cDomain &domain)
 cDomainElement (const cTypeElement &typeElement, cDomain *domain=NULL)
 cDomainElement (const cDomainElement &domainElement)
 ~cDomainElement ()
cTypeElementgetElementType () const
cDomaingetDomain () const
bool setDomain (const cDomain &domain)
bool setDomain (cDomain *domain)
virtual unsignedLongFib getCompressedSize () const
virtual bool storeXml (ostream &ostream) const
virtual bool store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const

Static Public Member Functions

static bool isCompatible (const cTypeElement &typeElement, const cDomain &domain)

Protected Attributes

cTypeElementtypeElement
cDomaindomain
bool bDomainIsCopy

Detailed Description

Definition at line 50 of file cDomainElement.h.


Constructor & Destructor Documentation

fib::cDomainElement::cDomainElement ( const cTypeElement typeElement,
const cDomain domain 
)

The constructor for domain elements.

Parameters:
typeElementthe type of the element this domain element represents
domainthe domain for this domain element; if it is Nullpointer NULL (the standard value) as the domain or the given domain is not compatible to the geven type typeElement the standard domain of the TypeElement will be set
fib::cDomainElement::cDomainElement ( const cTypeElement typeElement,
cDomain domain = NULL 
)

The constructor for domain elements. The given domain is inclueded direct, without copying it.

Parameters:
typeElementthe type of the element this domain element represents
domaina pointer to the domain for this domain element; if it is Nullpointer NULL (the standard value) as the domain or the given domain is not compatible to the given type typeElement the standard domain of the TypeElement will be set
fib::cDomainElement::cDomainElement ( const cDomainElement domainElement)

The copyconstructor for domain elements.

Parameters:
domainElementthe domain element to copy
fib::cDomainElement::~cDomainElement ( )

The destructor for domain elements.


Member Function Documentation

virtual unsignedLongFib fib::cDomainElement::getCompressedSize ( ) const
virtual

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

See also:
store()
Returns:
the size of the domain element in bits in the compressed form
cDomain* fib::cDomainElement::getDomain ( ) const
Returns:
a reference to the domain of this domain element; so you can adopt the domain
cTypeElement* fib::cDomainElement::getElementType ( ) const
Returns:
the type of the element this domain element represents
static bool fib::cDomainElement::isCompatible ( const cTypeElement typeElement,
const cDomain domain 
)
static

This method checks if the given domain is compatible with the given type. Reference domains (cDomainReference) are compatible with all typs.

See also:
cDomainReference
Parameters:
typeElementthe type for which to check if the domain is compatible
domainthe domain which should be compatible with the given type typeElement
Returns:
true if the given domain is compatible with the type typeElement
bool fib::cDomainElement::setDomain ( const cDomain domain)

This method sets the domain of this domain element to the given domain.

Parameters:
domainthe domain for this domain element
Returns:
true if the given domain is set, else false
bool fib::cDomainElement::setDomain ( cDomain domain)

This method sets the domain of this domain element to the given domain. The giving domain won't be copied befor inserted.

Parameters:
domaina pointer to the domain for this domain element
Returns:
true if the given domain is set, else false
virtual bool fib::cDomainElement::store ( ostream &  stream,
char &  cRestBits,
unsigned char &  uiRestBitPosition 
) const
virtual

This method stores this domain element 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 domains 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 element is stored, else false
virtual bool fib::cDomainElement::storeXml ( ostream &  ostream) const
virtual

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

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

Member Data Documentation

bool fib::cDomainElement::bDomainIsCopy
protected

if the domain is a copy of the original domain and will be deleted on distruction of this object

Definition at line 67 of file cDomainElement.h.

cDomain* fib::cDomainElement::domain
protected

the domain of this domain element

Definition at line 61 of file cDomainElement.h.

cTypeElement* fib::cDomainElement::typeElement
protected

the type of the element this domain element represents

Definition at line 56 of file cDomainElement.h.


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