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
38// <summary>
39// A coordinate column in Tiled Storage Manager
40// </summary>
41
42// <use visibility=local>
43
44// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
45// </reviewed>
46
47// <prerequisite>
48//# Classes you should understand before using this one.
49// <li> <linkto class=TSMColumn>TSMColumn</linkto>
50// <li> <linkto class=TSMCube>TSMCube</linkto>
51// <li> <linkto class=Record>Record</linkto>
52// </prerequisite>
53
54// <etymology>
55// TSMCoordColumn handles a coordinate column for a Tiled
56// Storage Manager.
57// </etymology>
58
59// <synopsis>
60// TSMCoordColumn is used by
61// <linkto class=TiledStMan>TiledStMan</linkto>
62// to handle the access to
63// a table column containing coordinates of a tiled hypercube axis.
64// There are 2 types of coordinates (as described at
65// <linkto class=TableDesc:defineHypercolumn>
66// TableDesc::defineHypercolumn</linkto>):
67// <ol>
68// <li> As a vector. These are the coordinates of the arrays held
69// in the data cells. They are accessed via the get/putArray
70// functions. Their shapes are dependent on the hypercube shape,
71// so it is checked if they match.
72// <li> As a scalar. These are the coordinates of the extra axes
73// defined in the hypercube. They are accessed via the get/put
74// functions.
75// </ol>
76// The coordinates are held in a TSMCube object. The row number
77// determines which TSMCube object has to be accessed.
78// <p>
79// The creation of a TSMCoordColumn object is done by a TSMColumn object.
80// This process is described in more detail in the class
81// <linkto class=TSMColumn>TSMColumn</linkto>.
82// </synopsis>
83
84// <motivation>
85// Handling coordinate columns in the Tiled Storage Manager is
86// different from other columns.
87// </motivation>
88
89//# <todo asof="$DATE:$">
90//# A List of bugs, limitations, extensions or planned refinements.
91//# </todo>
92
93
95{
96public:
97
98 // Create a coordinate column from the given column.
99 TSMCoordColumn (const TSMColumn& column, uInt axisNr);
100
101 // Frees up the storage.
103
104 // Forbid copy constructor.
106
107 // Forbid assignment.
109
110 // Set the shape of the coordinate vector in the given row.
111 virtual void setShape (rownr_t rownr, const IPosition& shape);
112
113 // Is the value shape defined in the given row?
114 virtual Bool isShapeDefined (rownr_t rownr);
115
116 // Get the shape of the item in the given row.
117 virtual IPosition shape (rownr_t rownr);
118
119 // Get a scalar value in the given row.
120 // The buffer pointed to by dataPtr has to have the correct length
121 // (which is guaranteed by the Scalar/ArrayColumn get function).
122 // <group>
123 virtual void getInt (rownr_t rownr, Int* dataPtr);
124 virtual void getuInt (rownr_t rownr, uInt* dataPtr);
125 virtual void getInt64 (rownr_t rownr, Int64* dataPtr);
126 virtual void getfloat (rownr_t rownr, float* dataPtr);
127 virtual void getdouble (rownr_t rownr, double* dataPtr);
128 virtual void getComplex (rownr_t rownr, Complex* dataPtr);
129 virtual void getDComplex (rownr_t rownr, DComplex* dataPtr);
130 // </group>
131
132 // Put a scalar value into the given row.
133 // The buffer pointed to by dataPtr has to have the correct length
134 // (which is guaranteed by the Scalar/ArrayColumn put function).
135 // <group>
136 virtual void putInt (rownr_t rownr, const Int* dataPtr);
137 virtual void putuInt (rownr_t rownr, const uInt* dataPtr);
138 virtual void putInt64 (rownr_t rownr, const Int64* dataPtr);
139 virtual void putfloat (rownr_t rownr, const float* dataPtr);
140 virtual void putdouble (rownr_t rownr, const double* dataPtr);
141 virtual void putComplex (rownr_t rownr, const Complex* dataPtr);
142 virtual void putDComplex (rownr_t rownr, const DComplex* dataPtr);
143 // </group>
144
145 // Get the array value in the given row.
146 // The array pointed to by dataPtr has to have the correct length
147 // (which is guaranteed by the ArrayColumn get function).
148 virtual void getArrayV (rownr_t rownr, ArrayBase& dataPtr);
149
150 // Put the array value into the given row.
151 // The buffer pointed to by dataPtr has to have the correct length
152 // (which is guaranteed by the ArrayColumn put function).
153 virtual void putArrayV (rownr_t rownr, const ArrayBase& dataPtr);
154
155private:
156 // The axis number of the coordinate.
158};
159
160
161
162
163} //# NAMESPACE CASACORE - END
164
165#endif
Non-templated base class for templated Array class.
Definition ArrayBase.h:71
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.
this file contains all the compiler specific defines
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