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

#include <cTypeDimension.h>

Inheritance diagram for fib::cTypeDimension:
Collaboration diagram for fib::cTypeDimension:

List of all members.

Public Member Functions

 cTypeDimension (unsignedIntFib iNumberOfDimensions=2)
 cTypeDimension (vector< unsignedIntFib > dimensionMapping)
 cTypeDimension (const cTypeDimension &typeDimension)
virtual unsignedIntFib getType () const
virtual cDomaingetStandardDomain () const
virtual bool isCompatible (const cDomain &domain) const
unsignedIntFib getNumberOfDimensions () const
unsignedIntFib getDimensionMapping (unsignedIntFib iDimensionNumber) const
bool setDimensionMapping (unsignedIntFib iDimensionNumber, unsignedIntFib iMapping)
string getDimensionMappingName (unsignedIntFib iMapping) const
unsignedIntFib getNumberForDimensionMappingName (string szMappingName) const
virtual vector< string > getUnit () const
virtual bool equalElementType (const cTypeElement &typeElement) const
virtual bool operator== (const cTypeElement &typeElement) const
virtual cTypeDimensionclone () const
virtual unsignedLongFib getCompressedSize () const
virtual bool storeXml (ostream &ostream, const cDomain *domain=NULL) const
virtual cDomainrestoreXmlWithDomain (const TiXmlElement *pXmlElement, intFib &outStatus, const bool bRestoreDomain=true)
virtual bool store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const
virtual intFib restore (cReadBits &iBitStream)
- Public Member Functions inherited from fib::cTypeElement
virtual ~cTypeElement ()=0
virtual bool equal (const cTypeElement &typeElement) const
virtual bool isInherited () const

Static Public Attributes

static const unsignedIntFib DIRECTION_NONE = 0
static const unsignedIntFib DIRECTION_HORIZONTAL = 1
static const unsignedIntFib DIRECTION_VERTICAL = 2
static const unsignedIntFib DIRECTION_DEPTH = 3
static const unsignedIntFib DIRECTION_TIME = 4
static const unsignedIntFib DIRECTION_ANYWHERE = 16

Private Attributes

vector< unsignedIntFibdimensionMapping

Additional Inherited Members

- Static Public Member Functions inherited from fib::cTypeElement
static cTypeElementrestoreXmlType (const TiXmlElement *pXmlElement, intFib &outStatus)
static pair< cTypeElement
*, cDomain * > 
restoreXmlTypeWithDomain (const TiXmlElement *pXmlElement, intFib &outStatus, const bool bRestoreDomain=true)
static cTypeElementrestore (cReadBits &iBitStream, intFib &outStatus)
- Static Protected Member Functions inherited from fib::cTypeElement
static bool isCounterDomain (const cDomain *pDomain)

Detailed Description

Definition at line 55 of file cTypeDimension.h.


Constructor & Destructor Documentation

fib::cTypeDimension::cTypeDimension ( unsignedIntFib  iNumberOfDimensions = 2)

The constructor for dimension typs.

Parameters:
iNumberOfDimensionsthe Number of dimensions the positionvetordomain has
fib::cTypeDimension::cTypeDimension ( vector< unsignedIntFib dimensionMapping)

The constructor for dimension typs. Duplicte mapping will be set to 0.

Parameters:
dimensionMappingthe mappings for the dimensions
fib::cTypeDimension::cTypeDimension ( const cTypeDimension typeDimension)

The copyconstructor for dimension typs.

Parameters:
typeDimensionthe type dimension to copy

Member Function Documentation

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

This Method clones this object.

Returns:
a clone of this object

Implements fib::cTypeElement.

virtual bool fib::cTypeDimension::equalElementType ( const cTypeElement typeElement) const
virtual

This Method checks if the elementtype of the given type is equal to the elementtype of this type. Two elementtype are not equal if ther are for different fib -elements.

Parameters:
typeElementthe typeelement to compare with this typeelement
Returns:
true if the elementtype of the given type is equal to the elementtype of this type, else false

Reimplemented from fib::cTypeElement.

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

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

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

Implements fib::cTypeElement.

unsignedIntFib fib::cTypeDimension::getDimensionMapping ( unsignedIntFib  iDimensionNumber) const

This method returns in which direction the iDimensionNumber dimension is mapped.

Parameters:
iDimensionNumberthe number of the dimension for which the mapping is to be returned
Returns:
the direction in which the iDimensionNumber dimension is mapped
string fib::cTypeDimension::getDimensionMappingName ( unsignedIntFib  iMapping) const

This method returns a name for the dimensionmapping with the given number.

See also:
getNumberForDimensionMappingName()
Parameters:
iMappingthe mapping for which a string/name is to be returned
Returns:
a string for the mapping with the number iMapping if known, else an empty string
unsignedIntFib fib::cTypeDimension::getNumberForDimensionMappingName ( string  szMappingName) const

