rasdaman complete source
doubletype.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 DoubleType class is the superclass for all classes
30  * describing the type of a cell
31  *
32  *
33  * COMMENTS:
34  *
35  ************************************************************/
36 
37 #ifndef _DOUBLETYPE_HH_
38 #define _DOUBLETYPE_HH_
39 
40 #include <iostream>
41 #include "realtype.hh"
42 #include "catalogmgr/ops.hh"
43 
44 class OId;
45 
46 //@ManMemo: Module: {\bf relcatalogif}.
47 
48 /*@Doc:
49 DoubleType is the base type used for 32bit integer cell
50 values. The value of a Double is stored in four chars.
51 */
52 
56 class DoubleType : public RealType
57 {
58 public:
59  DoubleType();
60  /*@Doc:
61  default constructor, sets type name to "Double".
62  */
63 
64  DoubleType(const OId& id) throw (r_Error);
65  /*@Doc:
66  */
67 
68  DoubleType(const DoubleType& old);
69  /*@Doc:
70  copy constructor.
71  */
72 
73  DoubleType& operator=(const DoubleType& old);
74  /*@Doc:
75  assignment operator.
76  */
77 
78  virtual ~DoubleType();
79  /*@Doc:
80  virtual destructor.
81  */
82 
83  virtual void printCell(ostream& stream, const char* cell) const;
84  /*@Doc:
85  */
86 
87  virtual double* convertToCDouble(const char* cell, double* value) const;
88  /*@Doc:
89  */
90 
91  virtual char* makeFromCDouble(char* cell, const double* value) const;
92  /*@Doc:
93  */
94 
95  static const char* Name;
96 
97 protected:
98 
99  virtual void readFromDb() throw (r_Error);
100  /*@Doc:
101  initializes the attributes of this type.
102  there is no database activity. this is hard coded.
103  */
104 };
105 
106 #endif
virtual char * makeFromCDouble(char *cell, const double *value) const
Definition: realtype.hh:53
virtual void printCell(ostream &stream, const char *cell) const
Definition: error.hh:88
virtual ~DoubleType()
Definition: oidif.hh:67
virtual double * convertToCDouble(const char *cell, double *value) const
virtual void readFromDb()
DoubleType & operator=(const DoubleType &old)
static const char * Name
Definition: doubletype.hh:95
Definition: doubletype.hh:56