#include <cUnderFunction.h>
List of all members.
Static Public Member Functions |
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) |
Detailed Description
Definition at line 69 of file cUnderFunction.h.
Constructor & Destructor Documentation
fib::cUnderFunction::cUnderFunction |
( |
cUnderFunction * |
pInSuperiorUnderFunction = NULL , |
|
|
cFibElement * |
pInDefiningFibElement = NULL |
|
) |
| |
|
protected |
The constructor of the underfunction.
- Parameters:
-
pInSuperiorUnderFunction | the underfunction which contains |
pInDefiningFibElement | the Fib-element which defines/ uses the new underfunction |
The copy constructor of the underfunction.
- Parameters:
-
underfunction | the underfunction which to copy |
pSuperiorUnderFunction | the underfunction which contains |
pInDefiningFibElement | the Fib-element which defines/ uses |
virtual fib::cUnderFunction::~cUnderFunction |
( |
| ) |
|
|
virtual |
The destructor of the underfunction.
Member Function Documentation
This method duplicates this whole underfunction. Underfunctions of this underfunction are also cloned.
- Parameters:
-
pSuperiorUnderFunction | the underfunction which contains the cloned underfunction |
pInDefiningFibElement | the Fib-element which defines/ uses the cloned underfunction |
- Returns:
- the cloned/ duplicated underfunction
Implemented in fib::cFunctionIf, fib::cFunctionVariable, fib::cFunctionValue, fib::cFunctionMod, fib::cFunctionArcsin, fib::cFunctionLog, fib::cFunctionRound, fib::cFunctionExp, fib::cFunctionMax, fib::cFunctionMin, fib::cFunctionAbs, fib::cFunctionSin, fib::cFunctionDiv, fib::cFunctionMult, fib::cFunctionSub, and fib::cFunctionAdd.
virtual bool fib::cUnderFunction::equal |
( |
const cUnderFunction & |
underfunction | ) |
const |
|
pure virtual |
cFibElement* fib::cUnderFunction::getDefiningFibElement |
( |
| ) |
const |
- Returns:
- the Fib-element which defines/ uses this underfunction or a Nullpointer NULL if non such Fib-element exists
Returns a reference to the domain of the underfunction or the nullpointer NULL if no domain is defined for the underfunction. If the nullpointer NULL is returned the standarddomain is valid for the underfunction.
- Returns:
- a reference to the underfunctiondomain of the underfunction
virtual cTypeElement* fib::cUnderFunction::getElementType |
( |
| ) |
const |
|
virtual |
Returns the type of the underfunction. You have to delete the returned object after usage.
- Returns:
- the type of the underfunction
virtual unsignedIntFib fib::cUnderFunction::getNumberOfUnderFunctions |
( |
| ) |
const |
|
pure virtual |
virtual cDomainSingle* fib::cUnderFunction::getStandardDomain |
( |
| ) |
const |
|
virtual |
Returns a reference to the standard domain of the underfunction. You have to delete the returned object after usage.
- Returns:
- a reference to the standard domain of the underfunction
cUnderFunction* fib::cUnderFunction::getSuperiorUnderFunction |
( |
| ) |
const |
- Returns:
- the superior underfunction to this or NULL, if non such exists (the superior underfunction is the underfunction, which contains this underfunction)
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.
- See also:
- cFibElement::evalueObject()
- Parameters:
-
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 |
- Returns:
- a value for the time needed to evalue this underfunction
Implemented in fib::cFunctionTwoValue, fib::cFunctionIf, fib::cFunctionOneValue, fib::cFunctionVariable, and fib::cFunctionValue.
- Returns:
- the type for the underfunction
Implemented in fib::cFunctionIf, fib::cFunctionVariable, fib::cFunctionValue, fib::cFunctionMod, fib::cFunctionArcsin, fib::cFunctionLog, fib::cFunctionRound, fib::cFunctionExp, fib::cFunctionMax, fib::cFunctionMin, fib::cFunctionAbs, fib::cFunctionSin, fib::cFunctionDiv, fib::cFunctionMult, fib::cFunctionSub, and fib::cFunctionAdd.
virtual string fib::cUnderFunction::getUnderFunctionName |
( |
| ) |
const |
|
pure virtual |
- Returns:
- the name for the underfunction
Implemented in fib::cFunctionIf, fib::cFunctionVariable, fib::cFunctionValue, fib::cFunctionMod, fib::cFunctionArcsin, fib::cFunctionLog, fib::cFunctionRound, fib::cFunctionExp, fib::cFunctionMax, fib::cFunctionMin, fib::cFunctionAbs, fib::cFunctionSin, fib::cFunctionDiv, fib::cFunctionMult, fib::cFunctionSub, and fib::cFunctionAdd.
virtual set<cFibVariable*> fib::cUnderFunction::getUsedVariables |
( |
| ) |
|
|
pure virtual |
virtual doubleFib fib::cUnderFunction::getValue |
( |
| ) |
const |
|
pure virtual |
Returns the value of the underfunction or 0 if non such exists.
- Returns:
- the value of the underfunction or 0 if non such exists
Implemented in fib::cFunctionIf, fib::cFunctionVariable, fib::cFunctionValue, fib::cFunctionExp, fib::cFunctionMax, fib::cFunctionMin, fib::cFunctionMod, fib::cFunctionAbs, fib::cFunctionArcsin, fib::cFunctionLog, fib::cFunctionRound, fib::cFunctionSin, fib::cFunctionDiv, fib::cFunctionMult, fib::cFunctionSub, and fib::cFunctionAdd.
virtual cDomainSingle* fib::cUnderFunction::getValueDomain |
( |
| ) |
const |
|
virtual |
Returns a reference to the value domain of the underfunction or the nullpointer NULL if no value domain is defined for the underfunction. If the nullpointer NULL is returned the standarddomain is valid for the underfunction.
- Returns:
- a reference to the definitionarea of the underfunction
virtual cDomainSingle* fib::cUnderFunction::getVariableDomain |
( |
| ) |
const |
|
virtual |
Returns a reference to the domain for variables of the underfunction. You have to delete the returned object after usage.
- Returns:
- a reference to the domain for variables of the underfunction
virtual bool fib::cUnderFunction::isUsedVariable |
( |
const cFibVariable * |
variable | ) |
const |
|
pure virtual |
virtual bool fib::cUnderFunction::isValid |
( |
| ) |
const |
|
pure 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 itself or should be contained in one of its underfunctions (no cycles allowed).
- Returns:
- true if this underfunction is valid, else false
Implemented in fib::cFunctionTwoValue, fib::cFunctionIf, fib::cFunctionOneValue, fib::cFunctionVariable, and fib::cFunctionValue.
bool fib::cUnderFunction::operator!= |
( |
const cUnderFunction & |
underfunction | ) |
const |
This method checks if the given underfunction is not equal to this underfunction.
- Parameters:
-
underfunction | the underfunction to compare with this underfunction |
- Returns:
- true if the given underfunction is not equal to this underfunction, else false
virtual bool fib::cUnderFunction::operator== |
( |
const cUnderFunction & |
underfunction | ) |
const |
|
virtual |
This method checks if the given underfunction is equal to this underfunction.
- Parameters:
-
underfunction | the underfunction to compare with this underfunction |
- Returns:
- true if the given underfunction is equal to this underfunction, else false
This method restores a underfunction from a bitstream, wher it is stored in the compressed Fib-format.
- See also:
- store
- Parameters:
-
iBitStream | the stream where the underfunction is stored in, because the stream is an cReadBits, any number of bits can be readed from it |
outStatus | 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
|
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 |
pInValueDomain | the domain for value underfunction |
pInDomainVariable | the domain for variables |
pInSuperiorFunction | the underfunction which contains the to restore underfunction |
pInDefiningFibElement | the Fib-element which defines/ uses the to restore underfunction |
- Returns:
- a pointer to the restored underfunction or NULL
This method restores a underfunction in the XML -format from an TinyXml element.
- Parameters:
-
pXmlNode | a pointer to the TinyXml node wher the underfunction is stored in |
outStatus | 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
|
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 to restore underfunction |
pInDefiningFibElement | the Fib-element which defines/ uses the to restore underfunction |
- Returns:
- the pointers to the restored underfunction, if non could be restored the returned pointer is NULL
virtual void fib::cUnderFunction::setDefiningFibElement |
( |
cFibElement * |
fibElement = NULL , |
|
|
bool |
bCheckDomains = true |
|
) |
| |
|
virtual |
Sets the Fib-element which defines/ uses this underfunction. If the given pointer is the nullpointer (standardvalue), no Fib-element defines this underfunction.
- Parameters:
-
definingFibElement | a pointer to the Fib-element which defines/ uses this underfunction |
bCheckDomains | get the domains of the defining element and check the underfunctionelements with it |
Reimplemented in fib::cFunctionTwoValue, fib::cFunctionIf, fib::cFunctionOneValue, and fib::cFunctionValue.
virtual bool fib::cUnderFunction::store |
( |
ostream & |
stream, |
|
|
char & |
cRestBits, |
|
|
unsigned char & |
uiRestBitPosition |
|
) |
| const |
|
pure 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
Implemented in fib::cFunctionIf, fib::cFunctionVariable, fib::cFunctionValue, fib::cFunctionMod, fib::cFunctionArcsin, fib::cFunctionLog, fib::cFunctionRound, fib::cFunctionExp, fib::cFunctionMax, fib::cFunctionMin, fib::cFunctionAbs, fib::cFunctionSin, fib::cFunctionDiv, fib::cFunctionMult, fib::cFunctionSub, and fib::cFunctionAdd.
virtual bool fib::cUnderFunction::storeXml |
( |
ostream & |
stream | ) |
const |
|
pure virtual |
Friends And Related Function Documentation
Member Data Documentation
the Fib-element which defines/ uses the underfunction
Definition at line 109 of file cUnderFunction.h.
the Fib-element which defines/ uses the underfunction
Definition at line 104 of file cUnderFunction.h.
The documentation for this class was generated from the following file: