#include <cFibVector.h>
List of all members.
Public Member Functions |
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 cFibVariable * | getVariable (unsignedIntFib iNumberElement) |
virtual bool | setVariable (unsignedIntFib iNumberElement, cFibVariable *pVariable) |
virtual cTypeElement * | getElementType () const =0 |
virtual cDomainVectorBasis * | getDomain () const |
virtual cDomainVectorBasis * | getValueDomain () const |
virtual cDomain * | getDomain (unsignedIntFib iNumberElement) const |
virtual cDomainVectorBasis * | getStandardDomain () const |
virtual cDomainSingle * | getVariableDomain () const |
cFibElement * | getDefiningFibElement () 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 string | getVectorType () const =0 |
virtual bool | equal (const cFibVector &vector) const |
virtual bool | operator== (const cFibVector &vector) const |
bool | operator!= (const cFibVector &vector) const |
virtual cFibVector & | operator= (const cFibVector &vector) |
virtual bool | operator< (const cFibVector &vector) const |
Protected Member Functions |
| 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 cFibVector * | createInstance (unsignedIntFib iNumberOfVectorElements=1, cFibElement *definingFibElement=NULL) const =0 |
virtual cFibElement * | getVariableUsingFibElement () const |
virtual bool | deleteVariable (cFibVariable *pVariable) |
Detailed Description
Definition at line 77 of file cFibVector.h.
Member Enumeration Documentation
the type fore the type of the vectorelements
- Enumerator:
-
Definition at line 94 of file cFibVector.h.
Constructor & Destructor Documentation
The constructor of the vector.
- Parameters:
-
iNumberOfVectorElements | number of elements in the vector |
definingFibElement | the Fib-element which defines/ uses the new vector |
The copy constructor of the vector.
- Parameters:
-
vector | the vector from which to copy the data |
definingFibElement | the Fib-element which defines/ uses the new vector |
fib::cFibVector::cFibVector |
( |
const TiXmlElement * |
pXmlElement, |
|
|
intFib & |
outStatus, |
|
|
list< cFibVariable * > & |
liDefinedVariables |
|
) |
| |
|
protected |
The constructor for restoring a vector from an TinyXml element.
- Parameters:
-
pXmlNode | a pointer to the TinyXml node the vector is stored in |
outStatus | An 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
|
liDefinedVariables | a 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 |
This constructor restores a poisitionsvector from the stream where it is stored in the compressed Fib-format.
- Parameters:
-
iBitStream | the stream where this vector is stored to in, because this stream is an cReadBits, any number of bits can be readed from it |
outStatus | An 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
|
liDefinedVariables | a 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 |
pInVectorDomain | the domain for this vector |
pInDomainVariable | the domain for variables |
uiInNumberOfElements | the number of elements to restore, if not given or 0, it will be evalued by the number of elements of the given domain pInVectorDomain |
virtual fib::cFibVector::~cFibVector |
( |
| ) |
|
|
virtual |
The destructor of the vector.
Member Function Documentation
virtual bool fib::cFibVector::deleteVariable |
( |
cFibVariable * |
pVariable | ) |
|
|
protectedvirtual |
This method deletes all occurenc of the given variable from this element. So the variable is not used anymore of this element. Beware: This element has to be unregisterd (call unregisterUsingElement() ) at the pVariable seperatly. Do this directly befor or after calling this method.
- Parameters:
-
pVariable | the variable which is to delete from this element |
- Returns:
- true if the variable dosn't occure anymore in this element, else false
Implements fib::iVariableUser.
virtual bool fib::cFibVector::equal |
( |
const cFibVector & |
vector | ) |
const |
|
virtual |
This Method checks if the given vector is equal to this vector.
- Parameters:
-
vector | the vector to compare with this vector |
- Returns:
- true if the given vector is equal to this vector, else false
This method evaluades the size of the Fib-object in bits in the compressed file form.
- See also:
- store()
- Returns:
- the size of the Fib-object in bits in the compressed form
This method evaluades the size of the Fib-object in bits in the compressed file form.
- See also:
- store()
- Parameters:
-
valueVectorDomain | the domain for this vector |
variableDomain | the domain for variables |
- Returns:
- the size of the Fib-object in bits in the compressed form
cFibElement* fib::cFibVector::getDefiningFibElement |
( |
| ) |
const |
- Returns:
- the Fib-element which defines/ uses this vector or a Nullpointer NULL if non such Fib-element exists
Returns a reference to the domain the iNumberElement'te vectorelement or the nullpointer NULL if non exists.
- Parameters:
-
iNumberElement | the number of the element, which definitionarea is to return |
- Returns:
- a reference to the definitionarea of the iNumberElement'te vectorelement
virtual cTypeElement* fib::cFibVector::getElementType |
( |
| ) |
const |
|
pure virtual |
Returns the number of elements the vector contains.
- Returns:
- the number of elements the vector contains
virtual set<cFibVariable*> fib::cFibVector::getUsedVariables |
( |
| ) |
|
|
virtual |
This method returns all variables used in this vector.
- See also:
- cFibVariable
- Returns:
- all variables used in this vector
Returns the value of the iNumberElement'te vectorelement or Nullvalue if non such exists.
- Parameters:
-
iNumberElement | the number of the element, which value is to return |
- Returns:
- the value of the iNumberElement'te vectorelement or 0 if non such exists
Returns the variable of the iNumberElement'te vectorelement or the Nullpointer NULL, if the iNumberElement'te vectorelement isn't an variable.
- Parameters:
-
iNumberElement | the number of the element, which variable is to return |
- Returns:
- the variable of the iNumberElement'te vectorelement or the Nullpointer NULL, if the iNumberElement'te vectorelement isn't an variable.
virtual cDomainSingle* fib::cFibVector::getVariableDomain |
( |
| ) |
const |
|
virtual |
Returns a reference to the domain for variables of the vector. You have to delete the returned object after usage.
- Returns:
- a reference to the domain for variables of the vector
virtual cFibElement* fib::cFibVector::getVariableUsingFibElement |
( |
| ) |
const |
|
protectedvirtual |
- Returns:
- the Fib-element which uses the variables of this element
Implements fib::iVariableUser.
virtual string fib::cFibVector::getVectorType |
( |
| ) |
const |
|
pure virtual |
virtual bool fib::cFibVector::isUsedVariable |
( |
const cFibVariable * |
variable | ) |
const |
|
virtual |
This method checks if the given variable is used in this vector.
- See also:
- cFibVariable
- Parameters:
-
variable | the variable to check if it is used |
- Returns:
- true if the variable is used, else false
virtual bool fib::cFibVector::isVariable |
( |
unsignedIntFib |
iNumberElement | ) |
const |
|
virtual |
Returns if the iNumberElement'te vectorelement is an variable.
- Parameters:
-
iNumberElement | the number of the element, for which is to check if it is an variable |
- Returns:
- true if the iNumberElement'te vectorelement is an variable, else false
This function compares two Fib-vectors. A vector is lower, 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.
- Parameters:
-
vector1 | the first vector to compare |
vector2 | the second vector to compare |
- Returns:
- true if the vector1 is lower than that of vector2, else false
bool fib::cFibVector::operator!= |
( |
const cFibVector & |
vector | ) |
const |
This Method checks if the given vector is not equal to this vector.
- Parameters:
-
vector | the vector to compare with this vector |
- Returns:
- true if the given vector is not equal to this vector, else false
virtual bool fib::cFibVector::operator< |
( |
const cFibVector & |
vector | ) |
const |
|
virtual |
This function compares on lower this vector with the given Fib-vector. A vector is lower, 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:
- lowerVector()
- Parameters:
-
vector | the vector to compare |
- Returns:
- true if this vector is lower than that of vector, else false
virtual bool fib::cFibVector::operator== |
( |
const cFibVector & |
vector | ) |
const |
|
virtual |
This Method checks if the given vector is equal to this vector.
- Parameters:
-
vector | the vector to compare with this vector |
- Returns:
- true if the given vector is equal to this vector, else false
This method replace the variable variableOld with the variable variableNew in the vector.
- See also:
- cFibVariable
-
isVariable()
-
isUsedVariable()
- Parameters:
-
variableOld | the variable to replace |
variableNew | the variable with which the variable variableOld is to replace |
- Returns:
- true if the variable variableOld is replaced with variableNew, else false
virtual void fib::cFibVector::setDefiningFibElement |
( |
cFibElement * |
fibElement = NULL , |
|
|
bool |
bCheckDomains = true |
|
) |
| |
|
virtual |
Sets the value of the iNumberElement'te vectorelement.
- Parameters:
-
iNumberElement | the number of the element, which value is to set |
dValue | the value to set |
- Returns:
- true if the iNumberElement'te vectorelement is set to the given value dValue, else false
Sets the variable of the iNumberElement'te vectorelement.
- Parameters:
-
iNumberElement | the number of the element, where the variable is to set |
pVariable | the variable to set |
- Returns:
- true if the iNumberElement'te vectorelement is set to the given variable pVariable, else false
Reimplemented in fib::cVectorChecksum.
virtual bool fib::cFibVector::store |
( |
ostream & |
stream, |
|
|
char & |
cRestBits, |
|
|
unsigned char & |
uiRestBitPosition |
|
) |
| const |
|
virtual |
This method stores this Fib-object in the compressed Fib-format into the given stream. It is needed becouse 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:
- store
- Parameters:
-
stream | the stream where this Fib-object should be stored to |
cRestBits | the not yet writen bits which should be stored |
uiRestBitPosition | the number of bits in the cRestBits which should be writen respectively containing valid information |
- Returns:
- true if this Fib-object is stored, else false
virtual bool fib::cFibVector::store |
( |
ostream & |
stream, |
|
|
char & |
cRestBits, |
|
|
unsigned char & |
uiRestBitPosition, |
|
|
const cDomainVectorBasis & |
valueVectorDomain, |
|
|
const cDomainSingle & |
variableDomain |
|
) |
| const |
|
virtual |
This method stores this Fib-object in the compressed Fib-format into the given stream. It is needed becouse 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:
- store
- Parameters:
-
stream | the stream where this Fib-object should be stored to |
cRestBits | the not yet writen bits which should be stored |
uiRestBitPosition | the number of bits in the cRestBits which should be writen respectively containing valid information |
valueVectorDomain | the domain for this vector |
variableDomain | the domain for variables |
- Returns:
- true if this Fib-object is stored, else false
virtual bool fib::cFibVector::storeXml |
( |
ostream & |
stream | ) |
const |
|
virtual |
This method stores this vector in the XML -format into the given stream. Variables should have ther number as ther value.
- Parameters:
-
stream | the stream where this vectorshould be stored to |
- Returns:
- true if this vector is stored, else false
Friends And Related Function Documentation
Member Data Documentation
the vector with the type of the vectorelements
Definition at line 101 of file cFibVector.h.
vector<doubleFib> fib::cFibVector::liVectorValues |
|
protected |
the vector with the values of the vectorelements
Definition at line 106 of file cFibVector.h.
the vector with the variables of the vectorelements
Definition at line 111 of file cFibVector.h.
the Fib-element which defines/ uses the vector
Definition at line 116 of file cFibVector.h.
The documentation for this class was generated from the following file: