rasdaman base DBMS
mdddimensiontype.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 * MERCHANTABILITY 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 // -*-C++-*- (for Emacs)
24 
25 /*************************************************************
26  *
27  *
28  * PURPOSE:
29  * The MDDBaseType class is used as a type for MDDs where
30  * the base type and the dimensionality is specified.
31  *
32  *
33  * COMMENTS:
34  *
35  ************************************************************/
36 
37 #ifndef _MDDDIMENSIONTYPE_HH_
38 #define _MDDDIMENSIONTYPE_HH_
39 
40 #include <iostream>
41 #include "raslib/mddtypes.hh"
42 #include "catalogmgr/ops.hh"
43 #include "mddbasetype.hh"
44 
45 class OId;
46 
47 //@ManMemo: Module: {\bf relcatalogif}.
48 
49 /*@Doc:
50  The MDDBaseType class is used as a type for MDDs where
51  the base type and the dimensionality is specified.
52 */
53 
58 {
59 public:
60  virtual char* getTypeStructure() const;
61  /*@Doc:
62  */
63 
64  virtual r_Bytes getMemorySize() const;
65  /*@Doc:
66  the memory size is computed by:
67  MDDBaseType::getMemorySize() + sizeof(r_Dimension);
68  */
69 
70  MDDDimensionType(const OId& id) throw (r_Error);
71  /*@Doc:
72  */
73 
74  MDDDimensionType(const char* newTypeName, const BaseType* newBaseType, r_Dimension newDimension);
75  /*@Doc:
76  constructor.
77  */
78 
80  /*@Doc:
81  default constructor, cannot be used.
82  */
83 
85  /*@Doc:
86  copy constructor.
87  */
88 
90  /*@Doc:
91  assignment operator.
92  */
93 
94  virtual void print_status( ostream& s ) const;
95  /*@Doc:
96  writes the state of the object to the specified stream
97  */
98 
99  r_Dimension getDimension() const;
100  /*@Doc:
101  return dimensionality
102  */
103 
104  virtual ~MDDDimensionType();
105  /*@Doc:
106  virtual destructor.
107  */
108 
109  virtual int compatibleWith(const Type* aType) const;
110  /*@Doc:
111  is compatible if:
112  aType is MDDDimType or MDDDomType and
113  the basetypes are compatible
114  and dimensionality is the same
115  */
116 
117 protected:
118 
119  virtual void insertInDb() throw (r_Error);
120 
121  virtual void readFromDb() throw (r_Error);
122 
123  virtual void deleteFromDb() throw (r_Error);
124 
125  r_Dimension myDimension;
126  /*@Doc:
127  dimensionality.
128  */
129 };
130 
131 #endif
virtual void deleteFromDb()
MDDDimensionType & operator=(const MDDDimensionType &old)
virtual void print_status(ostream &s) const
virtual r_Bytes getMemorySize() const
Definition: mddbasetype.hh:57
Definition: oidif.hh:67
Definition: mdddimensiontype.hh:57
virtual char * getTypeStructure() const
returns the structure of the type as a C string.
virtual void insertInDb()
virtual ~MDDDimensionType()
virtual void readFromDb()
r_Dimension getDimension() const
Definition: basetype.hh:66
virtual int compatibleWith(const Type *aType) const
Definition: type.hh:68
r_Dimension myDimension
Definition: mdddimensiontype.hh:125