rasdaman complete source
qtconcat.hh
Go to the documentation of this file.
1 /*
2  * This file is part of rasdaman community.
3  *
4  * Rasdaman community is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Rasdaman community is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTrABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16  *
17  * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19  *
20  * For more information please see <http://www.rasdaman.org>
21  * or contact Peter Baumann via <baumann@rasdaman.com>.
22  */
23 
24 #ifndef _QTCONCAT__
25 #define _QTCONCAT__
26 
27 #ifndef CPPSTDLIB
28 #include <ospace/string.h> // STL<ToolKit>
29 #else
30 #include <string>
31 #endif
32 
35 
36 class QtConcat : public QtNaryOperation
37 {
38 public:
40  QtConcat( QtOperationList* opList, unsigned int dim );
41 
43  virtual bool equalMeaning( QtNode* node );
44 
46  virtual std::string getSpelling();
47 
49  virtual void simplify();
50 
52  QtData* evaluate( QtDataList* inputList );
56  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
58 
60  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
61 
63  inline virtual const QtNodeType getNodeType() const;
64 
66  virtual const QtTypeElement& checkType( QtTypeTuple* typeTuple = NULL );
67 
69  virtual QtAreaType getAreaType();
70 
72  inline unsigned int getDimension();
73 
75  const BaseType* getResultType(const BaseType* op1, const BaseType* op2);
76 
78  int isSignedType( const BaseType* type );
79 
80 private:
82  static const QtNodeType nodeType;
83 
85  unsigned int dimension;
86 };
87 
88 #include "qlparser/qtconcat.icc"
89 
90 #endif
91 
92 
93 
virtual void simplify()
simplifies the tree
std::vector< QtData * > QtDataList
list of QtData pointers
Definition: qtnode.hh:77
virtual bool equalMeaning(QtNode *node)
test if the two nodes have an equal meaning in a subtree
QtAreaType
Definition: qtnode.hh:180
Definition: qtnode.hh:463
virtual QtAreaType getAreaType()
test if the edge to the parent node is of type mdd or atomic
Definition: qtconcat.hh:36
unsigned int getDimension()
getter for the dimension along which the concatenation is performed
QtData * evaluate(QtDataList *inputList)
method for evaluating the node
Definition: qtdata.hh:83
int isSignedType(const BaseType *type)
checks whether a type is signed or not (for type coercion)
QtChildType
Definition: qtnode.hh:186
QtNodeType
Definition: qtnode.hh:93
Definition: qtnode.hh:394
const BaseType * getResultType(const BaseType *op1, const BaseType *op2)
type coercion
Definition: qtnaryoperation.hh:52
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 const QtTypeElement & checkType(QtTypeTuple *typeTuple=NULL)
type checking of the subtree
Definition: qtnode.hh:73
Definition: relcatalogif/basetype.hh:66
virtual std::string getSpelling()
creates a unique name for a common subexpression
virtual const QtNodeType getNodeType() const
method for identification of nodes
QtConcat(QtOperationList *opList, unsigned int dim)
constructor getting operand list and dimension
std::vector< QtOperation * > QtOperationList
list of QtOperation pointers
Definition: qtnode.hh:194
Definition: qtnode.hh:190