//# VirtArrCol.tcc: Base virtual column data manager class //# Copyright (C) 1994,1995,1996,1999,2000 //# 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 TABLES_VIRTARRCOL_TCC #define TABLES_VIRTARRCOL_TCC //# Includes #include #include #include #include #include #include #include #include namespace casacore { //# NAMESPACE CASACORE - BEGIN template VirtualArrayColumn::~VirtualArrayColumn() {} template int VirtualArrayColumn::dataType() const { return ValType::getType (static_cast(0)); } template String VirtualArrayColumn::dataTypeId() const { return valDataTypeId (static_cast(0)); } template void VirtualArrayColumn::getArrayV (rownr_t rownr, ArrayBase& array) { getArray (rownr, static_cast&>(array)); } template void VirtualArrayColumn::putArrayV (rownr_t rownr, const ArrayBase& array) { putArray (rownr, static_cast&>(array)); } template void VirtualArrayColumn::getSliceV (rownr_t rownr, const Slicer& slicer, ArrayBase& array) { getSlice (rownr, slicer, static_cast&>(array)); } template void VirtualArrayColumn::putSliceV (rownr_t rownr, const Slicer& slicer, const ArrayBase& array) { putSlice (rownr, slicer, static_cast&>(array)); } template void VirtualArrayColumn::getArrayColumnV (ArrayBase& array) { getArrayColumn (static_cast&>(array)); } template void VirtualArrayColumn::putArrayColumnV (const ArrayBase& array) { putArrayColumn (static_cast&>(array)); } template void VirtualArrayColumn::getArrayColumnCellsV (const RefRows& rownrs, ArrayBase& array) { getArrayColumnCells (rownrs, static_cast&>(array)); } template void VirtualArrayColumn::putArrayColumnCellsV (const RefRows& rownrs, const ArrayBase& array) { putArrayColumnCells (rownrs, static_cast&>(array)); } template void VirtualArrayColumn::getColumnSliceV (const Slicer& slicer, ArrayBase& array) { getColumnSlice (slicer, static_cast&>(array)); } template void VirtualArrayColumn::putColumnSliceV (const Slicer& slicer, const ArrayBase& array) { putColumnSlice (slicer, static_cast&>(array)); } template void VirtualArrayColumn::getColumnSliceCellsV (const RefRows& rownrs, const Slicer& slicer, ArrayBase& array) { getColumnSliceCells (rownrs, slicer, static_cast&>(array)); } template void VirtualArrayColumn::putColumnSliceCellsV (const RefRows& rownrs, const Slicer& slicer, const ArrayBase& array) { putColumnSliceCells (rownrs, slicer, static_cast&>(array)); } //# The default implementations of get/putSlice get the entire array //# and access the required slice. template void VirtualArrayColumn::getSlice (rownr_t rownr, const Slicer& slicer, Array& arraySlice) { getSliceBase (rownr, slicer, arraySlice); } template void VirtualArrayColumn::putSlice (rownr_t rownr, const Slicer& slicer, const Array& arraySlice) { putSliceBase (rownr, slicer, arraySlice); } //# The default implementations of get/putArrayColumn handle the //# array in each individual row. template void VirtualArrayColumn::getArrayColumn (Array& array) { getArrayColumnBase (array); } template void VirtualArrayColumn::putArrayColumn (const Array& array) { putArrayColumnBase (array); } //# The default implementations of get/putColumnSlice take a slice //# for each individual row. template void VirtualArrayColumn::getColumnSlice (const Slicer& slicer, Array& array) { getColumnSliceBase (slicer, array); } template void VirtualArrayColumn::putColumnSlice (const Slicer& slicer, const Array& array) { putColumnSliceBase (slicer, array); } //# The default implementations of the Cells functions throw an exception. template void VirtualArrayColumn::getArrayColumnCells (const RefRows& rownrs, Array& value) { getArrayColumnCellsBase (rownrs, value); } template void VirtualArrayColumn::putArrayColumnCells (const RefRows& rownrs, const Array& value) { putArrayColumnCellsBase (rownrs, value); } template void VirtualArrayColumn::getColumnSliceCells (const RefRows& rownrs, const Slicer& ns, Array& value) { getColumnSliceCellsBase (rownrs, ns, value); } template void VirtualArrayColumn::putColumnSliceCells (const RefRows& rownrs, const Slicer& ns, const Array& value) { putColumnSliceCellsBase (rownrs, ns, value); } //# The default implementation of the put function throws //# an exception. template void VirtualArrayColumn::putArray (rownr_t, const Array&) { throw DataManInvOper ("VirtualArrayColumn::putArray not possible" " for column " + columnName()); } } //# NAMESPACE CASACORE - END #endif