/usr/include/casacore/ms/MeasurementSets/MSTable.tcc is in casacore-dev 2.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | //# MSTable.cc: the class that hold measurements from telescopes
//# Copyright (C) 1996,1997,2000,2001,2002
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id$
#ifndef MS_MSTABLE_TCC
#define MS_MSTABLE_TCC
#include <casacore/ms/MeasurementSets/MSTable.h>
#include <casacore/ms/MeasurementSets/MSTableImpl.h>
#include <casacore/tables/Tables/TableRecord.h>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
//# These statics cannot be compiled with egcs 1.0.3a.
#if !defined(__GNUG__) || (defined(__GNUG__) && (__GNUG__ == 2) && (__GNUC_MINOR__ >= 91)) || defined(AIPS_GCC)
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> MSTable<ColEnum,KeyEnum>::columnMap_p("");
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, Int> MSTable<ColEnum,KeyEnum>::colDTypeMap_p(TpOther);
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> MSTable<ColEnum,KeyEnum>::colCommentMap_p("");
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> MSTable<ColEnum,KeyEnum>::colUnitMap_p("");
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> MSTable<ColEnum,KeyEnum>::colMeasureTypeMap_p("");
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> MSTable<ColEnum,KeyEnum>::keywordMap_p("");
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, Int> MSTable<ColEnum,KeyEnum>::keyDTypeMap_p(TpOther);
template <class ColEnum, class KeyEnum>
SimpleOrderedMap<Int, String> MSTable<ColEnum,KeyEnum>::keyCommentMap_p("");
template <class ColEnum, class KeyEnum>
CountedPtr<TableDesc> MSTable<ColEnum,KeyEnum>::requiredTD_p;
#endif
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable() {}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(const String &tableName,
Table::TableOption option)
: Table(tableName, option)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(const String &tableName,
const TableLock& lockOptions,
Table::TableOption option)
: Table(tableName, lockOptions, option)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(const String& tableName,
const String &tableDescName,
Table::TableOption option)
: Table(tableName, tableDescName, option)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(const String& tableName,
const String &tableDescName,
const TableLock& lockOptions,
Table::TableOption option)
: Table(tableName, tableDescName, lockOptions, option)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(SetupNewTable &newTab, uInt nrrow,
Bool initialize)
: Table(MSTableImpl::setupCompression(newTab),
nrrow, initialize)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(SetupNewTable &newTab,
const TableLock& lockOptions,
uInt nrrow, Bool initialize)
: Table(MSTableImpl::setupCompression(newTab),
lockOptions, nrrow, initialize)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(const Table &table)
: Table(table)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::MSTable(const MSTable<ColEnum,KeyEnum> &other)
: Table(other)
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>::~MSTable()
{}
template <class ColEnum, class KeyEnum>
MSTable<ColEnum,KeyEnum>& MSTable<ColEnum,KeyEnum>::
operator=(const MSTable<ColEnum,KeyEnum>& other)
{
if (this != &other) Table::operator=(other);
return *this;
}
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::columnName(ColEnum which)
{
MSTableImpl::init(); return columnMap_p(which);
}
template <class ColEnum, class KeyEnum>
ColEnum MSTable<ColEnum,KeyEnum>::columnType(const String &name)
{ MSTableImpl::init(); return ColEnum(MSTableImpl::mapType(columnMap_p,name)); }
template <class ColEnum, class KeyEnum>
DataType MSTable<ColEnum,KeyEnum>::columnDataType(ColEnum which)
{ MSTableImpl::init(); return DataType(colDTypeMap_p(which)); }
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::columnStandardComment(ColEnum which)
{ MSTableImpl::init(); return colCommentMap_p(which); }
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::columnUnit(ColEnum which)
{ MSTableImpl::init(); return colUnitMap_p(which); }
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::columnMeasureType(ColEnum which)
{ MSTableImpl::init(); return colMeasureTypeMap_p(which); }
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::keywordName(KeyEnum which)
{ MSTableImpl::init(); return keywordMap_p(which); }
template <class ColEnum, class KeyEnum>
KeyEnum MSTable<ColEnum,KeyEnum>::keywordType(const String &name)
{ MSTableImpl::init(); return KeyEnum(MSTableImpl::mapType(keywordMap_p,name)); }
template <class ColEnum, class KeyEnum>
DataType MSTable<ColEnum,KeyEnum>::keywordDataType(KeyEnum which)
{ MSTableImpl::init(); return DataType(keyDTypeMap_p(which)); }
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::keywordStandardComment(KeyEnum which)
{ MSTableImpl::init(); return keyCommentMap_p(which); }
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::isColumn(ColEnum which) const
{ return tableDesc().isColumn(columnName(which)); }
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::isColumnWritable(ColEnum which) const
{ return Table::isColumnWritable(columnName(which)); }
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::isKeyword(KeyEnum which) const
{ return keywordSet().isDefined(keywordName(which)); }
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::isScalar(ColEnum which) const
{ return tableDesc().columnDesc(columnName(which)).isScalar(); }
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::isArray(ColEnum which) const
{ return tableDesc().columnDesc(columnName(which)).isArray(); }
template <class ColEnum, class KeyEnum>
const String& MSTable<ColEnum,KeyEnum>::unit(const String& which) const
{ return tableDesc().columnDesc(which).keywordSet().
asArrayString("QuantumUnits")(IPosition(1,0)); }
template <class ColEnum, class KeyEnum>
void MSTable<ColEnum,KeyEnum>::addColumnToDesc(TableDesc &td, ColEnum which,
Int ndim, const String& refCol)
{
MSTableImpl::addColumnToDesc(td,columnName(which),columnDataType(which),
columnStandardComment(which),
columnUnit(which),
columnMeasureType(which),
ndim,IPosition(),0,refCol);
}
template <class ColEnum, class KeyEnum>
void MSTable<ColEnum,KeyEnum>::addColumnToDesc(TableDesc &td, ColEnum which,
const IPosition& shape,
ColumnDesc::Option option,
const String& refCol)
{
MSTableImpl::addColumnToDesc(td,columnName(which),columnDataType(which),
columnStandardComment(which),
columnUnit(which),
columnMeasureType(which),
-1,shape,option,refCol);
}
template <class ColEnum, class KeyEnum>
void MSTable<ColEnum,KeyEnum>::addKeyToDesc(TableDesc& td, KeyEnum key)
{
MSTableImpl::addKeyToDesc(td,keywordName(key),keywordDataType(key),
keywordStandardComment(key));
}
template <class ColEnum, class KeyEnum>
void MSTable<ColEnum,KeyEnum>::addColumnCompression (TableDesc& td,
ColEnum which,
Bool autoScale,
const String& type)
{
MSTableImpl::addColumnCompression (td, columnName(which), autoScale, type);
}
template <class ColEnum, class KeyEnum>
void MSTable<ColEnum,KeyEnum>::colMapDef(ColEnum col,
const String& colName,
DataType colType,
const String& colComment,
const String& colUnit,
const String& colMeasureType)
{
MSTableImpl::colMapDef(columnMap_p,colDTypeMap_p,colCommentMap_p,
colUnitMap_p,colMeasureTypeMap_p,col,colName,
colType,colComment,colUnit,colMeasureType);
}
template <class ColEnum, class KeyEnum>
void MSTable<ColEnum,KeyEnum>::keyMapDef(KeyEnum key,
const String& keyName,
DataType keyType,
const String& keyComment)
{
MSTableImpl::keyMapDef(keywordMap_p,keyDTypeMap_p,keyCommentMap_p,
key,keyName,keyType,keyComment);
}
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::validate(const TableDesc& tabDesc)
{
MSTableImpl::init(); return MSTableImpl::validate(tabDesc,*requiredTD_p);
}
template <class ColEnum, class KeyEnum>
Bool MSTable<ColEnum,KeyEnum>::validate(const TableRecord& tabKeySet)
{
MSTableImpl::init(); return MSTableImpl::validate(tabKeySet,*requiredTD_p);
}
template <class ColEnum, class KeyEnum>
const TableDesc& MSTable<ColEnum,KeyEnum>::requiredTableDesc()
{
MSTableImpl::init(); return *requiredTD_p;
}
template <class ColEnum, class KeyEnum>
Table MSTable<ColEnum,KeyEnum>::referenceCopy(const String& newTableName,
const Block<String>& writableColumns) const
{
return MSTableImpl::referenceCopy(*this, newTableName, writableColumns);
}
} //# NAMESPACE CASACORE - END
#endif
|