casacore
Loading...
Searching...
No Matches
MSSource.h
Go to the documentation of this file.
1// # MSSource.h: The MeasurementSet SOURCE Table
2// # Copyright (C) 1996,1999,2000
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 MS_MSSOURCE_H
27#define MS_MSSOURCE_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/ms/MeasurementSets/MSTable.h>
31#include <casacore/ms/MeasurementSets/MSSourceEnums.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// A Table intended to hold a MeasurementSet SOURCE table.
37// </summary>
38
39// <use visibility=export>
40
41// <reviewed reviewer="Bob Garwood" date="1997/02/01" tests="" demos="">
42
43// <prerequisite>
44// <li> <linkto class="MeasurementSet:description">MeasurementSet</linkto>
45// <li> <linkto class="MSTable">MSTable</linkto>
46// </prerequisite>
47//
48// <etymology>
49// MSSource stands for the MeasurementSet Source table.
50// </etymology>
51//
52// <synopsis>
53// An MSSource is a table intended to hold the SOURCE table for
54// the MeasurementSet. It has an identical set of member functions as
55// the main MeasurementSet class. For further info and examples see the
56// MeasurementSet class.
57// </synopsis>
58//
59// <example>
60// See the MeasurementSet for an example of how to access and use this class.
61// </example>
62//
63// <motivation>
64// It was found that subtables and the main table of the MeasurementSet have
65// a lot in common, therefore they derive their interface from the same
66// base class. Each subtable has its own class to keep the enum definitions
67// and conversion functions in separate scopes.
68// </motivation>
69//
70// <todo asof="1999/01/16">
71// see MeasurementSet.
72// </todo>
73
74class MSSource : public MSSourceEnums, public MSTable<MSSourceEnums> {
75 public:
76 // This constructs an empty MSSource.
78
79 // These constructors mirror the Table ones with additional checking
80 // on validity (verifying that the MSSource will have the required columns
81 // and keywords)
82 // An exception is thrown if the constructed Table is not a valid MSSource
83 // <thrown>
84 // <li> AipsError
85 // </thrown>
86 // <group name=tableLikeConstructors>
88 MSSource(const String &tableName, const String &tableDescName, TableOption = Table::Old);
89 MSSource(SetupNewTable &newTab, rownr_t nrrow = 0, Bool initialize = False);
90 MSSource(const Table &table);
91 MSSource(const MSSource &other);
92 // </group>
93
94 // As with tables, the destructor writes the table if necessary.
95 // Additional checking is done here to verify that all required
96 // columns are still present.
97 // If it is NOT valid, it will write the table and then throw an exception.
98 // <thrown>
99 // <li> AipsError
100 // </thrown>
102
103 // Assignment operator, reference semantics
105
106 // Make a special copy of this Table which references all columns from
107 // this Table except those mentioned; those are empty and writable.
108 // Each forwarded column has the same writable status as the underlying
109 // column. The mentioned columns all use the AipsIO storage manager.
110 // This function is inherited from MSTable and unlikely to be of use,
111 // except in the class MeasurementSet (see comment there)..
112 MSSource referenceCopy(const String &newTableName, const Block<String> &writableColumns) const;
113
114 // Initialize the statics appropriately. This does not need to be
115 // called by users, it is called by the implementation class
116 // MSTableImpl.
118
119 private:
120 // required by the need to throw an exception in the destructor
122};
123
124} // namespace casacore
125
126#endif
Enums for the MeasurementSet SOURCE table.
MSSource(SetupNewTable &newTab, rownr_t nrrow=0, Bool initialize=False)
MSSource(const MSSource &other)
Bool hasBeenDestroyed_p
required by the need to throw an exception in the destructor
Definition MSSource.h:121
MSSource & operator=(const MSSource &)
Assignment operator, reference semantics.
MSSource(const Table &table)
static MSTableMaps initMaps()
Initialize the statics appropriately.
~MSSource()
As with tables, the destructor writes the table if necessary.
MSSource(const String &tableName, TableOption=Table::Old)
These constructors mirror the Table ones with additional checking on validity (verifying that the MSS...
MSSource()
This constructs an empty MSSource.
MSSource(const String &tableName, const String &tableDescName, TableOption=Table::Old)
MSSource referenceCopy(const String &newTableName, const Block< String > &writableColumns) const
Make a special copy of this Table which references all columns from this Table except those mentioned...
Create a new table - define shapes, data managers, etc.
String: the storage and methods of handling collections of characters.
Definition String.h:355
const String & tableName() const
Get the table name.
Definition Table.h:1121
TableOption
Define the possible options how a table can be opened.
Definition Table.h:168
@ Old
existing table
Definition Table.h:170
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44