rasdaman complete source
integraltype.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 IntegralType class is the superclass for all signed integral
28  * types (e.g. Char, Long) describing the type of a
29  * cell
30  *
31  *
32  * COMMENTS:
33  *
34  ************************************************************/
35 
36 #ifndef _INTEGRALTYPE_HH_
37 #define _INTEGRALTYPE_HH_
38 
39 #include "atomictype.hh"
40 
41 //@ManMemo: Module: {\bf relcatalogif}.
42 
43 /*@Doc:
44 IntegralType is the abstract base class for all integral signed
45 \Ref{BaseType} subclasses, i.e. base types like \Ref{LongType} or
46 \Ref{ShortType}. It provides conversions to/from unsigned and
47 double. It's subclasses must implement conversions to/from long.
48 */
49 
53 class IntegralType : public AtomicType
54 {
55 public:
56  IntegralType(unsigned int newSize):
57  AtomicType(newSize) {}
58  /*@Doc:
59  constructor.
60  */
61 
63  AtomicType(old) {}
64  /*@Doc:
65  copy constructor.
66  */
67 
68  IntegralType(const OId& id) throw (r_Error):
69  AtomicType(id) {}
70  /*@Doc:
71  */
72 
73  virtual ~IntegralType() {}
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 double* convertToCDouble(const char*, double*) const;
81  virtual char* makeFromCDouble(char*, const double*) const;
82 
83 protected:
84  IntegralType(const char* name, unsigned int newSize):
85  AtomicType(name, newSize) {}
86  /*@Doc:
87  */
88 
89 };
90 
91 #include "integraltype.icc"
92 
93 #endif
IntegralType(unsigned int newSize)
Definition: integraltype.hh:56
unsigned int r_ULong
Definition: odmgtypes.hh:114
Definition: error.hh:88
IntegralType(const char *name, unsigned int newSize)
Definition: integraltype.hh:84
IntegralType(const OId &id)
Definition: integraltype.hh:68
AtomicType(unsigned int newSize)
Definition: oidif.hh:67
virtual char * makeFromCDouble(char *, const double *) const
Definition: atomictype.hh:59
IntegralType(const IntegralType &old)
Definition: integraltype.hh:62
Definition: integraltype.hh:53
virtual ~IntegralType()
Definition: integraltype.hh:73
virtual char * makeFromCULong(char *, const r_ULong *) const
virtual r_ULong * convertToCULong(const char *, r_ULong *) const
virtual double * convertToCDouble(const char *, double *) const