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

#include <cConditionTwoValue.h>

Inheritance diagram for fib::cConditionTwoValue:
Collaboration diagram for fib::cConditionTwoValue:

List of all members.

Public Member Functions

 cConditionTwoValue (cCondition *pInFirstSubCondition, cCondition *pInSecondSubCondition, cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)
 cConditionTwoValue (const cCondition &inFirstSubCondition, const cCondition &inSecondSubCondition, cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)
 cConditionTwoValue (const cConditionTwoValue &condition, cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)
virtual ~cConditionTwoValue ()
virtual bool isValid () const
virtual bool isUsedVariable (const cFibVariable *variable) const
virtual set< cFibVariable * > getUsedVariables ()
virtual bool replaceVariable (cFibVariable *variableOld, cFibVariable *variableNew)
virtual unsignedIntFib getNumberOfConditions () const
virtual unsignedIntFib getNumberOfUnderFunctions () const
virtual void setDefiningFibElement (cFibElement *pDefiningFibElement=NULL, bool bCheckDomains=true)
virtual unsignedLongFib getTimeNeed (unsignedLongFib lMaxTime=0) const
virtual unsignedLongFib getCompressedSize () const
virtual bool store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const
virtual bool storeXml (ostream &stream) const
virtual bool equal (const cCondition &condition) const
cConditiongetFirstSubCondition ()
const cConditiongetFirstSubCondition () const
bool setFirstSubCondition (cCondition *pInSubCondition, bool bDeleteOld=true)
bool setFirstSubCondition (const cCondition &pInSubCondition, bool bDeleteOld=true)
cConditiongetSecondSubCondition ()
const cConditiongetSecondSubCondition () const
bool setSecondSubCondition (cCondition *pInSubCondition, bool bDeleteOld=true)
bool setSecondSubCondition (const cCondition &pInSubCondition, bool bDeleteOld=true)
- Public Member Functions inherited from fib::cCondition
virtual ~cCondition ()
virtual bool getValue () const =0
cFibElementgetDefiningFibElement () const
cConditiongetSuperiorCondition () const
virtual unsignedIntFib getType () const =0
virtual string getConditionName () const =0
virtual bool operator== (const cCondition &condition) const
bool operator!= (const cCondition &condition) const
virtual cConditionclone (cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL) const =0

Protected Member Functions

virtual char getTypeBit () const =0
- Protected Member Functions inherited from fib::cCondition
 cCondition (cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)
 cCondition (const cCondition &condition, cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)

Protected Attributes

cConditionpFirstSubCondition
cConditionpSecondSubCondition
- Protected Attributes inherited from fib::cCondition
cConditionpSuperiorCondition
cFibElementpDefiningFibElement

Additional Inherited Members

- Static Public Member Functions inherited from fib::cCondition
static cConditionrestoreXml (const TiXmlElement *pXmlElement, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)
static cConditionrestore (cReadBits &iBitStream, intFib &outStatus, list< cFibVariable * > &liDefinedVariables, const cDomainSingle *pInValueDomain, const cDomainSingle *pInDomainVariable, cCondition *pInSuperiorCondition=NULL, cFibElement *pInDefiningFibElement=NULL)
- Static Public Attributes inherited from fib::cCondition
static const unsignedIntFib CONDITION_FALSE = 0
static const unsignedIntFib CONDITION_TRUE = 1
static const unsignedIntFib CONDITION_NOT = 10
static const unsignedIntFib CONDITION_OR = 20
static const unsignedIntFib CONDITION_AND = 21
static const unsignedIntFib CONDITION_XOR = 23
static const unsignedIntFib CONDITION_EQUAL_INTEGER = 25
static const unsignedIntFib CONDITION_LOWER = 26
static const unsignedIntFib CONDITION_GREATER = 27

Detailed Description

Definition at line 52 of file cConditionTwoValue.h.


Constructor & Destructor Documentation

fib::cConditionTwoValue::cConditionTwoValue ( cCondition pInFirstSubCondition,
cCondition pInSecondSubCondition,
cCondition pInSuperiorCondition = NULL,
cFibElement pInDefiningFibElement = NULL 
)

The constructor of the two value condition.

