casa
$Rev:20696$
|
00001 //# TiledFileHelper.h: Helper class for tiled access to an array in a file 00002 //# Copyright (C) 2001,2002 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id: TiledFileHelper.h 20859 2010-02-03 13:14:15Z gervandiepen $ 00027 00028 #ifndef TABLES_TILEDFILEHELPER_H 00029 #define TABLES_TILEDFILEHELPER_H 00030 00031 00032 //# Includes 00033 #include <tables/Tables/TiledStMan.h> 00034 #include <tables/Tables/TableDesc.h> 00035 00036 00037 namespace casa { //# NAMESPACE CASA - BEGIN 00038 00039 // <summary> 00040 // Helper class for tiled access to an array in a file. 00041 // </summary> 00042 00043 // <use visibility=local> 00044 00045 // <reviewed reviewer="" date="" tests="tTiledFileAccess.cc"> 00046 // </reviewed> 00047 00048 // <prerequisite> 00049 //# Classes you should understand before using this one. 00050 // <li> Description of Tiled Storage Manager in module file 00051 // <linkto module=Tables:TiledStMan>Tables.h</linkto> 00052 // </prerequisite> 00053 00054 // <synopsis> 00055 // TiledFileHelper is a helper class for class 00056 // <linkto class=TiledFileAccess>TiledFileAccess</linkto>. 00057 // It sets up a table description containing one array column 00058 // to make it possible to use the 00059 // <linkto class=TiledStMan>tiled storage manager</linkto> 00060 // to access an array in an arbitrary file. 00061 // </synopsis> 00062 00063 // <motivation> 00064 // This class was created to be able to read an image in a FITS file. 00065 // </motivation> 00066 00067 //# <todo asof="$DATE:$"> 00068 //# A List of bugs, limitations, extensions or planned refinements. 00069 //# </todo> 00070 00071 00072 class TiledFileHelper : public TiledStMan 00073 { 00074 public: 00075 // Create a TiledFileHelper object. 00076 // Tell if the data is stored in big or little endian canonical format. 00077 TiledFileHelper (const String& fileName, const IPosition& shape, 00078 DataType dtype, const TSMOption&, 00079 Bool writable, Bool bigEndian); 00080 00081 ~TiledFileHelper(); 00082 00083 virtual const TableDesc& getDesc() const; 00084 00085 TSMFile* file() 00086 { return fileSet_p[0]; } 00087 00088 // Return the class name. 00089 virtual String dataManagerType() const; 00090 00091 // These functions are pure virtual, but not needed here. 00092 // They throw an exception. 00093 // <group> 00094 virtual DataManager* clone() const; 00095 virtual Bool flush (AipsIO&, Bool); 00096 virtual void create (uInt); 00097 virtual TSMCube* getHypercube (uInt); 00098 virtual TSMCube* getHypercube (uInt, IPosition&); 00099 virtual void readHeader (uInt, Bool); 00100 // </group> 00101 00102 private: 00103 // Forbid copy constructor and assignment. 00104 // <group> 00105 TiledFileHelper (const TiledFileHelper&); 00106 TiledFileHelper& operator= (const TiledFileHelper&); 00107 // </group> 00108 00109 00110 TableDesc itsDesc; 00111 }; 00112 00113 00114 00115 } //# NAMESPACE CASA - END 00116 00117 #endif