rasdaman base DBMS
ushorttype.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 UShortType 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 _USHORTTYPE_HH_
39 #define _USHORTTYPE_HH_
40 
41 #include <iostream>
42 #include "uintegraltype.hh"
43 #include "catalogmgr/ops.hh"
44 
45 //@ManMemo: Module: {\bf relcatalogif}.
46 
47 /*@Doc:
48 UShortType is the base type used for 16bit unsigned integer cell
49 values. The value of a UShort is stored in four chars.
50 */
51 
55 class UShortType : public UIntegralType
56 {
57 public:
58  UShortType(const OId& id) throw (r_Error);
59 
60  UShortType();
61  /*@Doc:
62  default constructor, sets type name to "UShort".
63  */
64 
65  UShortType(const UShortType& old);
66  /*@Doc:
67  copy constructor.
68  */
69 
70  UShortType& operator=(const UShortType& old);
71  /*@Doc:
72  assignment operator.
73  */
74 
75  virtual ~UShortType();
76  /*@Doc:
77  virtual destructor.
78  */
79 
80  virtual void printCell(ostream& stream, const char* cell) const;
81  /*@Doc:
82  */
83 
84  virtual r_ULong* convertToCULong(const char* cell, r_ULong* value) const;
85  /*@Doc:
86  */
87 
88  virtual char* makeFromCULong(char* cell, const r_ULong* value) const;
89  /*@Doc:
90  */
91 
92  static const char* Name;
93 
94 protected:
95 
96  virtual void readFromDb() throw (r_Error);
97  /*@Doc:
98  initializes the attributes of this type.
99  there is no database activity. this is hard coded.
100  */
101 };
102 
103 #endif
Definition: ushorttype.hh:55
virtual char * makeFromCULong(char *cell, const r_ULong *value) const
virtual ~UShortType()
static const char * Name
Definition: ushorttype.hh:92
Definition: oidif.hh:67
virtual void readFromDb()
Definition: uintegraltype.hh:54
UShortType & operator=(const UShortType &old)
virtual void printCell(ostream &stream, const char *cell) const
virtual r_ULong * convertToCULong(const char *cell, r_ULong *value) const