casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSMCoordColumn.h
Go to the documentation of this file.
1 //# TSMCoordColumn.h: A coordinate column in Tiled Storage Manager
2 //# Copyright (C) 1995,1996,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_TSMCOORDCOLUMN_H
29 #define TABLES_TSMCOORDCOLUMN_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
34 
35 namespace casacore { //# NAMESPACE CASACORE - BEGIN
36 
37 //# Forward declarations
38 
39 
40 // <summary>
41 // A coordinate column in Tiled Storage Manager
42 // </summary>
43 
44 // <use visibility=local>
45 
46 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
47 // </reviewed>
48 
49 // <prerequisite>
50 //# Classes you should understand before using this one.
51 // <li> <linkto class=TSMColumn>TSMColumn</linkto>
52 // <li> <linkto class=TSMCube>TSMCube</linkto>
53 // <li> <linkto class=Record>Record</linkto>
54 // </prerequisite>
55 
56 // <etymology>
57 // TSMCoordColumn handles a coordinate column for a Tiled
58 // Storage Manager.
59 // </etymology>
60 
61 // <synopsis>
62 // TSMCoordColumn is used by
63 // <linkto class=TiledStMan>TiledStMan</linkto>
64 // to handle the access to
65 // a table column containing coordinates of a tiled hypercube axis.
66 // There are 2 types of coordinates (as described at
67 // <linkto class=TableDesc:defineHypercolumn>
68 // TableDesc::defineHypercolumn</linkto>):
69 // <ol>
70 // <li> As a vector. These are the coordinates of the arrays held
71 // in the data cells. They are accessed via the get/putArray
72 // functions. Their shapes are dependent on the hypercube shape,
73 // so it is checked if they match.
74 // <li> As a scalar. These are the coordinates of the extra axes
75 // defined in the hypercube. They are accessed via the get/put
76 // functions.
77 // </ol>
78 // The coordinates are held in a TSMCube object. The row number
79 // determines which TSMCube object has to be accessed.
80 // <p>
81 // The creation of a TSMCoordColumn object is done by a TSMColumn object.
82 // This process is described in more detail in the class
83 // <linkto class=TSMColumn>TSMColumn</linkto>.
84 // </synopsis>
85 
86 // <motivation>
87 // Handling coordinate columns in the Tiled Storage Manager is
88 // different from other columns.
89 // </motivation>
90 
91 //# <todo asof="$DATE:$">
92 //# A List of bugs, limitations, extensions or planned refinements.
93 //# </todo>
94 
95 
96 class TSMCoordColumn : public TSMColumn
97 {
98 public:
99 
100  // Create a coordinate column from the given column.
101  TSMCoordColumn (const TSMColumn& column, uInt axisNr);
102 
103  // Frees up the storage.
104  virtual ~TSMCoordColumn();
105 
106  // Set the shape of the coordinate vector in the given row.
107  void setShape (uInt rownr, const IPosition& shape);
108 
109  // Is the value shape defined in the given row?
110  Bool isShapeDefined (uInt rownr);
111 
112  // Get the shape of the item in the given row.
113  IPosition shape (uInt rownr);
114 
115  // Get 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 Scalar/ArrayColumn get function).
118  // <group>
119  void getIntV (uInt rownr, Int* dataPtr);
120  void getuIntV (uInt rownr, uInt* dataPtr);
121  void getInt64V (uInt rownr, Int64* dataPtr);
122  void getfloatV (uInt rownr, float* dataPtr);
123  void getdoubleV (uInt rownr, double* dataPtr);
124  void getComplexV (uInt rownr, Complex* dataPtr);
125  void getDComplexV (uInt rownr, DComplex* dataPtr);
126  // </group>
127 
128  // Put a scalar value into the given row.
129  // The buffer pointed to by dataPtr has to have the correct length
130  // (which is guaranteed by the Scalar/ArrayColumn put function).
131  // <group>
132  void putIntV (uInt rownr, const Int* dataPtr);
133  void putuIntV (uInt rownr, const uInt* dataPtr);
134  void putInt64V (uInt rownr, const Int64* dataPtr);
135  void putfloatV (uInt rownr, const float* dataPtr);
136  void putdoubleV (uInt rownr, const double* dataPtr);
137  void putComplexV (uInt rownr, const Complex* dataPtr);
138  void putDComplexV (uInt rownr, const DComplex* dataPtr);
139  // </group>
140 
141  // Get the array value in the given row.
142  // The array pointed to by dataPtr has to have the correct length
143  // (which is guaranteed by the ArrayColumn get function).
144  // The default implementation thrown an "invalid operation exception".
145  // <group>
146  void getArrayIntV (uInt rownr, Array<Int>* dataPtr);
147  void getArrayuIntV (uInt rownr, Array<uInt>* dataPtr);
148  void getArrayInt64V (uInt rownr, Array<Int64>* dataPtr);
149  void getArrayfloatV (uInt rownr, Array<float>* dataPtr);
150  void getArraydoubleV (uInt rownr, Array<double>* dataPtr);
151  void getArrayComplexV (uInt rownr, Array<Complex>* dataPtr);
152  void getArrayDComplexV (uInt rownr, Array<DComplex>* dataPtr);
153  // </group>
154 
155  // Put the array value into the given row.
156  // The buffer pointed to by dataPtr has to have the correct length
157  // (which is guaranteed by the ArrayColumn put function).
158  // The default implementation thrown an "invalid operation exception".
159  // <group>
160  void putArrayIntV (uInt rownr, const Array<Int>* dataPtr);
161  void putArrayuIntV (uInt rownr, const Array<uInt>* dataPtr);
162  void putArrayInt64V (uInt rownr, const Array<Int64>* dataPtr);
163  void putArrayfloatV (uInt rownr, const Array<float>* dataPtr);
164  void putArraydoubleV (uInt rownr, const Array<double>* dataPtr);
165  void putArrayComplexV (uInt rownr, const Array<Complex>* dataPtr);
166  void putArrayDComplexV (uInt rownr, const Array<DComplex>* dataPtr);
167  // </group>
168 
169 private:
170  // The axis number of the coordinate.
172 
173  // Forbid copy constructor.
175 
176  // Forbid assignment.
178 };
179 
180 
181 
182 
183 } //# NAMESPACE CASACORE - END
184 
185 #endif
void getfloatV(uInt rownr, float *dataPtr)
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
TSMCoordColumn & operator=(const TSMCoordColumn &)
Forbid assignment.
void getArrayComplexV(uInt rownr, Array< Complex > *dataPtr)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
void putArrayuIntV(uInt rownr, const Array< uInt > *dataPtr)
int Int
Definition: aipstype.h:50
void putdoubleV(uInt rownr, const double *dataPtr)
void getIntV(uInt rownr, Int *dataPtr)
Get a scalar value in the given row.
virtual ~TSMCoordColumn()
Frees up the storage.
TSMCoordColumn(const TSMColumn &column, uInt axisNr)
Create a coordinate column from the given column.
void putDComplexV(uInt rownr, const DComplex *dataPtr)
void getArrayIntV(uInt rownr, Array< Int > *dataPtr)
Get the array value in the given row.
void getArrayInt64V(uInt rownr, Array< Int64 > *dataPtr)
void getDComplexV(uInt rownr, DComplex *dataPtr)
void putfloatV(uInt rownr, const float *dataPtr)
void putArrayInt64V(uInt rownr, const Array< Int64 > *dataPtr)
void setShape(uInt rownr, const IPosition &shape)
Set the shape of the coordinate vector in the given row.
void putuIntV(uInt rownr, const uInt *dataPtr)
void getArraydoubleV(uInt rownr, Array< double > *dataPtr)
void getArrayfloatV(uInt rownr, Array< float > *dataPtr)
void putArrayIntV(uInt rownr, const Array< Int > *dataPtr)
Put the array value into the given row.
void putArraydoubleV(uInt rownr, const Array< double > *dataPtr)
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 getArrayuIntV(uInt rownr, Array< uInt > *dataPtr)
void putArrayDComplexV(uInt rownr, const Array< DComplex > *dataPtr)
void putInt64V(uInt rownr, const Int64 *dataPtr)
void putArrayfloatV(uInt rownr, const Array< float > *dataPtr)
void getInt64V(uInt rownr, Int64 *dataPtr)
A coordinate column in Tiled Storage Manager.
void getdoubleV(uInt rownr, double *dataPtr)
void getuIntV(uInt rownr, uInt *dataPtr)
void putArrayComplexV(uInt rownr, const Array< Complex > *dataPtr)
uInt axisNr_p
The axis number of the coordinate.
IPosition shape(uInt rownr)
Get the shape of the item in the given row.
void getComplexV(uInt rownr, Complex *dataPtr)
Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row?
void getArrayDComplexV(uInt rownr, Array< DComplex > *dataPtr)
void putIntV(uInt rownr, const Int *dataPtr)
Put a scalar value into the given row.
unsigned int uInt
Definition: aipstype.h:51
void putComplexV(uInt rownr, const Complex *dataPtr)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42