casacore
Loading...
Searching...
No Matches
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: casa-feedback@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#ifndef TABLES_TSMCOORDCOLUMN_H
27#define TABLES_TSMCOORDCOLUMN_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/TSMColumn.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// # Forward declarations
36
37// <summary>
38// A coordinate column in Tiled Storage Manager
39// </summary>
40
41// <use visibility=local>
42
43// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
44// </reviewed>
45
46// <prerequisite>
47// # Classes you should understand before using this one.
48// <li> <linkto class=TSMColumn>TSMColumn</linkto>
49// <li> <linkto class=TSMCube>TSMCube</linkto>
50// <li> <linkto class=Record>Record</linkto>
51// </prerequisite>
52
53// <etymology>
54// TSMCoordColumn handles a coordinate column for a Tiled
55// Storage Manager.
56// </etymology>
57
58// <synopsis>
59// TSMCoordColumn is used by
60// <linkto class=TiledStMan>TiledStMan</linkto>
61// to handle the access to
62// a table column containing coordinates of a tiled hypercube axis.
63// There are 2 types of coordinates (as described at
64// <linkto class=TableDesc:defineHypercolumn>
65// TableDesc::defineHypercolumn</linkto>):
66// <ol>
67// <li> As a vector. These are the coordinates of the arrays held
68// in the data cells. They are accessed via the get/putArray
69// functions. Their shapes are dependent on the hypercube shape,
70// so it is checked if they match.
71// <li> As a scalar. These are the coordinates of the extra axes
72// defined in the hypercube. They are accessed via the get/put
73// functions.
74// </ol>
75// The coordinates are held in a TSMCube object. The row number
76// determines which TSMCube object has to be accessed.
77// <p>
78// The creation of a TSMCoordColumn object is done by a TSMColumn object.
79// This process is described in more detail in the class
80// <linkto class=TSMColumn>TSMColumn</linkto>.
81// </synopsis>
82
83// <motivation>
84// Handling coordinate columns in the Tiled Storage Manager is
85// different from other columns.
86// </motivation>
87
88// # <todo asof="$DATE:$">
89// # A List of bugs, limitations, extensions or planned refinements.
90// # </todo>
91
92class TSMCoordColumn : public TSMColumn {
93 public:
94 // Create a coordinate column from the given column.
95 TSMCoordColumn(const TSMColumn& column, uInt axisNr);
96
97 // Frees up the storage.
98 virtual ~TSMCoordColumn();
99
100 // Forbid copy constructor.
102
103 // Forbid assignment.
105
106 // Set the shape of the coordinate vector in the given row.
107 virtual void setShape(rownr_t rownr, const IPosition& shape);
108
109 // Is the value shape defined in the given row?
111
112 // Get the shape of the item in the given row.
113 virtual IPosition shape(rownr_t 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 virtual void getInt(rownr_t rownr, Int* dataPtr);
120 virtual void getuInt(rownr_t rownr, uInt* dataPtr);
121 virtual void getInt64(rownr_t rownr, Int64* dataPtr);
122 virtual void getfloat(rownr_t rownr, float* dataPtr);
123 virtual void getdouble(rownr_t rownr, double* dataPtr);
124 virtual void getComplex(rownr_t rownr, Complex* dataPtr);
125 virtual void getDComplex(rownr_t 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 virtual void putInt(rownr_t rownr, const Int* dataPtr);
133 virtual void putuInt(rownr_t rownr, const uInt* dataPtr);
134 virtual void putInt64(rownr_t rownr, const Int64* dataPtr);
135 virtual void putfloat(rownr_t rownr, const float* dataPtr);
136 virtual void putdouble(rownr_t rownr, const double* dataPtr);
137 virtual void putComplex(rownr_t rownr, const Complex* dataPtr);
138 virtual void putDComplex(rownr_t 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 virtual void getArrayV(rownr_t rownr, ArrayBase& dataPtr);
145
146 // Put the array value into the given row.
147 // The buffer pointed to by dataPtr has to have the correct length
148 // (which is guaranteed by the ArrayColumn put function).
149 virtual void putArrayV(rownr_t rownr, const ArrayBase& dataPtr);
150
151 private:
152 // The axis number of the coordinate.
154};
155
156} // namespace casacore
157
158#endif
Non-templated base class for templated Array class.
Definition ArrayBase.h:69
TSMColumn(TiledStMan *stman, int dataType, const String &columnName)
Create a column of the given type.
TSMCoordColumn(const TSMCoordColumn &)=delete
Forbid copy constructor.
virtual void putComplex(rownr_t rownr, const Complex *dataPtr)
virtual void putArrayV(rownr_t rownr, const ArrayBase &dataPtr)
Put the array value into the given row.
virtual void getComplex(rownr_t rownr, Complex *dataPtr)
virtual void putuInt(rownr_t rownr, const uInt *dataPtr)
virtual void putdouble(rownr_t rownr, const double *dataPtr)
uInt axisNr_p
The axis number of the coordinate.
virtual void setShape(rownr_t rownr, const IPosition &shape)
Set the shape of the coordinate vector in the given row.
virtual ~TSMCoordColumn()
Frees up the storage.
virtual void getArrayV(rownr_t rownr, ArrayBase &dataPtr)
Get the array value in the given row.
virtual void putfloat(rownr_t rownr, const float *dataPtr)
virtual void getInt64(rownr_t rownr, Int64 *dataPtr)
virtual void getDComplex(rownr_t rownr, DComplex *dataPtr)
virtual void getfloat(rownr_t rownr, float *dataPtr)
TSMCoordColumn & operator=(const TSMCoordColumn &)=delete
Forbid assignment.
virtual void getuInt(rownr_t rownr, uInt *dataPtr)
virtual void putDComplex(rownr_t rownr, const DComplex *dataPtr)
virtual void getdouble(rownr_t rownr, double *dataPtr)
TSMCoordColumn(const TSMColumn &column, uInt axisNr)
Create a coordinate column from the given column.
virtual IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
virtual void putInt64(rownr_t rownr, const Int64 *dataPtr)
virtual void getInt(rownr_t rownr, Int *dataPtr)
Get a scalar value in the given row.
virtual Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row?
virtual void putInt(rownr_t rownr, const Int *dataPtr)
Put a scalar value into the given row.
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size).
Definition aipsxtype.h:36
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44