rasdaman complete source
qtoperationiterator.hh
Go to the documentation of this file.
1 #ifndef _QTOPERATIONITERATOR_
2 #define _QTOPERATIONITERATOR_
3 
4 #ifndef CPPSTDLIB
5 #include <ospace/string.h> // STL<ToolKit>
6 #else
7 #include <string>
8 #endif
9 
10 #include "qlparser/qtiterator.hh"
11 #include "qlparser/qtoperation.hh"
12 
13 /*
14 * This file is part of rasdaman community.
15 *
16 * Rasdaman community is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * Rasdaman community is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
28 *
29 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
30 rasdaman GmbH.
31 *
32 * For more information please see <http://www.rasdaman.org>
33 * or contact Peter Baumann via <baumann@rasdaman.com>.
34 */
35 /*************************************************************
36  *
37  *
38  * COMMENTS:
39  *
40  ************************************************************/
41 
42 
43 //@ManMemo: Module: {\bf qlparser}
44 
45 /*@Doc:
46 
47 A QtOperationIterator takes the next element of its input streams an creates
48 a tupel out of them. The operation specified through an operation tree of type
49 QtOperation is evaluated for this tupel and the result is passed to its output
50 stream. The class stands for the SELECT part of a query. The operations in the
51 SELECT clause are expressed through an operation tree which is attached to this
52 class.
53 
54 */
55 
57 {
58 public:
61 
63  QtOperationIterator( QtNode* node );
64 
66  virtual ~QtOperationIterator();
67 
69  virtual QtNodeList* getChilds( QtChildType flag );
70 
72  inline virtual void setInput( QtOperation* child, QtOperation* input);
73 
75  //virtual void preOptimize();
81  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
83 
85  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
86 
87  //@Man: Read/Write methods:
89  //inline virtual void setParents();
92  inline void setOperationTree( QtOperation* operation );
96 
97  //@Man: Operations of the ONC protocol:
99  QtDataList* next();
102 
104  inline virtual const QtNodeType getNodeType() const;
105 
107  virtual const QtTypeTuple& checkType();
108 
109 private:
111  QtOperationList* operationTreeList;
112 
114  static const QtNodeType nodeType;
115 };
116 
117 #include "qlparser/qtoperationiterator.icc"
118 
119 #endif
120 
std::list< QtNode * > QtNodeList
list of QtNode pointers
Definition: qtnode.hh:91
Definition: qtiterator.hh:50
std::vector< QtData * > QtDataList
list of QtData pointers
Definition: qtnode.hh:77
Definition: qtnode.hh:463
QtOperationIterator()
default constructor
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
QtChildType
Definition: qtnode.hh:186
QtNodeType
Definition: qtnode.hh:93
QtNode::QtOperationList * getOperationTreeList()
virtual void setInput(QtOperation *child, QtOperation *input)
method for query rewrite
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
optimizing load access
void setOperationTree(QtOperation *operation)
virtual const QtNodeType getNodeType() const
method for identification of nodes
Definition: qtoperationiterator.hh:56
Definition: qtnode.hh:73
virtual ~QtOperationIterator()
virtual destructor
virtual QtNodeList * getChilds(QtChildType flag)
return childs of the node
Definition: qtoperation.hh:57
virtual const QtTypeTuple & checkType()
type checking
std::vector< QtOperation * > QtOperationList
list of QtOperation pointers
Definition: qtnode.hh:194
Definition: qtnode.hh:190
QtDataList * next()