casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSMIdColumn.h
Go to the documentation of this file.
1 //# TSMIdColumn.h: An id column in Tiled Storage Manager
2 //# Copyright (C) 1995,1996,1997,1999
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_TSMIDCOLUMN_H
29 #define TABLES_TSMIDCOLUMN_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
36 
37 namespace casacore { //# NAMESPACE CASACORE - BEGIN
38 
39 //# Forward Declarations
40 
41 
42 // <summary>
43 // An id column in Tiled Storage Manager.
44 // </summary>
45 
46 // <use visibility=local>
47 
48 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
49 // </reviewed>
50 
51 // <prerequisite>
52 //# Classes you should understand before using this one.
53 // <li> <linkto class=TSMColumn>TSMColumn</linkto>
54 // <li> <linkto class=TSMCube>TSMCube</linkto>
55 // <li> <linkto class=Record>Record</linkto>
56 // </prerequisite>
57 
58 // <etymology>
59 // TSMIdColumn handles an id column for a Tiled
60 // Storage Manager.
61 // </etymology>
62 
63 // <synopsis>
64 // TSMIdColumn is used by
65 // <linkto class=TiledStMan>TiledStMan</linkto>
66 // to handle the access to
67 // a table column containing an id value of a tiled hypercube.
68 // Explicitly putting an id value is not possible. The only way to
69 // define the value is by specifying it when adding a hypercube
70 // in <linkto class=TiledDataStMan>TiledDataStMan</linkto>.
71 // <p>
72 // The id values are held in a TSMCube object. The row number
73 // determines which TSMCube object has to be accessed.
74 // <p>
75 // The creation of a TSMIdColumn object is done by a TSMColumn object.
76 // This process is described in more detail in the class
77 // <linkto class=TSMColumn>TSMColumn</linkto>.
78 // </synopsis>
79 
80 // <motivation>
81 // Handling coordinate columns in the Tiled Storage Manager is
82 // different from other columns.
83 // </motivation>
84 
85 //# <todo asof="$DATE:$">
86 //# A List of bugs, limitations, extensions or planned refinements.
87 //# </todo>
88 
89 
90 class TSMIdColumn : public TSMColumn
91 {
92 public:
93 
94  // Create an id column from the given column.
95  TSMIdColumn (const TSMColumn& column);
96 
97  // Frees up the storage.
98  virtual ~TSMIdColumn();
99 
100  // Get a scalar value in the given row.
101  // The buffer pointed to by dataPtr has to have the correct length
102  // (which is guaranteed by the ScalarColumn get function).
103  // <group>
104  void getBoolV (uInt rownr, Bool* dataPtr);
105  void getIntV (uInt rownr, Int* dataPtr);
106  void getuIntV (uInt rownr, uInt* dataPtr);
107  void getInt64V (uInt rownr, Int64* dataPtr);
108  void getfloatV (uInt rownr, float* dataPtr);
109  void getdoubleV (uInt rownr, double* dataPtr);
110  void getComplexV (uInt rownr, Complex* dataPtr);
111  void getDComplexV (uInt rownr, DComplex* dataPtr);
112  void getStringV (uInt rownr, String* dataPtr);
113  // </group>
114 
115  // Put a scalar value in the given row.
116  // The buffer pointed to by dataPtr has to have the correct length
117  // (which is guaranteed by the ScalarColumn get function).
118  // The value to be put must match the value which has already
119  // been inserted by the TiledStMan::addHypercube function.
120  // The put function is only there to be fully orthogonal.
121  // <group>
122  void putBoolV (uInt rownr, const Bool* dataPtr);
123  void putIntV (uInt rownr, const Int* dataPtr);
124  void putuIntV (uInt rownr, const uInt* dataPtr);
125  void putInt64V (uInt rownr, const Int64* dataPtr);
126  void putfloatV (uInt rownr, const float* dataPtr);
127  void putdoubleV (uInt rownr, const double* dataPtr);
128  void putComplexV (uInt rownr, const Complex* dataPtr);
129  void putDComplexV (uInt rownr, const DComplex* dataPtr);
130  void putStringV (uInt rownr, const String* dataPtr);
131  // </group>
132 
133 private:
134  // Forbid copy constructor.
135  TSMIdColumn (const TSMIdColumn&);
136 
137  // Forbid assignment.
139 };
140 
141 
142 
143 
144 } //# NAMESPACE CASACORE - END
145 
146 #endif
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
int Int
Definition: aipstype.h:50
void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
void getfloatV(uInt rownr, float *dataPtr)
void getIntV(uInt rownr, Int *dataPtr)
void getdoubleV(uInt rownr, double *dataPtr)
void putdoubleV(uInt rownr, const double *dataPtr)
void putInt64V(uInt rownr, const Int64 *dataPtr)
void getInt64V(uInt rownr, Int64 *dataPtr)
void getComplexV(uInt rownr, Complex *dataPtr)
void putComplexV(uInt rownr, const Complex *dataPtr)
void getStringV(uInt rownr, String *dataPtr)
An id column in Tiled Storage Manager.
Definition: TSMIdColumn.h:90
void getDComplexV(uInt rownr, DComplex *dataPtr)
void putIntV(uInt rownr, const Int *dataPtr)
void putfloatV(uInt rownr, const float *dataPtr)
TSMIdColumn(const TSMColumn &column)
Create an id column from the given column.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
A column in the Tiled Storage Manager.
Definition: TSMColumn.h:97
void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value in the given row.
void putuIntV(uInt rownr, const uInt *dataPtr)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void getuIntV(uInt rownr, uInt *dataPtr)
void putDComplexV(uInt rownr, const DComplex *dataPtr)
void putStringV(uInt rownr, const String *dataPtr)
TSMIdColumn & operator=(const TSMIdColumn &)
Forbid assignment.
virtual ~TSMIdColumn()
Frees up the storage.
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42