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: 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>
33#include <casacore/tables/DataMan/TSMColumn.h>
34
35namespace 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
97{
98public:
99
100 // Create a coordinate column from the given column.
101 TSMCoordColumn (const TSMColumn& column, uInt axisNr);
102
103 // Frees up the storage.
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?
110 virtual Bool isShapeDefined (rownr_t rownr);
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
151private:
152 // The axis number of the coordinate.
154
155 // Forbid copy constructor.
157
158 // Forbid assignment.
160};
161
162
163
164
165} //# NAMESPACE CASACORE - END
166
167#endif
Non-templated base class for templated Array class.
Definition ArrayBase.h:73
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.
TSMCoordColumn(const TSMCoordColumn &)
Forbid copy constructor.
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 &)
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:51
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
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:42
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:46