Parameters:
pInFirstSubConditiona pointer to the first condition, this condition contains; Beware: It (pSubCondition) won't be copied.
See also:
pFirstSubCondition
Parameters:
pInSecondSubConditiona pointer to the second condition, this condition contains; Beware: It (pSubCondition) won't be copied.
See also:
pSecondSubCondition
Parameters:
pInSuperiorConditionthe condition which contains the new condition
pInDefiningFibElementthe Fib-element which defines/ uses the new condition
fib::cConditionTwoValue::cConditionTwoValue ( const cCondition inFirstSubCondition,
const cCondition inSecondSubCondition,
cCondition pInSuperiorCondition = NULL,
cFibElement pInDefiningFibElement = NULL 
)

The constructor of the two value condition.

Parameters:
inFirstSubConditionthe first condition, this condition contains
See also:
pFirstSubCondition
Parameters:
inSecondSubConditionthe second condition, this condition contains
See also:
pSecondSubCondition
Parameters:
pInSuperiorConditionthe condition which contains the new condition
pInDefiningFibElementthe Fib-element which defines/ uses the new condition
fib::cConditionTwoValue::cConditionTwoValue ( const cConditionTwoValue condition,
cCondition pInSuperiorCondition = NULL,
cFibElement pInDefiningFibElement = NULL 
)

The copy constructor of the condition. This constructor will also copy the subconditions of the given condition.

Parameters:
conditionthe condition which to copy
pInSuperiorConditionthe condition which contains the new condition
pInDefiningFibElementthe Fib-element which defines/ uses the new condition
virtual fib::cConditionTwoValue::~cConditionTwoValue ( )
virtual

The destructor of the condition.


Member Function Documentation

virtual bool fib::cConditionTwoValue::equal ( const cCondition condition) const
virtual

This Method checks if the given condition is equal to this condition.

Parameters:
conditionthe condition to compare with this condition
Returns:
true if the given condition is equal to this condition, else false

Implements fib::cCondition.

virtual unsignedLongFib fib::cConditionTwoValue::getCompressedSize ( ) const
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.

See also:
store()
Returns:
the size of the Fib-object in bits in the compressed form

Implements fib::cCondition.

cCondition* fib::cConditionTwoValue::getFirstSubCondition ( )
See also:
pFirstSubCondition
setFirstSubCondition()
Returns:
a pointer to the first condition this condition contains (
See also:
pSubCondition)
const cCondition* fib::cConditionTwoValue::getFirstSubCondition ( ) const
See also:
pFirstSubCondition
setFirstSubCondition()
Returns:
a pointer to the first condition this condition contains (
See also:
pSubCondition)
virtual unsignedIntFib fib::cConditionTwoValue::getNumberOfConditions ( ) const
virtual
Returns:
the number of conditions, a condition of this type has

Implements fib::cCondition.

virtual unsignedIntFib fib::cConditionTwoValue::getNumberOfUnderFunctions ( ) const
virtual
Returns:
the number of underfunctions, a condition of this type has

Implements fib::cCondition.

cCondition* fib::cConditionTwoValue::getSecondSubCondition ( )
See also:
pSecondSubCondition
setSecondSubCondition()
Returns:
a pointer to the second condition this condition contains (
See also:
pSubCondition)
const cCondition* fib::cConditionTwoValue::getSecondSubCondition ( ) const
See also:
pSecondSubCondition
setSecondSubCondition()
Returns:
a pointer to the second condition this condition contains (
See also:
pSubCondition)
virtual unsignedLongFib fib::cConditionTwoValue::getTimeNeed ( unsignedLongFib  lMaxTime = 0) const
virtual

This method evaluades a value for the time needed to evalue the condition. 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:
lMaxTimethe 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 condition

Implements fib::cCondition.

virtual char fib::cConditionTwoValue::getTypeBit ( ) const
protectedpure virtual
Returns:
the compressed type bits for this type of condition

Implemented in fib::cConditionAnd, fib::cConditionOr, and fib::cConditionXor.

virtual set<cFibVariable*> fib::cConditionTwoValue::getUsedVariables ( )
virtual

This method returns all variables used in this condition.

See also:
cFibVariable
Returns:
all variables used in this condition

Implements fib::cCondition.

virtual bool fib::cConditionTwoValue::isUsedVariable ( const cFibVariable variable) const
virtual

