rasdaman complete source
qtdomainoperation.hh
Go to the documentation of this file.
1 #ifndef _QTDOMAINOPERATION_
2 #define _QTDOMAINOPERATION_
3 
4 #ifndef CPPSTDLIB
5 #include <ospace/string.h> // STL<ToolKit>
6 #else
7 #include <string>
8 #endif
9 
12 #include "raslib/sinterval.hh"
13 #include "raslib/minterval.hh"
14 
15 /*
16 * This file is part of rasdaman community.
17 *
18 * Rasdaman community is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation, either version 3 of the License, or
21 * (at your option) any later version.
22 *
23 * Rasdaman community is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
30 *
31 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
32 rasdaman GmbH.
33 *
34 * For more information please see <http://www.rasdaman.org>
35 * or contact Peter Baumann via <baumann@rasdaman.com>.
36 */
37 /*************************************************************
38  *
39  *
40  * COMMENTS:
41  *
42  ************************************************************/
43 
44 
45 //@ManMemo: Module: {\bf qlparser}
46 
47 /*@Doc:
48 
49 The class represents a spatial domain operation, e.g. trimming or projections.
50 
51 */
52 
54 {
55 public:
56 
58  QtDomainOperation( QtOperation* mintOp );
59 
61  QtDomainOperation( r_Minterval domainNew, const vector<bool>* newTrimFlags );
62 
64  virtual ~QtDomainOperation();
65 
67  virtual QtNodeList* getChilds( QtChildType flag );
68 
70  virtual bool equalMeaning( QtNode* node );
71 
73  virtual std::string getSpelling();
74 
76  virtual void setInput( QtOperation* inputOld, QtOperation* inputNew );
77 
79  void optimizeLoad( QtTrimList* trimList );
80 
82  QtData* evaluate( QtDataList* inputList );
83 
85  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
86 
88  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
89 
90  //@Man: Read/Write methods:
92 
95  inline virtual void setInput( QtOperation* newInput );
97  inline virtual void setMintervalOp(QtOperation* miop);
99  inline QtOperation* getMintervalOp();
100 
102 
103 
105  inline virtual const QtNodeType getNodeType() const;
106 
108  virtual const QtTypeElement& checkType( QtTypeTuple* typeTuple = NULL );
109 
110 private:
112  QtOperation* mintervalOp;
113 
115  bool dynamicMintervalExpression;
116 
118  static const QtNodeType nodeType;
119 };
120 
121 #include "qlparser/qtdomainoperation.icc"
122 
123 #endif
124 
QtData * evaluate(QtDataList *inputList)
evaluates the node
std::list< QtNode * > QtNodeList
list of QtNode pointers
Definition: qtnode.hh:91
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
std::vector< QtData * > QtDataList
list of QtData pointers
Definition: qtnode.hh:77
std::vector< QtTrimElement * > QtTrimList
list of QtTrimData structures
Definition: qtnode.hh:88
Definition: qtnode.hh:463
Definition: qtdata.hh:83
QtChildType
Definition: qtnode.hh:186
void optimizeLoad(QtTrimList *trimList)
optimizing load access
QtNodeType
Definition: qtnode.hh:93
Definition: qtnode.hh:394
virtual ~QtDomainOperation()
destructor
Definition: qtdomainoperation.hh:53
QtOperation * getMintervalOp()
virtual bool equalMeaning(QtNode *node)
test if the two nodes have an equal meaning in a subtree
virtual std::string getSpelling()
creates a unique name for a common subexpression
virtual void setInput(QtOperation *inputOld, QtOperation *inputNew)
method for query rewrite
Definition: qtunaryoperation.hh:52
virtual QtNodeList * getChilds(QtChildType flag)
return childs of the node
virtual const QtTypeElement & checkType(QtTypeTuple *typeTuple=NULL)
type checking of the subtree
Definition: qtnode.hh:73
virtual void setMintervalOp(QtOperation *miop)
virtual const QtNodeType getNodeType() const
method for identification of nodes
QtDomainOperation(QtOperation *mintOp)
constructor getting an minterval expression
Definition: qtoperation.hh:57
Definition: qtnode.hh:190
Definition: minterval.hh:249
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression