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