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