rasdaman complete source
qtbinaryinduce2.hh
Go to the documentation of this file.
1 #ifndef _QTBINARY2INDUCE_
2 #define _QTBINARY2INDUCE_
3 
4 #ifndef CPPSTDLIB
5 #include <ospace/string.h> // STL<ToolKit>
6 #else
7 #include <string>
8 #endif
9 
11 
12 #include "catalogmgr/ops.hh"
13 
14 /*
15 * This file is part of rasdaman community.
16 *
17 * Rasdaman community is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
21 *
22 * Rasdaman community is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
29 *
30 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
31 rasdaman GmbH.
32 *
33 * For more information please see <http://www.rasdaman.org>
34 * or contact Peter Baumann via <baumann@rasdaman.com>.
35 */
36 /*************************************************************
37  *
38  *
39  * COMMENTS:
40  *
41  ************************************************************/
42 
43 
44 
45 //@ManMemo: Module: {\bf qlparser}
46 
47 /*@Doc:
48 
49 */
50 
51 class QtIs : public QtBinaryInduce
52 {
53 public:
56 
58  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
59 
61  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
62 
64  inline virtual const QtNodeType getNodeType() const;
65 
66 private:
68  static const QtNodeType nodeType;
69 };
70 
71 
72 //@ManMemo: Module: {\bf qlparser}
73 
74 /*@Doc:
75 
76 */
77 
78 class QtAnd : public QtBinaryInduce
79 {
80 public:
83 
85  QtData* evaluate( QtDataList* inputList );
86 
88  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
89 
91  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
92 
94  inline virtual const QtNodeType getNodeType() const;
95 
96 private:
98  static const QtNodeType nodeType;
99 };
100 
101 
102 //@ManMemo: Module: {\bf qlparser}
103 
104 /*@Doc:
105 
106 */
107 
108 class QtOr : public QtBinaryInduce
109 {
110 public:
113 
115  QtData* evaluate( QtDataList* inputList );
116 
118  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
119 
121  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
122 
124  inline virtual const QtNodeType getNodeType() const;
125 
126 private:
128  static const QtNodeType nodeType;
129 };
130 
131 
132 //@ManMemo: Module: {\bf qlparser}
133 
134 /*@Doc:
135 
136 */
137 
138 class QtXor : public QtBinaryInduce
139 {
140 public:
143 
145  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
146 
148  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
149 
151  inline virtual const QtNodeType getNodeType() const;
152 
153 private:
155  static const QtNodeType nodeType;
156 };
157 
158 
159 //@ManMemo: Module: {\bf qlparser}
160 
161 /*@Doc:
162 
163 */
164 
165 class QtEqual : public QtBinaryInduce
166 {
167 public:
170 
172  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
173 
175  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
176 
178  inline virtual const QtNodeType getNodeType() const;
179 
180 private:
182  static const QtNodeType nodeType;
183 };
184 
185 
186 //@ManMemo: Module: {\bf qlparser}
187 
188 /*@Doc:
189 
190 */
191 
192 class QtLess : public QtBinaryInduce
193 {
194 public:
197 
199  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
200 
202  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
203 
205  inline virtual const QtNodeType getNodeType() const;
206 
208  virtual bool isCommutative() const;
209 
210 private:
212  static const QtNodeType nodeType;
213 };
214 
215 
216 //@ManMemo: Module: {\bf qlparser}
217 
218 /*@Doc:
219 
220 */
221 
223 {
224 public:
227 
229  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
230 
232  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
233 
235  inline virtual const QtNodeType getNodeType() const;
236 
238  virtual bool isCommutative() const;
239 
240 private:
242  static const QtNodeType nodeType;
243 };
244 
245 
246 //@ManMemo: Module: {\bf qlparser}
247 
248 /*@Doc:
249 
250 */
251 
253 {
254 public:
257 
259  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
260 
262  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
263 
265  inline virtual const QtNodeType getNodeType() const;
266 
267 private:
269  static const QtNodeType nodeType;
270 };
271 
272 //@ManMemo: Module: {\bf qlparser}
273 
274 /*@Doc:
275 
276 */
277 
278 class QtOverlay : public QtBinaryInduce
279 {
280 public:
283 
285  bool isCommutative() const;
286 
288  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
289 
291  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
292 
294  inline virtual const QtNodeType getNodeType() const;
295 
296 private:
298  static const QtNodeType nodeType;
299 };
300 
301 
302 class QtBit : public QtBinaryInduce
303 {
304 public:
307 
309  bool isCommutative() const;
310 
312  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
313 
315  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
316 
318  inline virtual const QtNodeType getNodeType() const;
319 
321  const QtTypeElement& checkType( QtTypeTuple* typeTuple );
322 
323 private:
325  static const QtNodeType nodeType;
326 };
327 
328 
329 #include "qlparser/qtbinaryinduce2.icc"
330 
331 #endif
332 
virtual const QtNodeType getNodeType() const
method for identification of nodes
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
Definition: qtbinaryinduce2.hh:192
virtual const QtNodeType getNodeType() const
method for identification of nodes
std::vector< QtData * > QtDataList
list of QtData pointers
Definition: qtnode.hh:77
QtLessEqual(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual const QtNodeType getNodeType() const
method for identification of nodes
Definition: qtnode.hh:463
Definition: qtbinaryinduce2.hh:165
Definition: qtbinaryinduce2.hh:51
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
Definition: qtdata.hh:83
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
Definition: qtbinaryinduce2.hh:278
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
virtual const QtNodeType getNodeType() const
method for identification of nodes
QtChildType
Definition: qtnode.hh:186
Definition: qtbinaryinduce2.hh:302
QtNodeType
Definition: qtnode.hh:93
QtOperation * input2
second operation operand
Definition: qtbinaryoperation.hh:140
Definition: qtnode.hh:394
QtLess(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual const QtNodeType getNodeType() const
method for identification of nodes
const QtTypeElement & checkType(QtTypeTuple *typeTuple)
checkType
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
QtIs(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
virtual const QtNodeType getNodeType() const
method for identification of nodes
QtOverlay(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
Definition: qtbinaryinduce2.hh:138
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
Definition: qtbinaryinduce2.hh:78
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
bool isCommutative() const
check commutativity
bool isCommutative() const
check commutativity
QtEqual(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual bool isCommutative() const
returns false saying that the operation IS NOT commutative
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
QtXor(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual bool isCommutative() const
returns false saying that the operation IS NOT commutative
Definition: qtbinaryinduce2.hh:222
QtNotEqual(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
Definition: qtbinaryinduce.hh:55
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
QtOperation * input1
first operation operand
Definition: qtbinaryoperation.hh:138
virtual const QtNodeType getNodeType() const
method for identification of nodes
virtual const QtNodeType getNodeType() const
method for identification of nodes
QtData * evaluate(QtDataList *inputList)
method for evaluating the node
Definition: qtbinaryinduce2.hh:252
virtual const QtNodeType getNodeType() const
method for identification of nodes
Definition: qtoperation.hh:57
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
QtOr(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
Definition: qtnode.hh:190
QtBit(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
QtData * evaluate(QtDataList *inputList)
method for evaluating the node
virtual const QtNodeType getNodeType() const
method for identification of nodes
Definition: qtbinaryinduce2.hh:108
QtAnd(QtOperation *input1, QtOperation *input2)
constructor getting the two operands
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree