rasdaman base DBMS
shorttype.hh
Go to the documentation of this file.
1 // -*-C++-*- (for Emacs)
2 
3 /*
4 * This file is part of rasdaman community.
5 *
6 * Rasdaman community is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Rasdaman community is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
20 rasdaman GmbH.
21 *
22 * For more information please see <http://www.rasdaman.org>
23 * or contact Peter Baumann via <baumann@rasdaman.com>.
24 */
25 /*************************************************************
26  *
27  *
28  * PURPOSE:
29  * The ShortType class is the superclass for all classes
30  * describing the type of a cell
31  *
32  *
33  * COMMENTS:
34  * This file is patched by O2!
35  *
36  ************************************************************/
37 
38 #ifndef _SHORTTYPE_HH_
39 #define _SHORTTYPE_HH_
40 
41 #include <iostream>
42 #include "integraltype.hh"
43 #include "catalogmgr/ops.hh"
44 
45 class OId;
46 
47 //@ManMemo: Module: {\bf relcatalogif}.
48 
49 /*@Doc:
50 ShortType is the base type used for 16bit integer cell
51 values. The value of a Short is stored in four chars.
52 
53 */
54 
58 class ShortType : public IntegralType
59 {
60 public:
61  ShortType(const OId& id) throw (r_Error);
62 
63  ShortType();
64  /*@Doc:
65  default constructor, sets type name to "Short".
66  */
67 
68  ShortType(const ShortType& old);
69  /*@Doc:
70  copy constructor.
71  */
72 
73  ShortType& operator=(const ShortType& old);
74  /*@Doc:
75  assignment operator.
76  */
77 
78  virtual ~ShortType();
79  /*@Doc:
80  virtual destructor.
81  */
82 
83  virtual void printCell(ostream& stream, const char* cell) const;
84  /*@Doc:
85  */
86 
87  virtual r_Long* convertToCLong(const char* cell, r_Long* value) const;
88  /*@Doc:
89  */
90 
91  virtual char* makeFromCLong(char* cell, const r_Long* 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 
107 #endif
virtual ~ShortType()
virtual void readFromDb()
ShortType & operator=(const ShortType &old)
virtual void printCell(ostream &stream, const char *cell) const
virtual char * makeFromCLong(char *cell, const r_Long *value) const
virtual r_Long * convertToCLong(const char *cell, r_Long *value) const
Definition: oidif.hh:67
Definition: integraltype.hh:53
Definition: shorttype.hh:58
static const char * Name
Definition: shorttype.hh:95