casacore
Loading...
Searching...
No Matches
TableDesc.h
Go to the documentation of this file.
1// # TableDesc.h: specify structure of Casacore tables
2// # Copyright (C) 1994,1995,1996,1997,1999,2000,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_TABLEDESC_H
27#define TABLES_TABLEDESC_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/Tables/ColDescSet.h>
32#include <casacore/casa/IO/AipsIO.h>
33#include <casacore/casa/iosfwd.h>
34#include <casacore/casa/Arrays/ArrayFwd.h>
35
36#include <map>
37
38namespace casacore { // # NAMESPACE CASACORE - BEGIN
39
40// # Forward Declarations
41class TableRecord;
42class TableAttr;
43class TabPath;
44
45// <summary>
46// Define the structure of a Casacore table
47// </summary>
48
49// <use visibility=export>
50
51// <reviewed reviewer="Paul Shannon" date="1994/08/11" tests="none">
52// </reviewed>
53
54// <prerequisite>
55// <li> column description classes
56// <li> TableRecord
57// </prerequisite>
58
59// <synopsis>
60// A TableDesc object contains the description, or structure, of a table.
61// This description is required for the creation of a new table.
62// Descriptions are subsequently associated with every table and
63// embedded in them.
64// <br> The TableDesc class structure is shown in this
65// <a href="TableDesc.drawio.svg.html">UML diagram</a>.
66//
67// A table description consists of the following items:
68// <ul>
69// <li> Name, which cannot be blank if the description is saved in a file.
70// The file name will be this name followed by .tabdsc.
71// <li> Version, which defaults to a blank string.
72// It serves merely as information for the user.
73// <li> Comment, which defaults to an empty string.
74// This serves purely as an informational string for the user.
75// <li> A set of column descriptions which has to be added to the
76// table description. A column description can be created using
77// the classes ScalarColumnDesc, etc..
78// At table creation it is determined by the user if a column
79// has to be stored using a storage manager or calculated
80// on-the-fly using a so-called virtual column engine.
81// <li> A keyword set, which is by default empty.
82// When a table is created from the description, it gets
83// a copy of this keyword set as its initial keyword set.
84// </ul>
85//
86// A TableDesc object can be constructed with one of the following
87// options:
88// <ul>
89// <li> Old
90// Open an existing table description file as readonly.
91// <li> Update
92// Open an existing table description file as read/write
93// The TableDesc destructor will rewrite the possibly changed
94// description.
95// <li> New
96// Create a new table description file.
97// The TableDesc destructor will write the table description into the file.
98// <li> NewNoReplace
99// As option New, but an exception will be thrown if the table
100// description file already exists.
101// <li> Scratch
102// Create a temporary table description. The table description will
103// be lost when the TableDesc object is destructed.
104// This is useful to create a Table object without storing the
105// description separately.
106// Note that the Table object maintains its own description (i.e. it
107// copies the description when being constructed).
108// <li> Delete
109// Delete the table description file. This gets done by the destructor.
110// </ul>
111//
112// More information is provided in the Tables module documentation.
113// </synopsis>
114
115// <example>
116// <srcblock>
117// // First build the new description of a subtable.
118// // Define columns ra and dec (double).
119// TableDesc subTableDesc("tTableDesc_sub", "1", TableDesc::New);
120// subTableDesc.addColumn (ScalarColumnDesc<double>("ra"));
121// subTableDesc.addColumn (ScalarColumnDesc<double>("dec"));
122//
123// // Now create a new table description
124// // Define a comment for the table description.
125// // Define a double keyword.
126// ColumnDesc colDesc1, colDesc2;
127// TableDesc td("tTableDesc", "1", TableDesc::New);
128// td.comment() = "A test of class TableDesc";
129// td.rwKeywordSet().define ("equinox", 1950.0);
130//
131// // Define an integer column ab using the TableDesc::addColumn
132// // function which creates a scalar column description.
133// td.addColumn (ScalarColumnDesc<Int>("ab", "Comment for column ab"));
134//
135// // Add a scalar integer column ac, define keywords for it
136// // and define a default value 0.
137// // Overwrite the value of keyword unit.
138// ScalarColumnDesc<Int> acColumn("ac");
139// acColumn.rwKeywordSet().define ("scale", Complex(0.0f));
140// acColumn.rwKeywordSet().define ("unit", "");
141// acColumn.setDefault (0);
142// td.addColumn (acColumn);
143// td["ac"].rwKeywordSet().define ("unit", "DEG");
144//
145// // Add a scalar string column ad and define its comment string.
146// td.addColumn (ScalarColumnDesc<String>("ad","comment for ad"));
147//
148// // Now define array columns.
149// // This one is indirect and has no dimensionality mentioned yet.
150// td.addColumn (ArrayColumnDesc<Complex>("Arr1","comment for Arr1"));
151// // This one is indirect and has 3-dim arrays.
152// td.addColumn (ArrayColumnDesc<Int>("A2r1","comment for Arr1",3));
153// // This one is direct and has 2-dim arrays with axes length 4 and 7.
154// td.addColumn (ArrayColumnDesc<uInt>("Arr3","comment for Arr1",
155// IPosition(2,4,7),
156// ColumnDesc::Direct));
157//
158// // Add a columns containing tables.
159// td.addColumn (SubTableDesc("sub1", "subtable by name",
160// "tTableDesc_sub"));
161//
162// // Define hypercolumn "dataCube".
163// td.addColumn (ArrayColumnDesc<Complex>("data",2));
164// td.addColumn (ArrayColumnDesc<Int>("pol",1));
165// td.addColumn (ArrayColumnDesc<float>("freq",1));
166// td.addColumn (ScalarColumnDesc<float>("time"));
167// td.addColumn (ScalarColumnDesc<float>("baseline"));
168// td.defineHypercolumn ("dataCube", 4,
169// stringToVector ("data"),
170// stringToVector ("pol,freq,time,baseline"));
171// }
172// </srcblock>
173// </example>
174
175// <motivation>
176// A table description specifies the structure, but not the contents,
177// of a Casacore table. Since many tables will have identical structure
178// and different content, it makes good sense to separate structure
179// ("description") from content.
180// </motivation>
181
182// # <todo asof="$DATE:$">
183// # A List of bugs, limitations, extensions or planned refinements.
184// # </todo>
185
187 public:
188 // # Enumerate the possible options for TableDesc.
190
191 // The default constructor creates a table description with
192 // option = Scratch and a blank name.
194
195 // Create a table description object with the given name.
196 // This name can be seen as the table type in the same way as a
197 // class name is the data type of an object.
198 // The name can only be blank when option=Scratch.
199 // The default table description path is used for the description file.
201
202 // Create a table description object with the given name (i.e. table type)
203 // and version.
204 // The name can only be blank when option=Scratch.
205 // The default table description path is used for the description file.
207
208 // Create a table description object.
209 // The given table description path is used for the description file.
210 // The name can only be blank with option=Scratch.
211 TableDesc(const String& type, const String& version, const TabPath&, TDOption = Old);
212
213 // Create a table description object with the given name (i.e. table type)
214 // and version by copying the input table description.
215 // If the given name or version is blank, it will be copied from
216 // the input table description.
217 // The default table description path is used for the description file.
218 // The only options allowed are New, NewNoReplace and Scratch.
220 Bool copyColumns = True);
221
222 // Create a table description object with the given name (i.e. table type)
223 // and version by copying the input table description.
224 // If the given name or version is blank, it will be copied from
225 // the input table description.
226 // The given table description path is used for the description file.
227 // The only options allowed are New, NewNoReplace and Scratch.
228 TableDesc(const TableDesc&, const String& type, const String& version, const TabPath&, TDOption,
229 Bool copyColumns = True);
230
231 // This copy constructor makes a copy of the table description
232 // maintaining its name and version. By default a Scratch copy is made.
233 // It serves as a shorthand for the constructor:
234 // <br><src> TableDesc (const TableDesc&, "", "", TDOption); </src>
236
237 // The destructor writes the table description if changed.
239
240 // Assignment is not supported, because it is impossible to define
241 // its semantics. Does the data need to be written into a file
242 // before being overwritten?
243 TableDesc& operator=(const TableDesc&) = delete;
244
245 // Test if a description file exists (i.e. isReadable).
246 static Bool isReadable(const String& tableDescName);
247
248 // Get access to the set of column descriptions.
249 // In this way const <linkto class=ColumnDescSet>ColumnDescSet</linkto>
250 // functions (e.g. isDisjoint) can be used.
251 const ColumnDescSet& columnDescSet() const;
252
253 // Add another table description to this table description.
254 // It merges the column descriptions, the special keywordSet
255 // (containing hypercolumn definitions) and the user keywordSet
256 // (this last one is not added if the flag is False).
257 // The two table descriptions have to be disjoint, i.e. no column
258 // nor keyword should already exist. Otherwise an TableInvOper
259 // exception is thrown and nothing gets added.
260 void add(const TableDesc& other, Bool addKeywordSet = True);
261
262 // Get access to the keyword set.
263 // <group>
265 const TableRecord& keywordSet() const;
266 // </group>
267
268 // Get readonly access to the private set of keywords.
269 const TableRecord& privateKeywordSet() const;
270
271 // Add a column to the table description.
272 // An exception is thrown if a keyword or column with this name
273 // already exists.
274 // Although this function has a <src>ColumnDesc</src> as argument,
275 // it is usually needed to construct a more specialized object like
276 // <src>ArrayColumnDesc<float></src>. A <src>ColumnDesc</src>
277 // constructor converts that automatically to a <src>ColumnDesc</src>
278 // object.
279 // <srcblock>
280 // tableDesc.addColumn (ArrayColumnDesc<float> ("NAME"));
281 // </srcblock>
282 // On the other hand this function can also be used to add a
283 // column description from another table as in:
284 // <srcblock>
285 // tableDesc.addColumn (otherTableDesc.columnDesc("NAME"));
286 // </srcblock>
288
289 // Add a column to the table description and give it another name.
290 // This may be useful to use a description of another column.
291 ColumnDesc& addColumn(const ColumnDesc&, const String& newname);
292
293 // Remove a column.
294 // An exception is thrown if the column does not exist.
295 void removeColumn(const String& name);
296
297 // Rename a column.
298 // An exception is thrown if the old name does not exist or
299 // if the name already exists.
300 // <note role=caution>
301 // Renaming a column should be done with care, because other
302 // columns may be referring this column. Also a hypercolumn definition
303 // might be using the old name.
304 // </note>
305 void renameColumn(const String& newname, const String& oldname);
306
307 // Get number of columns.
308 uInt ncolumn() const;
309
310 // Test if a column with this name exists.
311 Bool isColumn(const String& name) const;
312
313 // Get a vector containing all column names.
315
316 // Get the column description by name or by index.
317 // An exception is thrown if the column does not exist.
318 // Function isColumn should be used to test if a column exists.
319 // <group>
320 const ColumnDesc& columnDesc(const String& name) const;
321 const ColumnDesc& operator[](const String& name) const;
322 const ColumnDesc& columnDesc(uInt index) const;
323 const ColumnDesc& operator[](uInt index) const;
326 // </group>
327
328 // Get comment string.
329 const String& comment() const;
330
331 // Get comment string (allowing it to be changed).
332 String& comment();
333
334 // Show the table description on cout.
335 void show() const;
336
337 // Show the table description.
338 void show(ostream& os) const;
339
340 // Get the table type (i.e. name of table description).
341 const String& getType() const;
342
343 // Get the table description version.
344 const String& version() const;
345
346 // Define a hypercolumn.
347 // A hypercolumn is a group of one or more data columns of which
348 // the data is treated as one or more (regular) hypercubes.
349 // The hypercolumn has coordinate axes (e.g. time, frequency)
350 // which are columns in the table.
351 // When the entire hypercolumn consists of multiple hypercubes,
352 // ID-columns can be defined, which uniquely determine the
353 // hypercube to be used.
354 // Note that only <linkto class=TiledDataStMan>TiledDataStMan</linkto>
355 // requires the use of ID-columns.
356 // A hypercolumn definition is needed to be able to use a Tiled
357 // Storage Manager.
358 //
359 // The following has to be specified:
360 // <dl>
361 // <dt> Hypercolumn name
362 // <dd> which is the name used to refer to the hypercolumn.
363 // <dt> ndim
364 // <dd> defining the dimensionality of the hypercolumn (and
365 // of its hypercube(s)).
366 // <dt> Data column names
367 // <dd> which are the columns containing the hypercube data.
368 // When multiple columns are used, the shapes of the data
369 // in their cells must be the same in the same row.
370 // All data columns must contain numeric or Bool scalars or arrays.
371 // <dl>
372 // <dt> array:
373 // <dd> Its dimensionality has to be less than or equal to the
374 // dimensionality of the hypercolumn. If equal, the
375 // array itself already forms the hypercube. That would
376 // mean that each row is a hypercube.
377 // If less, the arrays from multiple rows form a hypercube,
378 // adding one or more dimensions to the array dimensionality.
379 // <dt> scalar:
380 // <dd> The data from multiple rows form a hypercube.
381 // Not all tiled storage managers support scalars.
382 // </dl>
383 // <dt> Coordinate column names (optional)
384 // <dd> which are the columns containing the coordinates of the
385 // hypercubes. They must be (u)Int, float, double or (D)Complex.
386 // When given, the number of coordinate columns must match the
387 // dimensionality of the hypercolumn.
388 // <br>
389 // When the data column cells contain arrays, the first N coordinate
390 // columns must contain vector values, where N is the dimensionality
391 // of the data arrays.
392 // The remaining coordinate columns must contain scalar values.
393 // <dt> Id column names (optional)
394 // <dd> have to be given when a hypercolumn can consist of multiple
395 // hypercubes. They define the column(s) determining which
396 // hypercube has to be used for a data array.
397 // The id columns must contain scalar values ((u)Int, float,
398 // double, (D)Complex, String and/or Bool).
399 // </dl>
400 // It will be checked if the given columns exists and have
401 // an appropriate type.
402 // <br>
403 // The default data manager type of the columns involved will be set
404 // to TiledColumnStMan if all data columns have a fixed shape.
405 // Otherwise they are set to TiledShapeStMan.
406 // The storage manager group of all columns involved will be set to
407 // the hypercolumn name. In that way binding columns to storage managers
408 // during the table creation process is easier because a simple
409 // <code>bindGroup</code> can be used.
410 // <p>
411 // For example:<br>
412 // A table contains data matrices with axes pol and freq.
413 // Those axes are defined in columns pol and freq containing
414 // vectors with the same length as the corresponding axis.
415 // The table also contains scalar columns time and baseline, which
416 // superimpose dimensions upon the data. So the data will be stored
417 // in a 4-d hypercube with axes pol,freq,time,baseline.
418 // It would be defined as follows:
419 // <srcblock>
420 // tableDesc.defineHypercolumn ("dataCube", 4,
421 // stringToVector ("data"),
422 // stringToVector ("pol,freq,time,baseline"));
423 // </srcblock>
424 // Note that the function <linkto group="ArrayUtil.h#stringToVector">
425 // stringToVector</linkto> is very convenient for creating a vector
426 // of Strings.
427 // <group name=defineHypercolumn>
428 void defineHypercolumn(const String& hypercolumnName, uInt ndim,
429 const Vector<String>& dataColumnNames);
430 void defineHypercolumn(const String& hypercolumnName, uInt ndim,
431 const Vector<String>& dataColumnNames,
432 const Vector<String>& coordColumnNames);
433 void defineHypercolumn(const String& hypercolumnName, uInt ndim,
434 const Vector<String>& dataColumnNames,
435 const Vector<String>& coordColumnNames,
436 const Vector<String>& idColumnNames);
437 // </group>
438
439 // Test if the given hypercolumn exists.
440 Bool isHypercolumn(const String& hypercolumnName) const;
441
442 // Get the names of all hypercolumns.
444
445 // Get the columns involved in a hypercolumn.
446 // It returns the dimensionality of the hypercolumn.
447 // An exception is thrown if the hypercolumn does not exist.
448 uInt hypercolumnDesc(const String& hypercolumnName, Vector<String>& dataColumnNames,
449 Vector<String>& coordColumnNames, Vector<String>& idColumnNames) const;
450
451 // Adjust the hypercolumn definitions (for a RefTable).
452 // It removes and/or renames columns as necessary.
453 // Column names which are not part of the map are removed if
454 // <src>keepUnknown==False</src>.
455 // If all data columns of a hypercolumn are removed, the entire
456 // hypercolumn is removed.
457 void adjustHypercolumns(const std::map<String, String>& old2new, Bool keepUnknownData = False,
458 Bool keepUnknownCoord = False, Bool keppUnknownId = False);
459
460 // Remove ID-columns from the given hypercolumn definitions
461 // and set their default data manager type to IncrementalStMan
462 // and group to ISM_TSM.
464
465 // Remove given hypercolumn definition.
466 // An exception is thrown if it is not a hypercolumn.
467 void removeHypercolumnDesc(const String& hypercolumnName);
468
469 // Check recursively if the descriptions of all subtables are known.
470 void checkSubTableDesc() const;
471
472 void renameHypercolumn(const String& newHypercolumnName, const String& hypercolumnName);
473
474 private:
475 String name_p; // # name of table description
476 String vers_p; // # version of table description
477 String dir_p; // # directory
478 String comm_p; // # comment
479 // # Note: the TableRecords are done as pointer, otherwise TableRecord.h
480 // # needs to be included leading to a mutual include.
481 TableRecord* key_p; // # user set of keywords
482 TableRecord* privKey_p; // # Private set of keywords
483 ColumnDescSet col_p; // # set of column names + indices
484 Bool swwrite_p; // # True = description can be written
485 TDOption option_p; // # Table desc. open option
486 AipsIO iofil_p; // # File
487
488 // Initialize the table description.
489 void init(const TabPath&);
490
491 // Initialize and copy a table description.
492 void copy(const TableDesc&, const TabPath&, Bool copyColumns);
493
494 // Throw an invalid hypercolumn exception.
495 void throwHypercolumn(const String& hyperColumnName, const String& message);
496
497 public:
498 // Put the table description into the file.
499 // The name can be used to write the TableDesc from a Table and
500 // is used to set the names of subtables correctly.
501 void putFile(AipsIO&, const TableAttr&) const;
502
503 // Get the table description from the file.
504 void getFile(AipsIO&, const TableAttr&);
505};
506
507// # Get number of columns.
508inline uInt TableDesc::ncolumn() const { return col_p.ncolumn(); }
509
510// # Test if column exists.
511inline Bool TableDesc::isColumn(const String& name) const { return col_p.isDefined(name); }
512
513// # Get a column description.
514inline const ColumnDesc& TableDesc::columnDesc(const String& name) const { return col_p[name]; }
515inline const ColumnDesc& TableDesc::operator[](const String& name) const { return col_p[name]; }
516inline const ColumnDesc& TableDesc::columnDesc(uInt index) const { return col_p[index]; }
517inline const ColumnDesc& TableDesc::operator[](uInt index) const { return col_p[index]; }
519inline ColumnDesc& TableDesc::rwColumnDesc(uInt index) { return col_p[index]; }
520
521// # Return the name (ie. type) of the table description.
522inline const String& TableDesc::getType() const { return name_p; }
523
524// # Return the version of the table description.
525inline const String& TableDesc::version() const { return vers_p; }
526
527// # Get access to the sets of keywords.
529inline const TableRecord& TableDesc::keywordSet() const { return *key_p; }
530inline const TableRecord& TableDesc::privateKeywordSet() const { return *privKey_p; }
531
532// # Get the set of columns.
533inline const ColumnDescSet& TableDesc::columnDescSet() const { return col_p; }
534
535// # Add a column.
537 return col_p.addColumn(column);
538}
539
540inline ColumnDesc& TableDesc::addColumn(const ColumnDesc& column, const String& newname) {
541 return col_p.addColumn(column, newname);
542}
543
544// # Remove a column.
545inline void TableDesc::removeColumn(const String& name) { col_p.remove(name); }
546
547// # Access the comment.
548inline const String& TableDesc::comment() const { return comm_p; }
549
550inline String& TableDesc::comment() { return comm_p; }
551
552inline void TableDesc::checkSubTableDesc() const { col_p.checkSubTableDesc(); }
553
554} // namespace casacore
555
556#endif
String: the storage and methods of handling collections of characters.
Definition String.h:355
void checkSubTableDesc() const
Check recursively if the descriptions of all subtables are known.
Definition TableDesc.h:552
uInt ncolumn() const
Get number of columns.
Definition TableDesc.h:508
TableDesc & operator=(const TableDesc &)=delete
Assignment is not supported, because it is impossible to define its semantics.
void add(const TableDesc &other, Bool addKeywordSet=True)
Add another table description to this table description.
void adjustHypercolumns(const std::map< String, String > &old2new, Bool keepUnknownData=False, Bool keepUnknownCoord=False, Bool keppUnknownId=False)
Adjust the hypercolumn definitions (for a RefTable).
void removeIDhypercolumns(const Vector< String > &hcNames)
Remove ID-columns from the given hypercolumn definitions and set their default data manager type to I...
Bool isHypercolumn(const String &hypercolumnName) const
Test if the given hypercolumn exists.
TableRecord * key_p
Definition TableDesc.h:481
~TableDesc()
The destructor writes the table description if changed.
void renameColumn(const String &newname, const String &oldname)
Rename a column.
void copy(const TableDesc &, const TabPath &, Bool copyColumns)
Initialize and copy a table description.
Vector< String > columnNames() const
Get a vector containing all column names.
const TableRecord & privateKeywordSet() const
Get readonly access to the private set of keywords.
Definition TableDesc.h:530
TableRecord * privKey_p
Definition TableDesc.h:482
const String & comment() const
Get comment string.
Definition TableDesc.h:548
void renameHypercolumn(const String &newHypercolumnName, const String &hypercolumnName)
ColumnDesc & rwColumnDesc(const String &name)
Definition TableDesc.h:518
TableDesc(const TableDesc &, const String &type, const String &version, const TabPath &, TDOption, Bool copyColumns=True)
Create a table description object with the given name (i.e.
uInt hypercolumnDesc(const String &hypercolumnName, Vector< String > &dataColumnNames, Vector< String > &coordColumnNames, Vector< String > &idColumnNames) const
Get the columns involved in a hypercolumn.
TableDesc(const String &type, const String &version, const TabPath &, TDOption=Old)
Create a table description object.
Bool isColumn(const String &name) const
Test if a column with this name exists.
Definition TableDesc.h:511
static Bool isReadable(const String &tableDescName)
Test if a description file exists (i.e.
TableRecord & rwKeywordSet()
Get access to the keyword set.
Definition TableDesc.h:528
void getFile(AipsIO &, const TableAttr &)
Get the table description from the file.
Vector< String > hypercolumnNames() const
Get the names of all hypercolumns.
void show(ostream &os) const
Show the table description.
void defineHypercolumn(const String &hypercolumnName, uInt ndim, const Vector< String > &dataColumnNames, const Vector< String > &coordColumnNames, const Vector< String > &idColumnNames)
void show() const
Show the table description on cout.
ColumnDesc & addColumn(const ColumnDesc &)
Add a column to the table description.
Definition TableDesc.h:536
void init(const TabPath &)
Initialize the table description.
void defineHypercolumn(const String &hypercolumnName, uInt ndim, const Vector< String > &dataColumnNames)
Define a hypercolumn.
const ColumnDescSet & columnDescSet() const
Get access to the set of column descriptions.
Definition TableDesc.h:533
void removeHypercolumnDesc(const String &hypercolumnName)
Remove given hypercolumn definition.
TableDesc(const TableDesc &, const String &type, const String &version, TDOption, Bool copyColumns=True)
Create a table description object with the given name (i.e.
void putFile(AipsIO &, const TableAttr &) const
Put the table description into the file.
const TableRecord & keywordSet() const
Definition TableDesc.h:529
const String & getType() const
Get the table type (i.e.
Definition TableDesc.h:522
TableDesc(const TableDesc &, TDOption=Scratch)
This copy constructor makes a copy of the table description maintaining its name and version.
void removeColumn(const String &name)
Remove a column.
Definition TableDesc.h:545
TableDesc(const String &type, const String &version, TDOption=Old)
Create a table description object with the given name (i.e.
void throwHypercolumn(const String &hyperColumnName, const String &message)
Throw an invalid hypercolumn exception.
const ColumnDesc & columnDesc(const String &name) const
Get the column description by name or by index.
Definition TableDesc.h:514
const String & version() const
Get the table description version.
Definition TableDesc.h:525
TableDesc()
The default constructor creates a table description with option = Scratch and a blank name.
ColumnDescSet col_p
Definition TableDesc.h:483
void defineHypercolumn(const String &hypercolumnName, uInt ndim, const Vector< String > &dataColumnNames, const Vector< String > &coordColumnNames)
TableDesc(const String &type, TDOption=Old)
Create a table description object with the given name.
const ColumnDesc & operator[](const String &name) const
Definition TableDesc.h:515
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
unsigned int uInt
Definition aipstype.h:49
String name() const
Return the name of the field.
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
const Bool True
Definition aipstype.h:41