casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StManColumnBase.h
Go to the documentation of this file.
1 //# StManColumnBase.h: Base storage manager column class
2 //# Copyright (C) 2019
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TABLES_STMANCOLUMNBASE_H
29 #define TABLES_STMANCOLUMNBASE_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
37 
38 namespace casacore { //# NAMESPACE CASACORE - BEGIN
39 
40 // <summary>
41 // Base table column storage manager class
42 // </summary>
43 
44 // <use visibility=local>
45 
46 // <reviewed reviewer="Gareth Hunt" date="94Nov17" tests="">
47 // </reviewed>
48 
49 // <prerequisite>
50 //# Classes you should understand before using this one.
51 // <li> DataManagerColumn
52 // </prerequisite>
53 
54 // <etymology>
55 // StManColumnBase is the base class for a storage manager.
56 // </etymology>
57 
58 // <synopsis>
59 // StManColumnBase is the abstract base class to handle a column in all
60 // kind of storage managers. It is derived from DataManagerColumn
61 // and implements a few (virtual) functions handling the column's
62 // data type for derived storage manager column classes.
63 // </synopsis>
64 
65 // <todo asof="$DATE:$">
66 //# A List of bugs, limitations, extensions or planned refinements.
67 // </todo>
68 
69 
71 {
72 public:
73 
74  // Default constructor.
76 
78 
79  // Test if the given data type is supported by storage managers.
80  // It is used by the function Table::isNativeDataType.
81  static Bool isNativeDataType (int dtype);
82 
83  // Return the data type of the column.
84  // <group>
85  virtual int dataType() const;
86  DataType dtype() const
87  { return dtype_p; }
88  // </group>
89 
90  // Return the size of an element of the column's data type.
91  Int elemSize() const
92  { return elemSize_p; }
93 
94 private:
95  // The object cannot be copied.
97 
98  // The object cannot be assigned to.
100 
101 private:
102  // The data type of the column.
103  DataType dtype_p;
104  // The size of an element of this data type.
106 };
107 
108 
109 
110 
111 } //# NAMESPACE CASACORE - END
112 
113 #endif
int Int
Definition: aipstype.h:50
Abstract base class for a column in a data manager.
Int elemSize() const
Return the size of an element of the column&#39;s data type.
StManColumnBase(int dataType)
Default constructor.
Base table column storage manager class.
virtual int dataType() const
Return the data type of the column.
DataType dtype() const
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
static Bool isNativeDataType(int dtype)
Test if the given data type is supported by storage managers.
Int elemSize_p
The size of an element of this data type.
DataType dtype_p
The data type of the column.
StManColumnBase & operator=(const StManColumnBase &)
The object cannot be assigned to.