00001 /* 00002 * The information in this file is 00003 * Copyright(c) 2007 Ball Aerospace & Technologies Corporation 00004 * and is subject to the terms and conditions of the 00005 * GNU Lesser General Public License Version 2.1 00006 * The license text is available from 00007 * http://www.gnu.org/licenses/lgpl.html 00008 */ 00009 00010 #ifndef HDFPAGER_H 00011 #define HDFPAGER_H 00012 00013 #include "CachedPager.h" 00014 00015 #include <string> 00016 00017 /** 00018 * This base class is a raster pager for all HDF files. It provides a specification 00019 * for HDF4 and HDF5 pagers. 00020 * 00021 * @see Hdf4Pager, Hdf5Pager 00022 */ 00023 class HdfPager : public CachedPager 00024 { 00025 public: 00026 /** 00027 * Creates an HdfPager plug-in. 00028 */ 00029 HdfPager(); 00030 00031 /** 00032 * Creates an input argument list for the HdfAccessor plug-in. 00033 * 00034 * @param pIn 00035 * The input argument list that is created. 00036 * 00037 * @return TRUE if the operation succeeds, FALSE otherwise. 00038 */ 00039 bool getInputSpecification(PlugInArgList*& pIn); 00040 00041 protected: 00042 /** 00043 * A constant that represents an invalid handle in all forms of the HDF C API. 00044 */ 00045 static const int INVALID_HANDLE; 00046 00047 /** 00048 * Parses and extracts input arguments. 00049 * 00050 * @param pIn 00051 * The argument list to parse. Cannot be NULL. 00052 * 00053 * @return TRUE if the values were properly extracted from the argument list, FALSE otherwise. 00054 */ 00055 bool parseInputArgs(PlugInArgList* pIn); 00056 00057 /** 00058 * Returns the name of the HDF dataset. 00059 * 00060 * The HDF dataset name is one of the input arguments. Gets populated from parseInputArgs(PlugInArgList*). 00061 * 00062 * @return The name of the HDF dataset. For HDF4 data sets, this will be a name. For HDF5 datasets, 00063 * this will be the full path and name that uniquely identifies the dataset. 00064 */ 00065 const std::string& getHdfDatasetName() const; 00066 00067 /** 00068 * Closes the HDF file. 00069 * 00070 * The HDF File is opened in the subclasses. 00071 */ 00072 virtual void closeFile() = 0; 00073 00074 private: 00075 HdfPager& operator=(const HdfPager& rhs); 00076 00077 std::string mHdfName; 00078 }; 00079 00080 #endif