casacore
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>
33#include <casacore/tables/DataMan/TSMColumn.h>
34#include <casacore/casa/Arrays/IPosition.h>
35#include <casacore/casa/BasicSL/String.h>
36
37namespace 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
90class TSMIdColumn : public TSMColumn
91{
92public:
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 virtual void getBool (rownr_t rownr, Bool* dataPtr);
105 virtual void getInt (rownr_t rownr, Int* dataPtr);
106 virtual void getuInt (rownr_t rownr, uInt* dataPtr);
107 virtual void getInt64 (rownr_t rownr, Int64* dataPtr);
108 virtual void getfloat (rownr_t rownr, float* dataPtr);
109 virtual void getdouble (rownr_t rownr, double* dataPtr);
110 virtual void getComplex (rownr_t rownr, Complex* dataPtr);
111 virtual void getDComplex (rownr_t rownr, DComplex* dataPtr);
112 virtual void getString (rownr_t 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 virtual void putBool (rownr_t rownr, const Bool* dataPtr);
123 virtual void putInt (rownr_t rownr, const Int* dataPtr);
124 virtual void putuInt (rownr_t rownr, const uInt* dataPtr);
125 virtual void putInt64 (rownr_t rownr, const Int64* dataPtr);
126 virtual void putfloat (rownr_t rownr, const float* dataPtr);
127 virtual void putdouble (rownr_t rownr, const double* dataPtr);
128 virtual void putComplex (rownr_t rownr, const Complex* dataPtr);
129 virtual void putDComplex (rownr_t rownr, const DComplex* dataPtr);
130 virtual void putString (rownr_t rownr, const String* dataPtr);
131 // </group>
132
133private:
134 // Forbid copy constructor.
136
137 // Forbid assignment.
139};
140
141
142
143
144} //# NAMESPACE CASACORE - END
145
146#endif
String: the storage and methods of handling collections of characters.
Definition: String.h:225
virtual void putString(rownr_t rownr, const String *dataPtr)
virtual void putInt64(rownr_t rownr, const Int64 *dataPtr)
virtual void getInt(rownr_t rownr, Int *dataPtr)
virtual void putdouble(rownr_t rownr, const double *dataPtr)
TSMIdColumn(const TSMIdColumn &)
Forbid copy constructor.
virtual void getdouble(rownr_t rownr, double *dataPtr)
virtual void getDComplex(rownr_t rownr, DComplex *dataPtr)
virtual void putfloat(rownr_t rownr, const float *dataPtr)
virtual void getuInt(rownr_t rownr, uInt *dataPtr)
virtual void putInt(rownr_t rownr, const Int *dataPtr)
virtual void getInt64(rownr_t rownr, Int64 *dataPtr)
virtual void putComplex(rownr_t rownr, const Complex *dataPtr)
virtual void getBool(rownr_t rownr, Bool *dataPtr)
Get a scalar value in the given row.
virtual void getString(rownr_t rownr, String *dataPtr)
TSMIdColumn & operator=(const TSMIdColumn &)
Forbid assignment.
virtual ~TSMIdColumn()
Frees up the storage.
virtual void getComplex(rownr_t rownr, Complex *dataPtr)
virtual void putDComplex(rownr_t rownr, const DComplex *dataPtr)
virtual void putuInt(rownr_t rownr, const uInt *dataPtr)
virtual void getfloat(rownr_t rownr, float *dataPtr)
TSMIdColumn(const TSMColumn &column)
Create an id column from the given column.
virtual void putBool(rownr_t rownr, const Bool *dataPtr)
Put a scalar value in 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