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

#include <cVectorProperty.h>

Inheritance diagram for fib::cVectorProperty:
Collaboration diagram for fib::cVectorProperty:

List of all members.

Public Member Functions

 cVectorProperty (unsignedIntFib uiPropertyType, cFibElement *pDefiningPropertyElement=NULL)
 cVectorProperty (const cVectorProperty &vector, cFibElement *pDefiningFibElement=NULL)
 cVectorProperty (unsignedIntFib uiPropertyType, unsignedIntFib iNumberOfElements, cFibElement *pDefiningPropertyElement=NULL)
 cVectorProperty (const TiXmlElement *pXmlElement, intFib &outStatus, list< cFibVariable * > &liDefinedVariables)
 cVectorProperty (cReadBits &iBitStream, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, const cDomain *pInVectorDomain, const cDomain *pInDomainVariable, unsignedIntFib uiInPropertyType)
 cVectorProperty (const cTypeProperty &typeProperty)
virtual cVectorPropertycreateInstance (unsignedIntFib iNumberOfElements=2, cFibElement *definingPropertyElement=NULL) const
virtual cTypeElementgetElementType () const
virtual unsignedIntFib getPropertyType () const
bool isOverwritenVector (const cVectorProperty &vectorToCheck) const
bool isOverwriting () const
bool isEvalued () const
virtual string getVectorType () const
virtual cVectorPropertyoperator= (const cFibVector &vector)
bool operator< (const cVectorProperty &vector) const
doubleFib distanceToProperty (const cVectorProperty &property) const
doubleFib distanceOfPropertyToNull () const
- Public Member Functions inherited from fib::cFibVector
virtual ~cFibVector ()
unsignedIntFib getNumberOfElements () const
virtual bool isVariable (unsignedIntFib iNumberElement) const
virtual bool isUsedVariable (const cFibVariable *variable) const
virtual set< cFibVariable * > getUsedVariables ()
virtual bool replaceVariable (cFibVariable *variableOld, cFibVariable *variableNew)
virtual doubleFib getValue (unsignedIntFib iNumberElement) const
virtual bool setValue (unsignedIntFib iNumberElement, doubleFib dValue)
virtual cFibVariablegetVariable (unsignedIntFib iNumberElement)
virtual bool setVariable (unsignedIntFib iNumberElement, cFibVariable *pVariable)
virtual cDomainVectorBasisgetDomain () const
virtual cDomainVectorBasisgetValueDomain () const
virtual cDomaingetDomain (unsignedIntFib iNumberElement) const
virtual cDomainVectorBasisgetStandardDomain () const
virtual cDomainSinglegetVariableDomain () const
cFibElementgetDefiningFibElement () const
virtual void setDefiningFibElement (cFibElement *fibElement=NULL, bool bCheckDomains=true)
virtual unsignedLongFib getCompressedSize () const
virtual unsignedLongFib getCompressedSize (const cDomainVectorBasis &valueVectorDomain, const cDomainSingle &variableDomain) const
virtual bool store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const
virtual bool store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition, const cDomainVectorBasis &valueVectorDomain, const cDomainSingle &variableDomain) const
virtual bool storeXml (ostream &stream) const
virtual bool equal (const cFibVector &vector) const
virtual bool operator== (const cFibVector &vector) const
bool operator!= (const cFibVector &vector) const
virtual bool operator< (const cFibVector &vector) const

Static Public Member Functions

static bool lowerPropertyVector (const cVectorProperty &vector1, const cVectorProperty &vector2)
static doubleFib distanceOfProperty (const cVectorProperty &property1, const cVectorProperty &property2)
static doubleFib distanceOfPropertyToNull (const cVectorProperty &property)
- Static Public Member Functions inherited from fib::cFibVector
static bool lowerVector (const cFibVector &vector1, const cFibVector &vector2)

Protected Attributes

unsignedIntFib uiPropertyType
- Protected Attributes inherited from fib::cFibVector
vector< eVectorTypeliVectorType
vector< doubleFibliVectorValues
vector< cFibVariable * > liVectorVariable
cFibElementpDefiningFibElement

