casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalHistoryColumns.h
Go to the documentation of this file.
1 //# CalHistoryColumns.h: Calibration table cal_history column access
2 //# Copyright (C) 1996,1997,1998,2001,2003
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 adressed 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 //#
27 //# $Id$
28 
29 #ifndef CALIBRATION_CALHISTORYCOLUMNS_H
30 #define CALIBRATION_CALHISTORYCOLUMNS_H
31 
32 #include <casa/aips.h>
37 #include <msvis/MSVis/MSCalEnums.h>
38 
39 namespace casa { //# NAMESPACE CASA - BEGIN
40 
41 // <summary>
42 // ROCalHistoryColumns: Read-only cal_history calibration table column access
43 // </summary>
44 
45 // <use visibility=export>
46 
47 // <reviewed reviewer="" date="" tests="" demos="">
48 
49 // <prerequisite>
50 // <li> <linkto class="CalTable">CalTable</linkto> module
51 // </prerequisite>
52 //
53 // <etymology>
54 // From "read-only", "calibration history table" and "columns".
55 // </etymology>
56 //
57 // <synopsis>
58 // The ROCalHistoryColumns class allows read-only access to columns
59 // in the cal_history calibration sub-table.
60 // </etymology>
61 //
62 // <example>
63 // <srcblock>
64 // </srcblock>
65 // </example>
66 //
67 // <motivation>
68 // Encapsulate read-only access to cal_history calibration sub-table columns.
69 // </motivation>
70 //
71 // <todo asof="11/01/01">
72 // (i) Deal with non-standard columns.
73 // </todo>
74 
76 {
77  public:
78  // Construct from a cal_history calibration sub-table
79  ROCalHistoryColumns (const CalTable& calTable);
80 
81  // Default destructor
82  virtual ~ROCalHistoryColumns() {};
83 
84  // Read-only column accessors
89 
90  protected:
91  // Prohibit public use of the null constructor, which
92  // does not produce a usable object.
94 
95  // Return a CalTable cal_history subtable as a casacore::Table reference.
96  // Utilizes friendship relationship with class CalTable.
97  const casacore::Table& calHistoryAsTable(const CalTable& calTable)
98  {return calTable.calHistoryAsTable();}
99 
100  // Attach a table column accessor
101  void attach (const CalTable& calTable, casacore::TableColumn& tabCol,
102  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
103 
104  private:
105  // Prohibit copy constructor and assignment operator
108 
109  // Private column accessors
114 };
115 
116 // <summary>
117 // CalHistoryColumns: Read-write cal_history calibration table column access
118 // </summary>
119 
120 // <use visibility=export>
121 
122 // <reviewed reviewer="" date="" tests="" demos="">
123 
124 // <prerequisite>
125 // <li> <linkto class="CalTable">CalTable</linkto> module
126 // </prerequisite>
127 //
128 // <etymology>
129 // From "calibration history table" and "columns".
130 // </etymology>
131 //
132 // <synopsis>
133 // The CalHistoryColumns class allows read-write access to columns
134 // in the cal_history calibration sub-table.
135 // </etymology>
136 //
137 // <example>
138 // <srcblock>
139 // </srcblock>
140 // </example>
141 //
142 // <motivation>
143 // Encapsulate access to cal_history calibration sub-table columns.
144 // </motivation>
145 //
146 // <todo asof="01/07/01">
147 // (i) Deal with non-standard columns.
148 // </todo>
149 
151 {
152  public:
153  // Construct from a calibration table
154  CalHistoryColumns (CalTable& calTable);
155 
156  // Default destructor
157  virtual ~CalHistoryColumns() {};
158 
159  // Read-write column accessors
164 
165  protected:
166  // Prohibit public use of the null constructor, which
167  // does not produce a usable object.
169 
170  // Return a CalTable cal_history subtable as a casacore::Table reference.
171  // Utilizes friendship relationship with class CalTable.
173  {return calTable.calHistoryAsTable();}
174 
175  // Attach a table column accessor
176  void attach (CalTable& calTable, casacore::TableColumn& tabCol,
177  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
178 
179  private:
180  // Prohibit copy constructor and assignment operator
183 
184  // Private column accessors
189 
190 };
191 
192 
193 } //# NAMESPACE CASA - END
194 
195 #endif
196 
197 
198 
199 
200 
virtual ~CalHistoryColumns()
Default destructor.
casacore::Table & calHistoryAsTable()
Definition: CalTable.h:173
Main interface class to a read/write table.
Definition: Table.h:153
const casacore::ScalarColumn< casacore::String > & calTables() const
ROCalHistoryColumns: Read-only cal_history calibration table column access.
casacore::ScalarColumn< casacore::String > calParms_p
Private column accessors.
casacore::ScalarColumn< casacore::String > calSelect_p
void attach(CalTable &calTable, casacore::TableColumn &tabCol, MSCalEnums::colDef colEnum, const casacore::Bool &optional=false)
Attach a table column accessor.
casacore::ScalarColumn< casacore::String > & calNotes()
CalHistoryColumns & operator=(const CalHistoryColumns &)
const casacore::Table & calHistoryAsTable(const CalTable &calTable)
Return a CalTable cal_history subtable as a casacore::Table reference.
casacore::ScalarColumn< casacore::String > calNotes_p
CalTable: Calibration table access and creation.
Definition: CalTable.h:82
const casacore::ScalarColumn< casacore::String > & calSelect() const
virtual ~ROCalHistoryColumns()
Default destructor.
const casacore::ScalarColumn< casacore::String > & calNotes() const
casacore::ScalarColumn< casacore::String > calNotes_p
casacore::ScalarColumn< casacore::String > & calTables()
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::ScalarColumn< casacore::String > calParms_p
Private column accessors.
casacore::ScalarColumn< casacore::String > calTables_p
Read/write access to a table column.
Definition: TableColumn.h:98
ROCalHistoryColumns & operator=(const ROCalHistoryColumns &)
void attach(const CalTable &calTable, casacore::TableColumn &tabCol, MSCalEnums::colDef colEnum, const casacore::Bool &optional=false)
Attach a table column accessor.
CalHistoryColumns()
Prohibit public use of the null constructor, which does not produce a usable object.
colDef
Enumerate all relevant data fields (columns and keywords)
Definition: MSCalEnums.h:92
ROCalHistoryColumns()
Prohibit public use of the null constructor, which does not produce a usable object.
casacore::ScalarColumn< casacore::String > calSelect_p
CalHistoryColumns: Read-write cal_history calibration table column access.
casacore::ScalarColumn< casacore::String > & calSelect()
const casacore::ScalarColumn< casacore::String > & calParms() const
Read-only column accessors.
casacore::Table & calHistoryAsTable(CalTable &calTable)
Return a CalTable cal_history subtable as a casacore::Table reference.
casacore::ScalarColumn< casacore::String > & calParms()
Read-write column accessors.
casacore::ScalarColumn< casacore::String > calTables_p