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

#include <cTypeProperty.h>

Inheritance diagram for fib::cTypeProperty:
Collaboration diagram for fib::cTypeProperty:

List of all members.

Public Member Functions

 cTypeProperty (unsignedIntFib uiPropertyType, unsignedIntFib uiNumberOfDimensions=2)
 cTypeProperty (const cTypeProperty &typeProperty)
 cTypeProperty (const cTypeProperty &typeProperty, const cDomain &domain)
virtual bool isCompatible (const cDomain &domain) const
virtual cDomaingetStandardDomain () const
virtual unsignedIntFib getType () const
virtual unsignedIntFib getNumberOfProperty () const
virtual string getNameOfProperty () const
virtual vector< string > getUnit () const
virtual list< cTypePropertygetOverwritenTyps () const
bool isOverwritenTyp (const cTypeProperty &typeToCheck) const
bool isOverwritenTyp (const unsignedIntFib &uiTypeToCheck) const
bool isOverwriting () const
virtual bool isEvalued () const
virtual bool operator== (const cTypeElement &typeElement) const
virtual cTypePropertyclone () 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)
virtual bool operator< (const cTypeProperty &typeProperty) const
- Public Member Functions inherited from fib::cTypeElement
virtual ~cTypeElement ()=0
virtual bool equalElementType (const cTypeElement &typeElement) const
virtual bool equal (const cTypeElement &typeElement) const
virtual bool isInherited () const

Static Public Member Functions

static unsignedIntFib getNumberForPropertyName (const string szPropertyName)
static bool isOverwriting (const unsignedIntFib &uiTypeToCheck)
static bool isEvalued (const unsignedIntFib &uiTypeToCheck)
static bool lowerTypeProperty (const cTypeProperty &pTypeProperty1, const cTypeProperty &pTypeProperty2)
static bool lowerTypeProperty (const cTypeProperty *pTypeProperty1, const cTypeProperty *pTypeProperty2)
- 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 Public Attributes

static const unsignedIntFib NONE = 0
static const unsignedIntFib COLOR_RGB = 1
static const unsignedIntFib COLOR_GRAYSCALE = 2
static const unsignedIntFib LAYER = 100
static const unsignedIntFib TRANSPARENCY = 200
static const unsignedIntFib SOUND = 300
static const unsignedIntFib SOUND_POLARIZED = 301
static const unsignedIntFib SOUND_AMPLITUDE = 305
static const unsignedIntFib SOUND_BARRIER = 310
static const unsignedIntFib SOUND_REFLECTED = 311
static const unsignedIntFib SOUND_DAMPING = 312
static const unsignedIntFib KELVIN = 400
static const unsignedIntFib ELECTRO_MAGNETIC = 410
static const unsignedIntFib CHECKSUM = 600

Private Attributes

unsignedIntFib uiPropertyType
unsignedIntFib uiNumberOfDimensions

Additional Inherited Members

- Static Protected Member Functions inherited from fib::cTypeElement
static bool isCounterDomain (const cDomain *pDomain)

Detailed Description

Definition at line 61 of file cTypeProperty.h.


Constructor & Destructor Documentation

fib::cTypeProperty::cTypeProperty ( unsignedIntFib  uiPropertyType,
unsignedIntFib  uiNumberOfDimensions = 2 
)

The constructor for dimension typs.

Parameters:
iPropertyTypethe number of the property this type represents; possible values are: TODO
iPropertyTypethe number of dimension this property type is for; you don't have to give them if the number of dimensions is irrelevant for the property type
fib::cTypeProperty::cTypeProperty ( const cTypeProperty typeProperty)

The copyconstructor for property typs.

Parameters:
typePropertythe type property to copy
fib::cTypeProperty::cTypeProperty ( const cTypeProperty typeProperty,
const cDomain domain 
)

The constructor for property typs. This constructor constructs a propertytype, which is of the same type as the given propertytype typeProperty, but which is adapted to the given domain if possible. For that the number of dimension is set to a value that is compatible to the vectordomain if possible. (If not possible number of dimension is set to the value as in typeProperty.)

Parameters:
typePropertythe type property to copy
domainthe domain to which the propertytype is to be adapted

Member Function Documentation

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

This Method clones this object.

Returns:
a clone of this object

Implements fib::cTypeElement.

virtual unsignedLongFib fib::cTypeProperty::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.

virtual string fib::cTypeProperty::getNameOfProperty ( ) const
virtual
See also:
getNumberForPropertyName()
Returns:
the name of property this type represents
static unsignedIntFib fib::cTypeProperty::getNumberForPropertyName ( const string  szPropertyName)
static
See also:
getNameOfProperty()
Parameters:
szPropertyNamea name for a property
Returns:
the number the name szPropertyName represents
virtual unsignedIntFib fib::cTypeProperty::getNumberOfProperty ( ) const
virtual
Returns:
the type of property this type represents
virtual list<cTypeProperty> fib::cTypeProperty::getOverwritenTyps ( ) const
virtual
Returns:
The typs of the properties the properties of this type overwrites
virtual cDomain* fib::cTypeProperty::getStandardDomain ( ) const
virtual

