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