VAPoR  0.1
DCReader.h
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 
5 
6 #ifndef _DCReader_h_
7 #define _DCReader_h_
8 
9 #include <vector>
10 #include <algorithm>
11 #include <vapor/Metadata.h>
12 #include <vapor/MyBase.h>
13 #include <vapor/common.h>
14 
15 namespace VAPoR {
16 
17 //
29 class VDF_API DCReader : public Metadata, public VetsUtil::MyBase {
30 public:
31 
32  virtual ~DCReader() {};
33 
68  virtual int OpenVariableRead(
69  size_t timestep, string varname, int reflevel=0, int lod=0
70  ) = 0;
71 
75  //
76  virtual int CloseVariable() = 0;
77 
99  //
100  virtual int ReadSlice(float *slice) = 0;
101 
121  virtual bool VariableExists(
122  size_t ts, string varname,int reflevel=0, int lod=0) const {
123  std::vector <string> v = GetVariableNames();
124  return((find(v.begin(), v.end(), varname)!=v.end())&&ts<GetNumTimeSteps());
125  }
126 
141  virtual void GetLatLonExtents(
142  size_t ts, double lon_exts[2], double lat_exts[2]
143  ) const = 0;
144 
145  virtual std::vector <string> GetVariables2DExcluded() const = 0;
146  virtual std::vector <string> GetVariables3DExcluded() const = 0;
147 
148 };
149 };
150 
151 #endif // _DCReader_h_
An abstract class for managing metadata for a collection of gridded data. The data collection may sup...
Definition: Metadata.h:34
virtual ~DCReader()
Definition: DCReader.h:32
#define VDF_API
Definition: common.h:61
virtual bool VariableExists(size_t ts, string varname, int reflevel=0, int lod=0) const
Definition: DCReader.h:121
VetsUtil base class.
Definition: MyBase.h:68