Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

gasparFileIO.hpp

Go to the documentation of this file.
00001 //************************************************************************************//
00002 // Module       : gasparFileIO.hpp
00003 // Date         : 8/02/02 (RMP)
00004 // Copyright    : 2002-2006 Copyright University Corporation for Atmospheric
00005 //                Research
00006 // Description  : Encapsulates the methods and data associated with
00007 //                Gaspar file IO.
00008 // Derived From : none.
00009 // Modifications:
00010 //************************************************************************************//
00011 
00012 #if !defined(GASPARFILEIO_HPP)
00013 #define GASPARFILEIO_HPP
00014 
00015 
00016 #include "mpi.h"
00017 #include "hdf5.h"
00018 #include "gasparFile.hpp"
00019 #include "hdfFile.hpp" 
00020 #include "gtypes.h"
00021 #include <iostream.h>
00022 #include <string.h>
00023 
00024 class GasparFileIO{
00025 
00026 public:
00027   
00028   //public methods:
00029   GBOOL openFile(GasparFile* inFile, const FILE_ACCESS accessIn);
00030   GBOOL openHDF(const char* fileNameIn, const FILE_ACCESS accessIn, IO_TYPE fType = COLLECTIVE_IO, IO_TYPE dType = INDEPENDENT_IO, 
00031                           MPI_Comm commIn = MPI_COMM_WORLD);
00032   GBOOL closeFile();
00033 
00034 protected:
00035 
00036   //protected data:
00037 
00038   enum DATA_TYPE {FAIL, SEVECTOR, SEMATRIX};           //Data set type tag stored in file metadata
00039   static const char* DTYPE_META_NAME;                  //Name suffix used to ID data type meta data in file
00040 
00041   //protected methods:
00042 
00043   GasparFileIO(){}
00044   GasparFile* getFile(){ return file; }
00045   void setFile(GasparFile* fileIn){ file = fileIn; }
00046   GBOOL isOpen() const { return openStatus; }
00047   void setOpenStatus(GBOOL statusIn){ openStatus = statusIn; }
00048 
00049 private:
00050 
00051   //private data:  
00052   GBOOL openStatus;
00053   GasparFile* file;
00054   static const char* THIS;                             //Class name used in error messages
00055 };
00056 #endif

Generated on Wed Dec 21 16:00:48 2005 for Geophysics & Astrophysics Spectral Element Adaptive Refinement (GASpAR) 2D Code by  doxygen 1.4.4