rasdaman base DBMS
booltype.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 ULongType class is the superclass for all classes
30  * describing the type of a cell
31  *
32  *
33  * COMMENTS:
34  *
35  ************************************************************/
36 
37 #ifndef _BOOLTYPE_HH_
38 #define _BOOLTYPE_HH_
39 
40 #include <iostream>
41 #include "uintegraltype.hh"
42 #include "catalogmgr/ops.hh"
43 
44 class OId;
45 
46 //@ManMemo: Module: {\bf relcatalogif}.
47 
48 /*@Doc:
49 
50 BoolType is the base type used for boolean cell values (e.g. result
51 of comparison operations, see \Ref{Ops}). The value of a Bool is
52 stored in one char. BoolType is a persistence capable class.
53 */
54 
58 class BoolType : public UIntegralType
59 {
60 public:
61  BoolType(const OId& id) throw (r_Error);
62 
63  BoolType();
64  /*@Doc:
65  default constructor, no initialization needed for BoolType.
66  */
67 
68  BoolType(const BoolType& old);
69  /*@Doc:
70  copy constructor.
71  */
72 
73  BoolType& operator=(const BoolType& old);
74  /*@Doc:
75  assignment operator.
76  */
77 
78  virtual ~BoolType();
79  /*@Doc:
80  virtual destructor.
81  */
82 
83  virtual void printCell(ostream& stream, const char* cell) const;
84  /*@Doc:
85  */
86 
87  virtual r_ULong* convertToCULong(const char* cell, r_ULong* value) const;
88  /*@Doc:
89  */
90 
91  virtual char* makeFromCULong(char* cell, const r_ULong* 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 char * makeFromCULong(char *cell, const r_ULong *value) const
virtual r_ULong * convertToCULong(const char *cell, r_ULong *value) const
Definition: oidif.hh:67
virtual ~BoolType()
Definition: uintegraltype.hh:54
virtual void printCell(ostream &stream, const char *cell) const
Definition: booltype.hh:58
BoolType & operator=(const BoolType &old)
static const char * Name
Definition: booltype.hh:95
virtual void readFromDb()