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
cConditionEqualInteger.h
Go to the documentation of this file.
1 /**
2  * @class cConditionEqualInteger
3  * file name: cConditionEqualInteger.h
4  * @author Betti Oesterholz
5  * @date 15.05.2011
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This class represents a condition to compare integer values.
11  * Copyright (C) @c LGPL3 2011 Betti Oesterholz
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License (LGPL) as
15  * published by the Free Software Foundation, either version 3 of the
16  * License, or any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public License
24  * along with this program. If not, see <http://www.gnu.org/licenses/>.
25  *
26  *
27  * This class represents a condition to compare integer values.
28  * It is is true if the values of the subfunctions rounded to integer
29  * values are equal.
30  *
31  */
32 /*
33 History:
34 15.05.2011 Oesterholz created
35 */
36 
37 #ifndef ___C_CONDITION_EQUAL_INTEGER_H__
38 #define ___C_CONDITION_EQUAL_INTEGER_H__
39 
40 
41 #include "version.h"
42 #include "fibDatatyps.h"
43 #include "cReadBits.h"
44 
45 #include "cConditionComparison.h"
46 
47 
48 using std::set;
49 
50 namespace fib{
51 
52 
54 
55 public:
56 
57  /**
58  * The constructor of the xor condition.
59  *
60  * @param pInFirstSubFunction a pointer to the first function, this condition
61  * contains; Beware: It (pSubFunction) won't be copied.
62  * @see pFirstSubFunction
63  * @param pInSecondSubFunction a pointer to the second function, this
64  * condition contains; Beware: It (pSubFunction) won't be copied.
65  * @see pSecondSubFunction
66  * @param pInSuperiorCondition the condition which contains the
67  * new condition
68  * @param pInDefiningFibElement the Fib-element which defines/ uses
69  * the new condition
70  */
71  cConditionEqualInteger( cUnderFunction * pInFirstSubFunction,
72  cUnderFunction * pInSecondSubFunction,
73  cCondition * pInSuperiorCondition = NULL,
74  cFibElement * pInDefiningFibElement = NULL );
75 
76  /**
77  * The constructor of the xor condition.
78  *
79  * @param inFirstSubFunction the first function, this condition contains
80  * @see pFirstSubFunction
81  * @param inSecondSubFunction the second function, this condition contains
82  * @see pSecondSubFunction
83  * @param pInSuperiorCondition the condition which contains the
84  * new condition
85  * @param pInDefiningFibElement the Fib-element which defines/ uses
86  * the new condition
87  */
88  cConditionEqualInteger( const cUnderFunction & inFirstSubFunction,
89  const cUnderFunction & inSecondSubFunction,
90  cCondition * pInSuperiorCondition = NULL,
91  cFibElement * pInDefiningFibElement = NULL );
92 
93  /**
94  * The copy constructor of the condition.
95  * This constructor will also copy the subfunctions of the given
96  * condition.
97  *
98  * @param condition the condition which to copy
99  * @param pInSuperiorCondition the condition which contains the
100  * new condition
101  * @param pInDefiningFibElement the Fib-element which defines/ uses
102  * the new condition
103  */
105  cCondition * pInSuperiorCondition = NULL,
106  cFibElement *pInDefiningFibElement = NULL );
107 
108 
109  /**
110  * The destructor of the condition.
111  */
112  virtual ~cConditionEqualInteger();
113 
114  /**
115  * Returns the value of the condition (if it is true or false).
116  *
117  * @return true if the values of the subfunctions rounded to integer
118  * values are equal
119  */
120  virtual bool getValue() const;
121 
122  /**
123  * This method duplicates this whole condition.
124  * subfunction of this condition are also cloned.
125  *
126  * @param pSuperiorCondition the condition which contains the cloned
127  * condition
128  * @param pInDefiningFibElement the Fib-element which defines/ uses
129  * the cloned condition
130  * @return the cloned/ duplicated condition
131  */
132  virtual cConditionEqualInteger * clone(
133  cCondition * pInSuperiorCondition = NULL,
134  cFibElement *pInDefiningFibElement = NULL) const;
135 
136  /**
137  * @return the type for the condition
138  */
139  virtual unsignedIntFib getType() const;
140 
141  /**
142  * @return the name for the condition
143  */
144  virtual string getConditionName() const;
145 
146 
147 
148 protected:
149 
150  /**
151  * @return the compressed type bits for this type of condition
152  */
153  virtual char getTypeBit() const;
154 
155 };//end class cConditionEqualInteger
156 
157 
158 }//end namespace Fib
159 
160 #endif //___C_CONDITION_EQUAL_INTEGER_H__