rasdaman complete source
qtmdd.hh
Go to the documentation of this file.
1 #ifndef _QTMDD_
2 #define _QTMDD_
3 
4 #include "qlparser/qtdata.hh"
7 #include "raslib/minterval.hh"
8 
9 #include <string>
10 #include <list>
11 
12 // forward declarations
13 class MDDObj;
14 class QtOperation;
15 
16 /*
17 * This file is part of rasdaman community.
18 *
19 * Rasdaman community is free software: you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation, either version 3 of the License, or
22 * (at your option) any later version.
23 *
24 * Rasdaman community is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 *
29 * You should have received a copy of the GNU General Public License
30 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
31 *
32 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
33 rasdaman GmbH.
34 *
35 * For more information please see <http://www.rasdaman.org>
36 * or contact Peter Baumann via <baumann@rasdaman.com>.
37 */
38 /*************************************************************
39  *
40  *
41  * COMMENTS:
42  *
43  ************************************************************/
44 
45 //@ManMemo: Module: {\bf qlparser}
46 
47 /*@Doc:
48 
49  The class encapsulates a pointer to an object of type {\tt MDDObj}.
50  Its purpose is to have the {\tt MDDObj} object available as a descendant
51  of class {\tt QtData}. The class does not care of the memory management
52  of the {\tt MDDObj} object.
53 
54  Note: The attribute lifetime of the superclass QtData ist set implicit
55  in the constructor functions!
56 */
57 
58 class QtMDD : public QtData
59 {
60 public:
61  // list of lists of \Ref{QtScalarData} objects
62  // typedef list< list<QtScalarData*>* > QtDimensionList;
63 
65  QtMDD( MDDObj* ptr );
66 
68  QtMDD( MDDObj* ptr, std::string name );
69 
71  QtMDD( QtOperation* mintervalOp, std::list<QtScalarData*>* literalList );
76  QtMDD( int constantNo );
78 
80  QtMDD( const QtMDD& obj );
81 
83  virtual ~QtMDD();
84 
85  //@Man: Read/Write methods:
87  inline MDDObj* getMDDObject() const;
91  inline void setMDDObject( MDDObj* ptr );
93  inline const r_Minterval& getLoadDomain() const;
95  inline void setLoadDomain( r_Minterval& newLoadDomain );
97  inline const bool isFromConversion() const;
99  inline void setFromConversion( bool newFromConversion );
100 
102  virtual char* getTypeStructure() const;
106 
109 
111  BaseType* getCellType() const;
112 
114  unsigned long getCellSize() const;
115 
117  virtual QtDataType getDataType() const;
118 
120  virtual bool equal( const QtData* obj ) const;
121 
123  virtual std::string getSpelling() const;
124 
126  virtual void printStatus( std::ostream& stream = std::cout ) const;
127 
128 private:
130  QtMDD() {};
131 
133  MDDObj* mddObject;
134 
136  bool fromConversion;
137 
139  r_Minterval loadDomain;
140 };
141 
142 #include "qlparser/qtmdd.icc"
143 
144 #endif
145 
virtual void printStatus(std::ostream &stream=std::cout) const
print status of the object to the specified stream
MDDObj * getMDDObject() const
gets the pointer to the MDDObj object
Definition: qtdata.hh:83
virtual std::string getSpelling() const
returns content dependent string representation
void setLoadDomain(r_Minterval &newLoadDomain)
write method for loadDomain
void setFromConversion(bool newFromConversion)
set whether the MDD data is result from a conversion function
virtual char * getTypeStructure() const
returns a null-terminated string describing the type structure
BaseType * getCellType() const
const bool isFromConversion() const
is the MDD data result from a conversion function
virtual QtDataType getDataType() const
returns { QT_MDD}
virtual ~QtMDD()
destructor
virtual bool equal(const QtData *obj) const
compares data content
Definition: relcatalogif/basetype.hh:66
void setMDDObject(MDDObj *ptr)
sets the pointer to the MDDObj object and it does not care about the old pointer
QtDataType
Definition: qtdata.hh:48
unsigned long getCellSize() const
returns size of one cell in bytes
Definition: qtoperation.hh:57
Definition: mddobj.hh:66
Definition: qtmdd.hh:58
const r_Minterval & getLoadDomain() const
read method for loadDomain
Definition: minterval.hh:249