rasdaman complete source
qtupdate.hh
Go to the documentation of this file.
1 #ifndef __QTUPDATE_HH__
2 #define __QTUPDATE_HH___
3 
4 #include "qlparser/qtexecute.hh"
7 
8 #include <iostream>
9 
10 /*
11 * This file is part of rasdaman community.
12 *
13 * Rasdaman community is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * Rasdaman community 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 General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
25 *
26 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
27 rasdaman GmbH.
28 *
29 * For more information please see <http://www.rasdaman.org>
30 * or contact Peter Baumann via <baumann@rasdaman.com>.
31 */
32 /*************************************************************
33  *
34  *
35  * COMMENTS:
36  *
37  ************************************************************/
38 
39 //@ManMemo: Module: {\bf qlparser}
40 
41 /*@Doc:
42 
43 */
44 
45 class QtUpdate : public QtExecute
46 {
47 public:
49  QtUpdate( QtOperation* initUpdateTarget, QtOperation* initUpdateDomain, QtOperation* initUpdateSource );
50 
52  virtual ~QtUpdate();
53 
55  virtual int evaluate();
56 
58  virtual QtNodeList* getChilds( QtChildType flag );
59 
61  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
62 
64  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
65 
66  //@Man: Read/Write methods:
68  void setStreamInput( QtONCStream* newInput );
81 
83  inline virtual const QtNodeType getNodeType() const;
84 
86  inline virtual void setInput( QtOperation* child, QtOperation* input);
87 
89  //virtual void preOptimize();
94  virtual void checkType();
96 
97 private:
99  QtONCStream* input;
100 
102  QtOperation* updateTarget;
103 
105  QtOperation* updateDomain;
106 
108  QtOperation* updateSource;
109 
111  static const QtNodeType nodeType;
112 };
113 
114 #include "qlparser/qtupdate.icc"
115 
116 #endif
117 
118 
119 
std::list< QtNode * > QtNodeList
list of QtNode pointers
Definition: qtnode.hh:91
virtual const QtNodeType getNodeType() const
method for identification of nodes
QtONCStream * getInput()
returns input
QtChildType
Definition: qtnode.hh:186
QtNodeType
Definition: qtnode.hh:93
void setStreamInput(QtONCStream *newInput)
QtUpdate(QtOperation *initUpdateTarget, QtOperation *initUpdateDomain, QtOperation *initUpdateSource)
constructor getting target, domain, and source expressions of the update
QtOperation * getUpdateTarget()
returns updateTarget
virtual QtNodeList * getChilds(QtChildType flag)
return childs of the node
Definition: qtoncstream.hh:54
virtual void setInput(QtOperation *child, QtOperation *input)
method for query rewrite
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual ~QtUpdate()
virtual destructor
Definition: qtupdate.hh:45
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
Definition: qtoperation.hh:57
virtual void checkType()
pre optimization
virtual int evaluate()
method for evaluating the node
QtOperation * getUpdateDomain()
returns updateDomain
Definition: qtexecute.hh:41
Definition: qtnode.hh:190
QtOperation * getUpdateSource()
returns updateSource