rasdaman base DBMS
realtype.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 /*************************************************************
24  *
25  *
26  * PURPOSE:
27  * The RealType class is the superclass for floating point
28  * types (Float, Double) describing the type of a
29  * cell
30  *
31  *
32  * COMMENTS:
33  *
34  ************************************************************/
35 
36 #ifndef _REALTYPE_HH_
37 #define _REALTYPE_HH_
38 
39 #include "atomictype.hh"
40 
41 //@ManMemo: Module: {\bf relcatalogif}.
42 
43 /*@Doc:
44 RealType is the abstract base class for floating point
45 \Ref{BaseType} subclasses, \Ref{Float} or \Ref{Double}.
46 It provides conversions to/from long and unsigned long
47 It's subclasses must implement conversions to/from double
48 */
49 
53 class RealType : public AtomicType
54 {
55 public:
56  RealType(unsigned int newSize):
57  AtomicType(newSize) {}
58  /*@Doc:
59  constructor.
60  */
61 
62  RealType(const RealType& old):
63  AtomicType(old) {}
64  /*@Doc:
65  copy constructor.
66  */
67 
68  RealType(const OId& id) throw (r_Error):
69  AtomicType(id) {}
70  /*@Doc:
71  */
72 
73  virtual ~RealType() {}
74  /*@Doc:
75  */
76 
77  virtual r_ULong* convertToCULong(const char*, r_ULong*) const;
78  virtual char* makeFromCULong(char*, const r_ULong*) const;
79 
80  virtual r_Long* convertToCLong(const char*, r_Long*) const;
81  virtual char* makeFromCLong(char*, const r_Long*) const;
82 
83 protected:
84  RealType(const char* name, unsigned int newSize):
85  AtomicType(name, newSize) {}
86  /*@Doc:
87  */
88 };
89 
90 #include "realtype.icc"
91 
92 #endif
93 
94 
Definition: realtype.hh:53
RealType(unsigned int newSize)
Definition: realtype.hh:56
virtual char * makeFromCULong(char *, const r_ULong *) const
RealType(const char *name, unsigned int newSize)
Definition: realtype.hh:84
RealType(const OId &id)
Definition: realtype.hh:68
AtomicType(unsigned int newSize)
Definition: oidif.hh:67
virtual ~RealType()
Definition: realtype.hh:73
Definition: atomictype.hh:59
virtual char * makeFromCLong(char *, const r_Long *) const
virtual r_ULong * convertToCULong(const char *, r_ULong *) const
virtual r_Long * convertToCLong(const char *, r_Long *) const
RealType(const RealType &old)
Definition: realtype.hh:62