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