This method returns the number for the given name of the dimensionmapping.

See also:
getDimensionMappingName()
Parameters:
szMappingNamethe mappingname for which the number is to be returned
Returns:
the number for the szMappingName or 0 if non such exists
unsignedIntFib fib::cTypeDimension::getNumberOfDimensions ( ) const
Returns:
the number of dimensions of the Fib -object
virtual cDomain* fib::cTypeDimension::getStandardDomain ( ) const
virtual

This Method returns a pointer to a new instance of the standart domain for elements of this dimension type. The returned standarddomain is adapted to the number of dimensions of this object. If you want the global standarddomain, please construct a cTypeDimension object with the constructor without parameters. ( The standard constructor.) You have to delete the returned object after usage.

Returns:
the standart domain for elements of this type

Reimplemented from fib::cTypeElement.

virtual unsignedIntFib fib::cTypeDimension::getType ( ) const
virtual

This Function returns for the type of the element an number. The values, which are returned, mean:

Returns:
for the type of the element an number

Implements fib::cTypeElement.

virtual vector<string> fib::cTypeDimension::getUnit ( ) const
virtual
Returns:
The SI unit for the dimension this type represents; possible values are:
  • "": for direction 0 none
  • "m": for direction 1 horizontal, 2 vertical or 3 depth direction
  • "s": for direction 4 time
virtual bool fib::cTypeDimension::isCompatible ( const cDomain domain) const
virtual

This method checks, if this element type is compatible with the given domain. Just domains which are compadible can be used for the elements of this type.

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

Reimplemented from fib::cTypeElement.

virtual bool fib::cTypeDimension::operator== ( const cTypeElement typeElement) const
virtual

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

Returns:
true if the given type is equal to this type, else false

Reimplemented from fib::cTypeElement.

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

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

See also:
store
Parameters:
iBitStreamthe stream where the type 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::cTypeElement.

virtual cDomain* fib::cTypeDimension::restoreXmlWithDomain ( const TiXmlElement *  pXmlElement,
intFib outStatus,
const bool  bRestoreDomain = true 
)
virtual

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

Parameters:
pXmlNodea pointer to the TinyXml node wher the type is stored in
outStatusan 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
bRestoreDomainif true a domain is to be asumed in the type element and it will be restored, else no domain will be restores
Returns:
a pointer to the restored domain, or NULL if it couldn't be restored

Implements fib::cTypeElement.

bool fib::cTypeDimension::setDimensionMapping ( unsignedIntFib  iDimensionNumber,
unsignedIntFib  iMapping 
)

This method sets in which direction the iDimensionNumber dimension is mapped.

Parameters:
iDimensionNumberthe number of the dimension for which the mapping is to be set
iMappingthe mapping to set for the dimension
Returns:
true if the mapping for the iDimensionNumber dimension is set to the given value iMapping, else false
virtual bool fib::cTypeDimension::store ( ostream &  stream,
char &  cRestBits,
unsigned char &  uiRestBitPosition 
) const
virtual

This method stores this typeelement 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 typeelement 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 typeelement is stored, else false

Implements fib::cTypeElement.

virtual bool fib::cTypeDimension::storeXml ( ostream &  ostream,
const cDomain domain = NULL 
) const
virtual

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

Parameters:
ostreamthe stream where domains should be stored to
domainthe domain which should be stored to this type; if a Nullpointer NULL (the standardvalue) is given, no domain will be stored to this type
Returns:
true if this type are stored, else false

Implements fib::cTypeElement.


Member Data Documentation

vector<unsignedIntFib> fib::cTypeDimension::dimensionMapping
private

the vector with the mappings for the dimensions

Definition at line 61 of file cTypeDimension.h.

const unsignedIntFib fib::cTypeDimension::DIRECTION_ANYWHERE = 16
static

Definition at line 75 of file cTypeDimension.h.

const unsignedIntFib fib::cTypeDimension::DIRECTION_DEPTH = 3
static

Definition at line 72 of file cTypeDimension.h.

const unsignedIntFib fib::cTypeDimension::DIRECTION_HORIZONTAL = 1
static

Definition at line 70 of file cTypeDimension.h.

const unsignedIntFib fib::cTypeDimension::DIRECTION_NONE = 0
static

constants for the directions/mappings of the dimension

Definition at line 69 of file cTypeDimension.h.

const unsignedIntFib fib::cTypeDimension::DIRECTION_TIME = 4
static

Definition at line 73 of file cTypeDimension.h.

const unsignedIntFib fib::cTypeDimension::DIRECTION_VERTICAL = 2
static

Definition at line 71 of file cTypeDimension.h.


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