This method checks if the given variable is used in this condition.

See also:
cFibVariable
Parameters:
variablethe variable to check if it is used
Returns:
true if the variable is used, else false

Implements fib::cCondition.

virtual bool fib::cConditionTwoValue::isValid ( ) const
virtual

This method returns if this condition is valid, else false. All subcondition and underfunctions must be valid. No condition should contain itself or should be contained in one of its condition (no cycles allowed).

Returns:
true if this condition is valid, else false

Implements fib::cCondition.

virtual bool fib::cConditionTwoValue::replaceVariable ( cFibVariable variableOld,
cFibVariable variableNew 
)
virtual

This method replace the variable variableOld with the variable variableNew in the condition.

See also:
cFibVariable
isVariable()
isUsedVariable()
Parameters:
variableOldthe variable to replace
variableNewthe variable with which the variable variableOld is to replace
Returns:
true if the variable variableOld is replaced with variableNew, else false

Implements fib::cCondition.

virtual void fib::cConditionTwoValue::setDefiningFibElement ( cFibElement pDefiningFibElement = NULL,
bool  bCheckDomains = true 
)
virtual

Sets the Fib-element which defines/ uses this condition. If the given pointer is the nullpointer (standardvalue), no Fib-element defines this condition.

Parameters:
pDefiningFibElementa pointer to the Fib-element which defines/ uses this condition
bCheckDomainsget the domains of the defining element and check the underfunctionelements with it

Reimplemented from fib::cCondition.

bool fib::cConditionTwoValue::setFirstSubCondition ( cCondition pInSubCondition,
bool  bDeleteOld = true 
)

This method sets the contained first condition (

See also:
pSubCondition) to the given condition pInSubCondition. Beware: It (pInSubCondition) won't be copied.
pFirstSubCondition
getFirstSubCondition()
Parameters:
pInSubConditiona pointer to the subcondition to set
bDeleteOldif true, delete the old subcondition from the memory
Returns:
true if pInSubCondition condition was set, else false
bool fib::cConditionTwoValue::setFirstSubCondition ( const cCondition pInSubCondition,
bool  bDeleteOld = true 
)

This method sets the contained first condition (

See also:
pSubCondition) to the given condition pInSubCondition.
pFirstSubCondition
getFirstSubCondition()
Parameters:
pInSubConditionthe subcondition to set
bDeleteOldif true, delete the old subcondition from the memory
Returns:
true if pInSubCondition condition was set, else false
bool fib::cConditionTwoValue::setSecondSubCondition ( cCondition pInSubCondition,
bool  bDeleteOld = true 
)

This method sets the contained second condition (

See also:
pSubCondition) to the given condition pInSubCondition. Beware: It (pInSubCondition) won't be copied.
pSecondSubCondition
getSecondSubCondition()
Parameters:
pInSubConditiona pointer to the subcondition to set
bDeleteOldif true, delete the old subcondition from the memory
Returns:
true if pInSubCondition condition was set, else false
bool fib::cConditionTwoValue::setSecondSubCondition ( const cCondition pInSubCondition,
bool  bDeleteOld = true 
)

This method sets the contained second condition (

See also:
pSubCondition) to the given condition pInSubCondition.
pSecondSubCondition
getSecondSubCondition()
Parameters:
pInSubConditionthe subcondition to set
bDeleteOldif true, delete the old subcondition from the memory
Returns:
true if pInSubCondition condition was set, else false
virtual bool fib::cConditionTwoValue::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:
streamthe stream where this Fib-object 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 this Fib-object is stored, else false

Implements fib::cCondition.

virtual bool fib::cConditionTwoValue::storeXml ( ostream &  stream) const
virtual

This method stores this condition in the XML-format into the given stream. Variables should have ther number as ther value.

Parameters:
streamthe stream where this conditionshould be stored to
Returns:
true if this condition is stored, else false

Implements fib::cCondition.


Member Data Documentation

cCondition* fib::cConditionTwoValue::pFirstSubCondition
protected

The first condition this condition contains.

Definition at line 57 of file cConditionTwoValue.h.

cCondition* fib::cConditionTwoValue::pSecondSubCondition
protected

The second condition this condition contains.

Definition at line 62 of file cConditionTwoValue.h.


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