Additional Inherited Members

- Protected Types inherited from fib::cFibVector
enum  eVectorType { VALUE, VARIABLE }
- Protected Member Functions inherited from fib::cFibVector
 cFibVector (unsignedIntFib iNumberOfVectorElements=1, cFibElement *definingFibElement=NULL)
 cFibVector (const cFibVector &vector, cFibElement *definingFibElement=NULL)
 cFibVector (const TiXmlElement *pXmlElement, intFib &outStatus, list< cFibVariable * > &liDefinedVariables)
 cFibVector (cReadBits &iBitStream, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, const cDomain *pInVectorDomain, const cDomain *pInDomainVariable, const unsignedIntFib uiInNumberOfElements=0)
virtual cFibElementgetVariableUsingFibElement () const
virtual bool deleteVariable (cFibVariable *pVariable)

Detailed Description

Definition at line 56 of file cVectorProperty.h.


Constructor & Destructor Documentation

fib::cVectorProperty::cVectorProperty ( unsignedIntFib  uiPropertyType,
cFibElement pDefiningPropertyElement = NULL 
)

The constructor of the propertyvector.

Parameters:
uiPropertyTypea number for the type of the property, this should be a type with a correct standard domain
pDefiningPropertyElementthe Fib -propertyelement which defines/ uses the propertyvector
fib::cVectorProperty::cVectorProperty ( const cVectorProperty vector,
cFibElement pDefiningFibElement = NULL 
)

The copy constructor of the vector.

Parameters:
vectorthe vector from which to copy the data
definingFibElementthe Fib -element which defines/ uses the new vector
fib::cVectorProperty::cVectorProperty ( unsignedIntFib  uiPropertyType,
unsignedIntFib  iNumberOfElements,
cFibElement pDefiningPropertyElement = NULL 
)

The constructor of the propertyvector.

Parameters:
uiPropertyTypea number for the type of the property
iNumberOfElementsnumber of elements in the vector
pDefiningPropertyElementthe Fib -propertyelement which defines/ uses the propertyvector
fib::cVectorProperty::cVectorProperty ( const TiXmlElement *  pXmlElement,
intFib outStatus,
list< cFibVariable * > &  liDefinedVariables 
)

The constructor for restoring a vector from an TinyXml element.

Parameters:
pXmlNodea pointer to the TinyXml node the vector is stored in
outStatusAn reference to an integervalue where the errorvalue can be stored to. 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
liDefinedVariablesa list with the defined variables for the to restore vector, every variable should have it's number (the number under which it is stored) as it's value
fib::cVectorProperty::cVectorProperty ( cReadBits iBitStream,
intFib outStatus,
list< cFibVariable * > &  liDefinedVariables,
const cDomain pInVectorDomain,
const cDomain pInDomainVariable,
unsignedIntFib  uiInPropertyType 
)

This constructor restores a propertyvector from the stream where it is stored in the compressed fib -format.

Parameters:
iBitStreamthe stream where this vector 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
liDefinedVariablesa list with the defined variables for the to restore vector, every variable should have it's number (the number under which it is stored) as it's value
pInVectorDomainthe domain for this vector
pInDomainVariablethe domain for variables
uiInPropertyTypea number for the type of the property
fib::cVectorProperty::cVectorProperty ( const cTypeProperty typeProperty)

The constructor of the propertyvector.

Parameters:
typePropertythe type this propertyvector should have

Member Function Documentation

virtual cVectorProperty* fib::cVectorProperty::createInstance ( unsignedIntFib  iNumberOfElements = 2,
cFibElement definingPropertyElement = NULL 
) const
virtual

This method creates an instance of this vector type.

Parameters:
iNumberOfElementsnumber of elements in the vector
definingPropertyElementthe Fib -propertyelement which defines/ uses the propertyvector

Implements fib::cFibVector.

static doubleFib fib::cVectorProperty::distanceOfProperty ( const cVectorProperty property1,
const cVectorProperty property2 
)
static

