casacore
Loading...
Searching...
No Matches
TableColumn.h
Go to the documentation of this file.
1//# TableColumn.h: Access to a table column
2//# Copyright (C) 1994,1995,1996,1997,1998,1999,2001,2002
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_TABLECOLUMN_H
27#define TABLES_TABLECOLUMN_H
28
29
30//# Includes
31#include <casacore/casa/aips.h>
32#include <casacore/tables/Tables/BaseColumn.h>
33#include <casacore/tables/Tables/BaseTable.h>
34#include <casacore/casa/BasicSL/String.h>
35#include <casacore/casa/Arrays/IPosition.h>
36
37namespace casacore { //# NAMESPACE CASACORE - BEGIN
38
39//# Forward Declarations
40class Table;
41class BaseTable;
42
43
44//# Check the number of rows in debug mode.
45#if defined(AIPS_DEBUG)
46# define TABLECOLUMNCHECKROW(ROWNR) \
47 (checkRowNumber (ROWNR))
48#else
49# define TABLECOLUMNCHECKROW(ROWNR)
50#endif
51
52
53// <summary>
54// Read/write access to a table column
55// </summary>
56
57// <use visibility=export>
58
59// <reviewed reviewer="dschieb" date="1994/08/10" tests="none">
60// </reviewed>
61
62// <prerequisite>
63// <li> Table
64// <li> ColumnDesc
65// </prerequisite>
66
67// <synopsis>
68// The class TableColumn gives read and write access to a column
69// in a table. In particular access to the column description
70// (for name, data type, etc.) and to the column keyword set
71// can be obtained.
72// Another important function is isDefined, which tests if a
73// cell (i.e. table row) in a column contains a value.
74//
75// The classes ScalarColumn<T> and ArrayColumn<T> have to be
76// used to get/put the data in the column cells.
77// However, TableColumn has get functions for the basic data types
78// (Bool, uChar, Short, uSort, Int, uInt, Int64, float, double,
79// Complex, DComplex and String).
80// Opposite to the get functions in ScalarColumn<T>, the
81// TableColumn get functions support data type promotion.
82//
83// A default constructor is defined to allow construction of an array
84// of TableColumn objects. However, this constructs an object not
85// referencing a column. Functions like get, etc. will fail (i.e. result
86// in a segmentation fault) when used on such objects. The functions
87// isNull and throwIfNull can be used to test on this.
88// The functions attach and reference can fill in the object.
89// </synopsis>
90
91// <example>
92// See module <linkto module="Tables#open">Tables</linkto>.
93// </example>
94
95
97{
98friend class ForwardColumn; //# for function baseColPtr()
99
100public:
101
102 // The default constructor creates a null object, i.e. it
103 // does not reference a table column.
104 // The sole purpose of this constructor is to allow construction
105 // of an array of TableColumn objects.
106 // The functions reference and attach can be used to make a null object
107 // reference a column.
108 // Note that get functions, etc. will cause a segmentation fault
109 // when operating on a null object. It was felt it was too expensive
110 // to test on null over and over again. The user should use the isNull
111 // or throwIfNull function in case of doubt.
113
114 // Construct the object for a column in the table using its name.
115 TableColumn (const Table&, const String& columnName);
116
117 // Construct the object for a column in the table using its index.
118 // This allows to loop through all columns in a table as:
119 // <srcblock>
120 // for (uInt=0; i<tab.ncolumn(); i++) {
121 // TableColumn tabcol(tab,i);
122 // }
123 // </srcblock>
124 TableColumn (const Table&, uInt columnIndex);
125
126 // Copy constructor (reference semantics).
128
129 virtual ~TableColumn();
130
131 // Assignment has reference semantics.
132 // It copies the object, not the data of that column to this column.
133 // Function <src>putColumn</src> can be used to copy the data of a column.
134 // <br>It does the same as the reference function.
136
137 // Clone the object.
138 virtual TableColumn* clone() const;
139
140 // Change the reference to another column.
141 // This is in fact an assignment operator with reference semantics.
142 // It removes the reference to the current column and creates
143 // a reference to the column referenced in the other object.
144 // It will handle null objects correctly.
145 void reference (const TableColumn&);
146
147 // Attach a column to the object.
148 // This is in fact only a shorthand for
149 // <<br><src> reference (TableColumn (table, columnName)); </src>
150 // <group>
151 void attach (const Table& table, const String& columnName)
152 { reference (TableColumn (table, columnName)); }
153 void attach (const Table& table, uInt columnIndex)
154 { reference (TableColumn (table, columnIndex)); }
155 // </group>
156
157 // Test if the object is null, i.e. does not reference a column.
158 Bool isNull() const
159 { return (baseColPtr_p == 0 ? True : False); }
160
161 // Throw an exception if the object is null, i.e.
162 // if function isNull() is True.
163 void throwIfNull() const;
164
165 // Test if the column can be written to, thus if the column and
166 // the underlying table can be written to.
169
170 // Test if the column is writable at all (virtual columns might not be).
171 // Note that keywords can always be written, even for virtual columns.
173 { return isColWritable_p; }
174
175 // Check if the column is writable and throw an exception if not.
176 void checkWritable() const
177 { if (!isWritable()) throwNotWritable(); }
178
179 // Get readonly access to the column keyword set.
180 const TableRecord& keywordSet() const
181 { return baseColPtr_p->keywordSet(); }
182
183 // Get read/write access to the column keyword set.
184 // An exception is thrown if the table is not writable.
186
187 // Get const access to the column description.
188 // ColumnDesc functions have to be used to get the data type, etc..
189 const ColumnDesc& columnDesc() const;
190
191 // Get the Table object this column belongs to.
192 Table table() const;
193
194 // Get the number of rows in the column.
195 rownr_t nrow() const
196 { return baseColPtr_p->nrow(); }
197
198 // Can the shape of an already existing non-FixedShape array be changed?
199 // This depends on the storage manager. Most storage managers
200 // can handle it, but TiledDataStMan and TiledColumnStMan can not.
202 { return canChangeShape_p; }
203
204 // Get the global #dimensions of an array (ie. for all cells in column).
205 // This is always set for fixed shape arrays.
206 // Otherwise, 0 will be returned.
208 { return baseColPtr_p->ndimColumn(); }
209
210 // Get the global shape of an array (ie. for all cells in the column).
211 // This is always set for fixed shape arrays.
212 // Otherwise, a 0-dim shape will be returned.
214 { return baseColPtr_p->shapeColumn(); }
215
216 // Test if the given cell contains a defined value.
217 Bool isDefined (rownr_t rownr) const
218 { TABLECOLUMNCHECKROW(rownr); return baseColPtr_p->isDefined (rownr); }
219
220 // Does the column has content in the given row (default is the first row)?
221 // It has if it is defined and does not contain an empty array.
222 Bool hasContent (rownr_t rownr=0) const;
223
224 // Get the #dimensions of an array in a particular cell.
225 uInt ndim (rownr_t rownr) const
226 { TABLECOLUMNCHECKROW(rownr); return baseColPtr_p->ndim (rownr); }
227
228 // Get the shape of an array in a particular cell.
229 IPosition shape (rownr_t rownr) const
230 { TABLECOLUMNCHECKROW(rownr); return baseColPtr_p->shape (rownr); }
231
232 // Get the tile shape of an array in a particular cell.
234 { TABLECOLUMNCHECKROW(rownr); return baseColPtr_p->tileShape (rownr); }
235
236 // Get the value of a scalar in the given row.
237 // Data type promotion is possible.
238 // These functions only work for the standard data types.
239 // <group>
240 void getScalar (rownr_t rownr, Bool& value) const
241 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
242 void getScalar (rownr_t rownr, uChar& value) const
243 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
244 void getScalar (rownr_t rownr, Short& value) const
245 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
246 void getScalar (rownr_t rownr, uShort& value) const
247 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
248 void getScalar (rownr_t rownr, Int& value) const
249 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
250 void getScalar (rownr_t rownr, uInt& value) const
251 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
252 void getScalar (rownr_t rownr, Int64& value) const
253 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
254 void getScalar (rownr_t rownr, float& value) const
255 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
256 void getScalar (rownr_t rownr, double& value) const
257 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
258 void getScalar (rownr_t rownr, Complex& value) const
259 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
260 void getScalar (rownr_t rownr, DComplex& value) const
261 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
262 void getScalar (rownr_t rownr, String& value) const
263 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr, value); }
264 // </group>
265
266 // Get the value from the row and convert it to the required type.
267 // This can only be used for scalar columns with a standard data type.
268 // <group>
269 Bool asBool (rownr_t rownr) const;
270 uChar asuChar (rownr_t rownr) const;
271 Short asShort (rownr_t rownr) const;
272 uShort asuShort (rownr_t rownr) const;
273 Int asInt (rownr_t rownr) const;
274 uInt asuInt (rownr_t rownr) const;
275 Int64 asInt64 (rownr_t rownr) const;
276 float asfloat (rownr_t rownr) const;
277 double asdouble (rownr_t rownr) const;
278 Complex asComplex (rownr_t rownr) const;
279 DComplex asDComplex (rownr_t rownr) const;
280 String asString (rownr_t rownr) const;
281 // </group>
282
283 // Get the value of a scalar in the given row.
284 // These functions work for all data types.
285 // Data type promotion is possible for the standard data types.
286 // The functions are primarily meant for ScalarColumn<T>.
287 // <group>
288 void getScalarValue (rownr_t rownr, Bool* value, const String&) const
289 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
290 void getScalarValue (rownr_t rownr, uChar* value, const String&) const
291 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
292 void getScalarValue (rownr_t rownr, Short* value, const String&) const
293 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
294 void getScalarValue (rownr_t rownr, uShort* value, const String&) const
295 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
296 void getScalarValue (rownr_t rownr, Int* value, const String&) const
297 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
298 void getScalarValue (rownr_t rownr, uInt* value, const String&) const
299 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
300 void getScalarValue (rownr_t rownr, Int64* value, const String&) const
301 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
302 void getScalarValue (rownr_t rownr, float* value, const String&) const
303 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
304 void getScalarValue (rownr_t rownr, double* value, const String&) const
305 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
306 void getScalarValue (rownr_t rownr, Complex* value, const String&) const
307 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
308 void getScalarValue (rownr_t rownr, DComplex* value, const String&) const
309 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
310 void getScalarValue (rownr_t rownr, String* value, const String&) const
311 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->getScalar (rownr,*value); }
312 void getScalarValue (rownr_t rownr, void* value,
313 const String& dataTypeId) const
314 { TABLECOLUMNCHECKROW(rownr);
315 baseColPtr_p->getScalar (rownr,value,dataTypeId); }
316 // </group>
317
318 // Copy the value of a cell of that column to a cell of this column.
319 // This function only works for the standard data types.
320 // Data type promotion will be done if needed.
321 // An exception is thrown if this column is not writable or if
322 // the data cannot be converted.
323 // <group>
324 // Use the same row numbers for both cells.
325 void put (rownr_t rownr, const TableColumn& that,
326 Bool preserveTileShape=False)
327 { put (rownr, that, rownr, preserveTileShape); }
328 // Use possibly different row numbers for that (i.e. input) and
329 // and this (i.e. output) cell.
330 virtual void put (rownr_t thisRownr, const TableColumn& that,
331 rownr_t thatRownr, Bool preserveTileShape=False);
332 // </group>
333
334 // Copy the values of that column to this column.
335 // The numbers of rows in both columns must be equal.
336 // Data type promotion is possible.
337 // An exception is thrown if the data cannot be converted.
338 // This function is useful to copy one column to another without
339 // knowing their data types.
340 // In fact, this function is an assignment operator with copy semantics.
341 void putColumn (const TableColumn& that);
342
343 // Put the value of a scalar in the given row.
344 // Data type promotion is possible.
345 // These functions only work for the standard data types.
346 // <group>
347 void putScalar (rownr_t rownr, const Bool& value)
348 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
349 void putScalar (rownr_t rownr, const uChar& value)
350 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
351 void putScalar (rownr_t rownr, const Short& value)
352 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
353 void putScalar (rownr_t rownr, const uShort& value)
354 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
355 void putScalar (rownr_t rownr, const Int& value)
356 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
357 void putScalar (rownr_t rownr, const uInt& value)
358 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
359 void putScalar (rownr_t rownr, const Int64& value)
360 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
361 void putScalar (rownr_t rownr, const float& value)
362 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
363 void putScalar (rownr_t rownr, const double& value)
364 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
365 void putScalar (rownr_t rownr, const Complex& value)
366 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
367 void putScalar (rownr_t rownr, const DComplex& value)
368 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
369 void putScalar (rownr_t rownr, const String& value)
370 { TABLECOLUMNCHECKROW(rownr); baseColPtr_p->putScalar (rownr, value); }
371 void putScalar (rownr_t rownr, const Char* value)
372 { putScalar (rownr, String(value)); }
373 // </group>
374
375 // Check if the row number is valid.
376 // It throws an exception if out of range.
377 void checkRowNumber (rownr_t rownr) const
378 { baseTabPtr_p->checkRowNumber (rownr); }
379
380 // Set the maximum cache size (in bytes) to be used by a storage manager.
381 void setMaximumCacheSize (uInt nbytes) const
382 { baseColPtr_p->setMaximumCacheSize (nbytes); }
383
384protected:
386 BaseColumn* baseColPtr_p; //# pointer to real column object
389 Bool isColWritable_p; //# is the column writable at all?
390
391
392 // Get the baseColPtr_p of this TableColumn object.
394 { return baseColPtr_p; }
395
396 // Get the baseColPtr_p of another TableColumn object.
397 // This is needed for function put, because baseColPtr_p is a
398 // protected member of TableColumn. Another TableColumn has
399 // no access to that.
400 BaseColumn* baseColPtr (const TableColumn& that) const
401 { return that.baseColPtr_p; }
402
403private:
404 // Throw the exception that the column is not writable.
405 void throwNotWritable() const;
406};
407
408
409// Define ROTableColumn for backward compatibility.
411
412
413} //# NAMESPACE CASACORE - END
414
415#endif
#define TABLECOLUMNCHECKROW(ROWNR)
Definition TableColumn.h:49
virtual IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
virtual rownr_t nrow() const =0
Get nr of rows in the column.
virtual void setMaximumCacheSize(uInt nbytes)=0
Set the maximum cache size (in bytes) to be used by a storage manager.
void getScalar(rownr_t rownr, Bool &value) const
Get the value from the row and convert it to the required type.
virtual Bool isDefined(rownr_t rownr) const =0
Test if the given cell contains a defined value.
virtual uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
virtual IPosition shapeColumn() const
Get the global shape of an array (ie.
virtual IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
virtual uInt ndimColumn() const
Get the global #dimensions of an array (ie.
virtual TableRecord & keywordSet()=0
void putScalar(rownr_t rownr, const Bool &value)
Put the value into the row and convert it from the given type.
virtual Bool isWritable() const =0
Test if this table is writable.
void checkRowNumber(rownr_t rownr) const
Check if the row number is valid.
Definition BaseTable.h:488
String: the storage and methods of handling collections of characters.
Definition String.h:223
void getScalar(rownr_t rownr, uShort &value) const
void putScalar(rownr_t rownr, const Complex &value)
void getScalar(rownr_t rownr, Int &value) const
void getScalarValue(rownr_t rownr, void *value, const String &dataTypeId) const
void putColumn(const TableColumn &that)
Copy the values of that column to this column.
void putScalar(rownr_t rownr, const Int &value)
uShort asuShort(rownr_t rownr) const
void getScalarValue(rownr_t rownr, Int64 *value, const String &) const
Int64 asInt64(rownr_t rownr) const
virtual void put(rownr_t thisRownr, const TableColumn &that, rownr_t thatRownr, Bool preserveTileShape=False)
Use possibly different row numbers for that (i.e.
Bool canChangeShape() const
Can the shape of an already existing non-FixedShape array be changed? This depends on the storage man...
void getScalar(rownr_t rownr, uInt &value) const
TableRecord & rwKeywordSet()
Get read/write access to the column keyword set.
TableColumn(const Table &, uInt columnIndex)
Construct the object for a column in the table using its index.
const ColumnDesc & columnDesc() const
Get const access to the column description.
Bool isWritable() const
Test if the column can be written to, thus if the column and the underlying table can be written to.
BaseTable * baseTabPtr_p
Bool hasContent(rownr_t rownr=0) const
Does the column has content in the given row (default is the first row)? It has if it is defined and ...
void checkRowNumber(rownr_t rownr) const
Check if the row number is valid.
const ColumnCache * colCachePtr_p
void attach(const Table &table, const String &columnName)
Attach a column to the object.
Complex asComplex(rownr_t rownr) const
TableColumn & operator=(const TableColumn &)
Assignment has reference semantics.
void getScalar(rownr_t rownr, DComplex &value) const
void putScalar(rownr_t rownr, const Char *value)
void setMaximumCacheSize(uInt nbytes) const
Set the maximum cache size (in bytes) to be used by a storage manager.
TableColumn()
The default constructor creates a null object, i.e.
void getScalarValue(rownr_t rownr, Bool *value, const String &) const
Get the value of a scalar in the given row.
String asString(rownr_t rownr) const
void reference(const TableColumn &)
Change the reference to another column.
Bool isNull() const
Test if the object is null, i.e.
void putScalar(rownr_t rownr, const Int64 &value)
void putScalar(rownr_t rownr, const Bool &value)
Put the value of a scalar in the given row.
void getScalarValue(rownr_t rownr, Short *value, const String &) const
void putScalar(rownr_t rownr, const float &value)
void putScalar(rownr_t rownr, const uChar &value)
uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
Bool isWritableAtAll() const
Test if the column is writable at all (virtual columns might not be).
void getScalarValue(rownr_t rownr, uInt *value, const String &) const
void getScalar(rownr_t rownr, Bool &value) const
Get the value of a scalar in the given row.
Bool isDefined(rownr_t rownr) const
Test if the given cell contains a defined value.
IPosition shapeColumn() const
Get the global shape of an array (ie.
void putScalar(rownr_t rownr, const double &value)
virtual TableColumn * clone() const
Clone the object.
void getScalar(rownr_t rownr, Int64 &value) const
void getScalarValue(rownr_t rownr, DComplex *value, const String &) const
void getScalar(rownr_t rownr, float &value) const
void getScalar(rownr_t rownr, uChar &value) const
void attach(const Table &table, uInt columnIndex)
double asdouble(rownr_t rownr) const
BaseColumn * baseColPtr(const TableColumn &that) const
Get the baseColPtr_p of another TableColumn object.
void putScalar(rownr_t rownr, const DComplex &value)
DComplex asDComplex(rownr_t rownr) const
void putScalar(rownr_t rownr, const uInt &value)
void checkWritable() const
Check if the column is writable and throw an exception if not.
void getScalarValue(rownr_t rownr, Complex *value, const String &) const
const TableRecord & keywordSet() const
Get readonly access to the column keyword set.
void getScalarValue(rownr_t rownr, uShort *value, const String &) const
IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
void putScalar(rownr_t rownr, const Short &value)
BaseColumn * baseColPtr_p
BaseColumn * baseColPtr() const
Get the baseColPtr_p of this TableColumn object.
void getScalarValue(rownr_t rownr, double *value, const String &) const
float asfloat(rownr_t rownr) const
void getScalar(rownr_t rownr, String &value) const
Short asShort(rownr_t rownr) const
void getScalarValue(rownr_t rownr, Int *value, const String &) const
uChar asuChar(rownr_t rownr) const
void getScalar(rownr_t rownr, double &value) const
void throwIfNull() const
Throw an exception if the object is null, i.e.
void getScalar(rownr_t rownr, Complex &value) const
Table table() const
Get the Table object this column belongs to.
void getScalarValue(rownr_t rownr, uChar *value, const String &) const
uInt ndimColumn() const
Get the global #dimensions of an array (ie.
void throwNotWritable() const
Throw the exception that the column is not writable.
void getScalar(rownr_t rownr, Short &value) const
uInt asuInt(rownr_t rownr) const
TableColumn(const TableColumn &)
Copy constructor (reference semantics).
IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
rownr_t nrow() const
Get the number of rows in the column.
Int asInt(rownr_t rownr) const
Bool asBool(rownr_t rownr) const
Get the value from the row and convert it to the required type.
TableColumn(const Table &, const String &columnName)
Construct the object for a column in the table using its name.
void getScalarValue(rownr_t rownr, float *value, const String &) const
void getScalarValue(rownr_t rownr, String *value, const String &) const
void putScalar(rownr_t rownr, const String &value)
void putScalar(rownr_t rownr, const uShort &value)
void put(rownr_t rownr, const TableColumn &that, Bool preserveTileShape=False)
Copy the value of a cell of that column to a cell of this column.
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned char uChar
Definition aipstype.h:45
const Bool False
Definition aipstype.h:42
TableColumn ROTableColumn
Define ROTableColumn for backward compatibility.
short Short
Definition aipstype.h:46
unsigned int uInt
Definition aipstype.h:49
unsigned short uShort
Definition aipstype.h:47
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
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
const Bool True
Definition aipstype.h:41
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44
char Char
Definition aipstype.h:44