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

gbin_reader.hpp

Go to the documentation of this file.
00001 //************************************************************************************//
00002 // Module       : gbin_reader.hpp
00003 // Date         : 10/17/02 (DLR)
00004 // Copyright    : 2002-2006 Copyright University Corporation for Atmospheric
00005 //                Research
00006 // Description  : Encapsulates the methods and data associated with
00007 //                the object that reads a GASpAR binary data file
00008 // Derived From : GBinStream
00009 // Modifications:
00010 //************************************************************************************//
00011 #if !defined(GBIN_READER_HPP)
00012 #define GBIN_READER_HPP 
00013 #include "gtypes.h"
00014 #include "gdd_file.h"
00015 #include "gbin_stream.hpp"
00016 #include "point.hpp"
00017 #include <iostream.h>
00018 #include <fstream.h>
00019 
00020 class GBinReader: public GBinStream
00021 {
00022 public:
00023                           GBinReader(GBOOL isCollective=FALSE, GBOOL isIndependent=TRUE, GSHORT  ioTaskID=0);
00024 //                        GBinReader(const GBinReader &);
00025                          ~GBinReader();
00026 
00027          enum             GBR_TypeSz {GBR_GINT =0, GBR_GSHORT , GBR_GDOUBLE, GBR_ELEM_SZ, GBR_GFPOS_SZ};
00028 
00029          GBOOL            Open(const char *);
00030          void             Close();
00031          GINT             GetDatatypeSz(GBR_TypeSz itype);
00032          GINT             GetNumDataSets();
00033          char            *GetMetaDesc();
00034          GINT             GetNumMeta();
00035          GDOUBLE         *GetMeta();
00036          const char      *GetLabel(GINT  idataset);
00037          GINT             GetNumTags(GINT  idataset);
00038          GDOUBLE         *GetTags(GINT  idataset);
00039          GFPOS            GetOffsets(GINT  idataset);
00040          ELEMTYPE         GetElemTypes(GINT  idataset);
00041          GINT             GetRank(GINT  idataset);
00042          GINT             GetDims(GINT  idataset, GINT  idir);
00043          GINT            *GetDims(GINT  idataset);
00044          GINT             GetCoordDims(GINT  idataset, GINT  idir);
00045          Point3D         *GetVert(GINT  idataset);
00046          GINT             GetNumVert(GINT  idataset);
00047          GDOUBLE         *GetGridData (GINT  idataset, GINT  idir, GDOUBLE *x, GINT  n);
00048          GDOUBLE         *GetFieldData(GINT  idataset, GDOUBLE *data, GINT  n);
00049          GDOUBLE         *GetFieldData(const char *label, GINT  ids_start, GDOUBLE *data, GINT  n);
00050 
00051 private:
00052 //    methods:
00053          GBOOL            GetFileInfo();
00054          GBOOL            GetDSInfo(GINT  dsid);
00055          GBOOL            CreateDynamic(GINT  ndatasets);
00056          void             DeleteDynamic();
00057 
00058 //    data:
00059          GINT           ndatasets_;
00060          GINT           *nd_;
00061          GSHORT         *procid_;
00062          GINT           *nvv_;
00063          GINT           *nTag_;
00064          GINT4BYTE      nMeta_;
00065          GDOUBLE        *fMeta_;
00066          GDOUBLE        **fTag_;
00067          GFPOS          *dsoffsets_;
00068          GFPOS          *dataoffsets_;
00069          GFPOS          *coordoffsets_;
00070          ELEMTYPE       *elemtps_;
00071          GINT           **idims_;
00072          GINT           **cdims_;
00073          Point3D        **Vert_;     
00074          char           **sTag_;   
00075          char           *sMeta_;   
00076          char           *identifier_;   
00077  
00078 };
00079 
00080 #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