This function evalues the distance of two properties of the same type. This distance is the sum of the differnece of the property vectorelements

Parameters:
property1the first propertyvector
property2the second propertyvector
Returns:
the sum of differneces betwean the vectorelements in property1 and property2
doubleFib fib::cVectorProperty::distanceOfPropertyToNull ( ) const

This function evalues the distance of the this property to a property of the same type, wher all vectorelements are 0. This distance is the sum of the differnece of the property vectorelements

Parameters:
propertythe propertyvector
Returns:
the sum of differneces betwean the vectorelements in property and the nullvector of the same type with all vectorelements 0
static doubleFib fib::cVectorProperty::distanceOfPropertyToNull ( const cVectorProperty property)
static

This function evalues the distance of the given property to a property of the same type, wher all vectorelements are 0. This distance is the sum of the differnece of the property vectorelements

Parameters:
propertythe propertyvector
Returns:
the sum of differneces betwean the vectorelements in property and the nullvector of the same type with all vectorelements 0
doubleFib fib::cVectorProperty::distanceToProperty ( const cVectorProperty property) const

This function evalues the distance of this property to the given property of the same type. This distance is the sum of the differnece of the property vectorelements

Parameters:
propertythe first propertyvector
Returns:
the sum of differneces betwean the vectorelements in this property and the given property
virtual cTypeElement* fib::cVectorProperty::getElementType ( ) const
virtual

Returns the type of the vector. You have to delete the returned object after usage.

Returns:
the type of the vector

Implements fib::cFibVector.

virtual unsignedIntFib fib::cVectorProperty::getPropertyType ( ) const
virtual

This method returns a number for the type of the property.

See also:
cTypeProperty
Returns:
a number for the type of the property
virtual string fib::cVectorProperty::getVectorType ( ) const
virtual
Returns:
the name for the type of the vector

Implements fib::cFibVector.

bool fib::cVectorProperty::isEvalued ( ) const
Returns:
this method returnes true, if the property of this vector is for evaluating a fib -object, else false is returned
bool fib::cVectorProperty::isOverwritenVector ( const cVectorProperty vectorToCheck) const

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

Parameters:
vectorToCheckthe vector to check, if it is overwritten
Returns:
true if vectorToCheck is overwritten by this vector, else false
bool fib::cVectorProperty::isOverwriting ( ) const

This function checks if the this property vector overwrites property vectors.

Returns:
if the given vector overwrites vector true, else false
static bool fib::cVectorProperty::lowerPropertyVector ( const cVectorProperty vector1,
const cVectorProperty vector2 
)
static

This function compares two propertyvectors. Propertyvectors is lower if it's propertypvalues is lower than the propertyvectors of the other vector or its propertypvalues is equal, but if it has less elements than the other vector or it's i'th element is lower and all j'th elements with i > j are equal.

See also:
cFibVector::lowerVector()
Parameters:
vector1the first property to compare
vector2the second property to compare
Returns:
true if the propertyvectors vector1 is lower than that of vector2, else false
bool fib::cVectorProperty::operator< ( const cVectorProperty vector) const

This function compares this propertyvector with the given propertyvector. Propertyvectors is lower if it's propertypvalues is lower than the propertyvectors of the other vector or its propertypvalues is equal, but if it has less elements than the other vector or it's i'th element is lower and all j'th elements with i > j are equal.

See also:
cFibVector::lowerVector()
lowerPropertyVector()
Parameters:
vectorthe property to compare this with
Returns:
true if this propertyvectors is lower than the propertyvectors vector, else false
virtual cVectorProperty& fib::cVectorProperty::operator= ( const cFibVector vector)
virtual

This Method makes this vectorelements equal to the correspondending vectorelements of the given vector. The type of the vector won't be changed. The type of the propertie will be adapted.

Parameters:
vectorthe vector to copy

Reimplemented from fib::cFibVector.

Reimplemented in fib::cVectorChecksum.


Member Data Documentation

unsignedIntFib fib::cVectorProperty::uiPropertyType
protected

Definition at line 59 of file cVectorProperty.h.


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