rasdaman complete source
qtjoiniterator.hh
Go to the documentation of this file.
1 #ifndef _QTJOINITERATOR_
2 #define _QTJOINITERATOR_
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 //@ManMemo: Module: {\bf qlparser}
43 
44 /*@Doc:
45 
46 An object of this class takes its inputs and computes a tupel for every element
47 of the cross product. The result is passed to the output stream.
48 The class represents the FROM part of a query.
49 
50 */
51 
52 class QtJoinIterator : public QtIterator
53 {
54 public:
57 
59  QtJoinIterator( QtNode* node );
60 
62  virtual ~QtJoinIterator();
63 
65  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
66 
68  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
69 
70  //@Man: Operations of the ONC protocol:
72  void open();
75  QtDataList* next();
82  void close();
85  void reset();
87 
88 
89  //@Man: Read/Write methods:
91  //inline virtual void setParents();
94 
96  inline virtual const QtNodeType getNodeType() const;
97 
99  virtual const QtTypeTuple& checkType();
100 
101 private:
103  bool outputStreamIsEmpty;
110  QtDataList* actualTupel;
112 
114  static const QtNodeType nodeType;
115 };
116 
117 #include "qlparser/qtjoiniterator.icc"
118 
119 #endif
120 
Definition: qtiterator.hh:50
std::vector< QtData * > QtDataList
list of QtData pointers
Definition: qtnode.hh:77
Definition: qtnode.hh:463
QtJoinIterator()
default constructor
virtual ~QtJoinIterator()
virtual destructor
QtChildType
Definition: qtnode.hh:186
QtNodeType
Definition: qtnode.hh:93
QtDataList * next()
virtual const QtTypeTuple & checkType()
type checking
Definition: qtnode.hh:73
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
Definition: qtjoiniterator.hh:52
Definition: qtnode.hh:190
virtual const QtNodeType getNodeType() const
method for identification of nodes
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression