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