This Method returns a pointer to a new instance of the standart domain for elements of this type. 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::cTypeProperty::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::cTypeProperty::getUnit ( ) const
virtual
Returns:
The SI unit for the dimension this type represents; possible values are:
  • "": for none
  • "m": for meter
  • "s": for secound TODO
virtual bool fib::cTypeProperty::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::cTypeProperty::isEvalued ( ) const
virtual
Returns:
this method returnes true, if the property of this type is for evaluating a fib -object, else false is returned
static bool fib::cTypeProperty::isEvalued ( const unsignedIntFib uiTypeToCheck)
static

This function checks if the given type is evalued.

Parameters:
uiTypeToCheckthe number of the type to check, if it is evalued
Returns:
this method returnes true, if the property of the given type is for evaluating a fib -object, else false is returned
bool fib::cTypeProperty::isOverwritenTyp ( const cTypeProperty typeToCheck) const

This method checks if the given type is overwritten by this type.

Parameters:
typeToCheckthe type to check, if it is overwritten
Returns:
true if typeToCheck is overwritten by this type, else false
bool fib::cTypeProperty::isOverwritenTyp ( const unsignedIntFib uiTypeToCheck) const

This method checks if the given type is overwritten by this type.

See also:
uiPropertyType
Parameters:
uiTypeToCheckthe number of the type to check, if it is overwritten
Returns:
true if uiTypeToCheck is overwritten by this type, else false
bool fib::cTypeProperty::isOverwriting ( ) const
Returns:
if this type overwrites typs true, else false
static bool fib::cTypeProperty::isOverwriting ( const unsignedIntFib uiTypeToCheck)
static

This function checks if the given type overwrites some typs.

Parameters:
uiTypeToCheckthe number of the type to check, if it overwrittes other typs
Returns:
if the given type overwrites typs true, else false
static bool fib::cTypeProperty::lowerTypeProperty ( const cTypeProperty pTypeProperty1,
const cTypeProperty pTypeProperty2 
)
static

This function compares two cTypeProperty. Propertytype is lower, if it's number is lower than the number of the other Propertytype.

Parameters:
pTypeProperty1a pointer to the first propertytype to compare
pTypeProperty2a pointer to the second propertytype to compare
Returns:
true if the propertytype pTypeProperty1 is lower than that of pTypeProperty2, else false
static bool fib::cTypeProperty::lowerTypeProperty ( const cTypeProperty pTypeProperty1,
const cTypeProperty pTypeProperty2 
)
static

This function compares two cTypeProperty. Propertytype is lower, if it's number is lower than the number of the other Propertytype.

Parameters:
pTypeProperty1a pointer to the first propertytype to compare
pTypeProperty2a pointer to the second propertytype to compare
Returns:
true if the propertytype pTypeProperty1 is lower than that of pTypeProperty2, else false
virtual bool fib::cTypeProperty::operator< ( const cTypeProperty typeProperty) const
virtual

This function compares this property type with the given property type. Propertytype is lower, if it's number is lower than the number of the other Propertytype.

Parameters:
typePropertya pointer to the second propertytype to compare
Returns:
true if this propertytype is lower than that the given of typeProperty, else false
virtual bool fib::cTypeProperty::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::cTypeProperty::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::cTypeProperty::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.

virtual bool fib::cTypeProperty::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::cTypeProperty::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

const unsignedIntFib fib::cTypeProperty::CHECKSUM = 600
static

Definition at line 99 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::COLOR_GRAYSCALE = 2
static

Definition at line 87 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::COLOR_RGB = 1
static

Definition at line 86 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::ELECTRO_MAGNETIC = 410
static

Definition at line 97 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::KELVIN = 400
static

Definition at line 96 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::LAYER = 100
static

Definition at line 88 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::NONE = 0
static

constants for the property type

Definition at line 84 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::SOUND = 300
static

Definition at line 90 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::SOUND_AMPLITUDE = 305
static

Definition at line 92 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::SOUND_BARRIER = 310
static

Definition at line 93 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::SOUND_DAMPING = 312
static

Definition at line 95 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::SOUND_POLARIZED = 301
static

Definition at line 91 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::SOUND_REFLECTED = 311
static

Definition at line 94 of file cTypeProperty.h.

const unsignedIntFib fib::cTypeProperty::TRANSPARENCY = 200
static

Definition at line 89 of file cTypeProperty.h.

unsignedIntFib fib::cTypeProperty::uiNumberOfDimensions
private

The number of dimension this property type is for. Some properties like soundPolarized change ther domains for different number of dimensions. So they need to be known, when the information about the domain of thes properties are given.

Definition at line 77 of file cTypeProperty.h.

unsignedIntFib fib::cTypeProperty::uiPropertyType
private

the number of the dimension this type represents; possible values are: TODO

Definition at line 69 of file cTypeProperty.h.


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