The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
|
#include <cFunctionTwoValue.h>
Public Member Functions | |
cFunctionTwoValue (const cUnderFunction &firstUnderfunction, const cUnderFunction &secondUnderfunction, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) | |
cFunctionTwoValue (cUnderFunction *pInFirstUnderfunction, cUnderFunction *pInSecondUnderfunction, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) | |
cFunctionTwoValue (const cFunctionTwoValue &underfunction, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) | |
cFunctionTwoValue (const TiXmlElement *pXmlElement, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) | |
cFunctionTwoValue (cReadBits &iBitStream, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, const cDomainSingle *pInDomainValue, const cDomainSingle *pInDomainVariable, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) | |
virtual | ~cFunctionTwoValue () |
cUnderFunction * | getFirstUnderFunction () |
const cUnderFunction * | getFirstUnderFunction () const |
void | setFirstUnderFunction (const cUnderFunction &underFunction, bool bDeleteOld=true) |
cUnderFunction * | getSecondUnderFunction () |
const cUnderFunction * | getSecondUnderFunction () const |
void | setSecondUnderFunction (const cUnderFunction &underFunction, bool bDeleteOld=true) |
virtual bool | isValid () const |
virtual bool | isUsedVariable (const cFibVariable *variable) const |
virtual set< cFibVariable * > | getUsedVariables () |
virtual bool | replaceVariable (cFibVariable *variableOld, cFibVariable *variableNew) |
virtual unsignedIntFib | getNumberOfUnderFunctions () const |
virtual void | setDefiningFibElement (cFibElement *fibElement=NULL, bool bCheckDomains=true) |
virtual unsignedLongFib | getTimeNeed (unsignedLongFib lMaxTime=0) const |
virtual unsignedLongFib | getCompressedSize () const |
virtual bool | storeXml (ostream &stream) const |
virtual bool | equal (const cUnderFunction &underfunction) const |
Public Member Functions inherited from fib::cUnderFunction | |
virtual | ~cUnderFunction () |
virtual doubleFib | getValue () const =0 |
virtual cTypeElement * | getElementType () const |
virtual cDomainSingle * | getDomain () const |
virtual cDomainSingle * | getValueDomain () const |
virtual cDomainSingle * | getStandardDomain () const |
virtual cDomainSingle * | getVariableDomain () const |
cFibElement * | getDefiningFibElement () const |
cUnderFunction * | getSuperiorUnderFunction () const |
virtual bool | store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const =0 |
virtual unsignedIntFib | getType () const =0 |
virtual string | getUnderFunctionName () const =0 |
virtual bool | operator== (const cUnderFunction &underfunction) const |
bool | operator!= (const cUnderFunction &underfunction) const |
virtual cUnderFunction * | clone (cUnderFunction *pInSuperiorUnderFunction=NULL, cFibElement *pInDefiningFibElement=NULL) const =0 |
Protected Attributes | |
cUnderFunction * | pFirstUnderfunction |
cUnderFunction * | pSecondUnderfunction |
Protected Attributes inherited from fib::cUnderFunction | |
cUnderFunction * | pSuperiorUnderFunction |
cFibElement * | pDefiningFibElement |
Additional Inherited Members | |
Static Public Member Functions inherited from fib::cUnderFunction | |
static cUnderFunction * | restoreXml (const TiXmlElement *pXmlElement, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) |
static cUnderFunction * | restore (cReadBits &iBitStream, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, const cDomainSingle *pInValueDomain, const cDomainSingle *pInDomainVariable, cUnderFunction *pInSuperiorFunction=NULL, cFibElement *pInDefiningFibElement=NULL) |
Static Public Attributes inherited from fib::cUnderFunction | |
static const unsignedIntFib | FUNCTION_VALUE = 0 |
static const unsignedIntFib | FUNCTION_VARIABLE = 1 |
static const unsignedIntFib | FUNCTION_LOG = 10 |
static const unsignedIntFib | FUNCTION_SIN = 11 |
static const unsignedIntFib | FUNCTION_ABS = 12 |
static const unsignedIntFib | FUNCTION_ARCSIN = 13 |
static const unsignedIntFib | FUNCTION_ROUND = 14 |
static const unsignedIntFib | FUNCTION_ADD = 20 |
static const unsignedIntFib | FUNCTION_SUB = 21 |
static const unsignedIntFib | FUNCTION_MULT = 22 |
static const unsignedIntFib | FUNCTION_DIV = 23 |
static const unsignedIntFib | FUNCTION_EXP = 24 |
static const unsignedIntFib | FUNCTION_MIN = 25 |
static const unsignedIntFib | FUNCTION_MAX = 26 |
static const unsignedIntFib | FUNCTION_IF = 30 |
static const unsignedIntFib | FUNCTION_MOD = 31 |
Protected Member Functions inherited from fib::cUnderFunction | |
cUnderFunction (cUnderFunction *pInSuperiorUnderFunction=NULL, cFibElement *pInDefiningFibElement=NULL) | |
cUnderFunction (const cUnderFunction &underfunction, cUnderFunction *pInSuperiorUnderFunction=NULL, cFibElement *pInDefiningFibElement=NULL) |
Definition at line 55 of file cFunctionTwoValue.h.
fib::cFunctionTwoValue::cFunctionTwoValue | ( | const cUnderFunction & | firstUnderfunction, |
const cUnderFunction & | secondUnderfunction, | ||
cUnderFunction * | pInSuperiorFunction = NULL , |
||
cFibElement * | pInDefiningFibElement = NULL |
||
) |
The constructor of the underfunction.
firstUnderfunction | the first underfunction for the function |
secondUnderfunction | the second underfunction for the function |
pInSuperiorFunction | the underfunction which contains the new underfunction |
pInDefiningFibElement | the fib -element which defines/ uses the new underfunction |
fib::cFunctionTwoValue::cFunctionTwoValue | ( | cUnderFunction * | pInFirstUnderfunction, |
cUnderFunction * | pInSecondUnderfunction, | ||
cUnderFunction * | pInSuperiorFunction = NULL , |
||
cFibElement * | pInDefiningFibElement = NULL |
||
) |
The constructor of the underfunction.
pInFirstUnderfunction | a pointer to the first underfunction for the function Beware: It won't be copied for inserting. |
pInSecondUnderfunction | a pointer to the second underfunction for the function Beware: It won't be copied for inserting. |
pInSuperiorFunction | the underfunction which contains the new underfunction |
pInDefiningFibElement | the fib -element which defines/ uses the new underfunction |
fib::cFunctionTwoValue::cFunctionTwoValue | ( | const cFunctionTwoValue & | underfunction, |
cUnderFunction * | pInSuperiorFunction = NULL , |
||
cFibElement * | pInDefiningFibElement = NULL |
||
) |
The copy constructor of the underfunction. This constructor will also copy the underfunctions of the given function.
underfunction | the underfunction which to copy |
pInSuperiorFunction | the underfunction which contains the new underfunction |
pInDefiningFibElement | the fib -element which defines/ uses the new underfunction |
fib::cFunctionTwoValue::cFunctionTwoValue | ( | const TiXmlElement * | pXmlElement, |
intFib & | outStatus, | ||
list< cFibVariable * > & | liDefinedVariables, | ||
cUnderFunction * | pInSuperiorFunction = NULL , |
||
cFibElement * | pInDefiningFibElement = NULL |
||
) |
The constructor for restoring a value underfunction from an TinyXml element.
pXmlNode | a pointer to the TinyXml node the underfunction is stored in |
outStatus | An reference to an integervalue where the errorvalue can be stored to. possible errorvalues are:
|
liDefinedVariables | a list with the defined variables for the to restore fib -element, every variable should have it's number (the number under which it is stored) as it's value |
pInSuperiorFunction | the underfunction which contains the new underfunction |
pInDefiningFibElement | the fib -element which defines/ uses the new underfunction |
fib::cFunctionTwoValue::cFunctionTwoValue | ( | cReadBits & | iBitStream, |
intFib & | outStatus, | ||
list< cFibVariable * > & | liDefinedVariables, | ||
const cDomainSingle * | pInDomainValue, | ||
const cDomainSingle * | pInDomainVariable, | ||
cUnderFunction * | pInSuperiorFunction = NULL , |
||
cFibElement * | pInDefiningFibElement = NULL |
||
) |
This constructor restores a value underfunction from the stream where it is stored in the compressed fib -format. Beware: The bits for the functiontype should be allready readed, this constructor reads yust the two underfunctions.
iBitStream | the stream where this underfunction 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:
|
liDefinedVariables | a list with the defined variables for the to restore fib -element, every variable should have it's number (the number under which it is stored) as it's value |
pInDomainValue | the domain for value underfunction |
pInDomainVariable | the domain for variables |
pInSuperiorFunction | the underfunction which contains the new underfunction |
pInDefiningFibElement | the fib -element which defines/ uses the new underfunction |
|
virtual |
The destructor of the underfunction.
|
virtual |
This Method checks if the given underfunction is equal to this underfunction.
underfunction | the underfunction to compare with this underfunction |
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
virtual |
This method evaluades the size of the Fib -object in bits in the compressed file form. The optionalpart field of point -elements will be ignored.
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf, and fib::cFunctionMod.
cUnderFunction* fib::cFunctionTwoValue::getFirstUnderFunction | ( | ) |
const cUnderFunction* fib::cFunctionTwoValue::getFirstUnderFunction | ( | ) | const |
|
virtual |
Implements fib::cUnderFunction.
cUnderFunction* fib::cFunctionTwoValue::getSecondUnderFunction | ( | ) |
const cUnderFunction* fib::cFunctionTwoValue::getSecondUnderFunction | ( | ) | const |
|
virtual |
This method evaluades a value for the time needed to evalue the underfunction. This value should not exceed lMaxTime, if the value for the time is greater than lMaxTime the evaluation will be stopt and lMaxTime returned. If lMaxTime is 0 (for infinity) the evaluation won't be stoped, this is the standard case.
lMaxTime | the maximum time for the evaluation, the returned exceed this value; the value 0 stands for infinity, so the evaluation won't be stoped |
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
virtual |
This method returns all variables used in this underfunction.
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
virtual |
This method checks if the given variable is used in this underfunction.
variable | the variable to check if it is used |
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
virtual |
This method returns if this underfunction is valid, else false. All values in the underfunction and it's underfunctions must be inside the underfunction domain. All variables must be defined over this underfunction. No underfunction should contain itselfor should be contained in one of its underfunctions (no cycles allowed).
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
virtual |
This method replace the variable variableOld with the variable variableNew in the underfunction.
variableOld | the variable to replace |
variableNew | the variable with which the variable variableOld is to replace |
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
virtual |
Sets the Fib -element which defines/ uses this underfunction. If the given pointer is the nullpointer (standardvalue), no Fib -element defines this underfunction.
definingFibElement | a pointer to the Fib -element which defines/ uses this underfunction |
bCheckDomains | getthe domains of the defining element and check the underfunctionelements with it |
Reimplemented from fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
void fib::cFunctionTwoValue::setFirstUnderFunction | ( | const cUnderFunction & | underFunction, |
bool | bDeleteOld = true |
||
) |
This methods sets the first underfunction of this function.
underFunction | the underfunction, which should be set as the first underfunction of this function; the underfunction will be copied and the copy will be inserted |
bDeleteOld | if true the old underfunction will be deleted from memory, else the old underfunction should be deleted elswher |
void fib::cFunctionTwoValue::setSecondUnderFunction | ( | const cUnderFunction & | underFunction, |
bool | bDeleteOld = true |
||
) |
This methods sets the second underfunction of this function.
underFunction | the underfunction, which should be set as the second underfunction of this function; the underfunction will be copied and the copy will be inserted |
bDeleteOld | if true the old underfunction will be deleted from memory, else the old underfunction should be deleted elswher |
|
virtual |
This method stores this underfunction in the XML -format into the given stream. Variables should have ther number as ther value.
stream | the stream where this underfunctionshould be stored to |
Implements fib::cUnderFunction.
Reimplemented in fib::cFunctionIf.
|
protected |
The first underfunction for the function.
Definition at line 62 of file cFunctionTwoValue.h.
|
protected |
The second underfunction for the function.
Definition at line 67 of file cFunctionTwoValue.h.