bes  Updated for version 3.20.6
HDFSPArray_RealField.h
1 // This file is part of the hdf4 data handler for the OPeNDAP data server.
3 // It retrieves the real field values for some special NASA HDF data.
4 // Authors: MuQun Yang <myang6@hdfgroup.org>
5 // Copyright (c) 2010-2012 The HDF Group
7 
8 #ifndef HDFSPARRAY_REALFIELD_H
9 #define HDFSPARRAY_REALFIELD_H
10 
11 #include "mfhdf.h"
12 #include "hdf.h"
13 
14 #include "Array.h"
15 
16 #include "HDFSPEnumType.h"
17 #include "BESH4MCache.h"
18 
19 
20 class HDFSPArray_RealField:public libdap::Array
21 {
22  public:
23  HDFSPArray_RealField (int32 rank, const std::string& filename, const int sdfd, int32 fieldref, int32 dtype, SPType & sptype, const std::string & fieldname, const std::vector<int32> & h4_dimsizes, const std::string & n = "", libdap::BaseType * v = 0):
24  Array (n, v),
25  rank (rank),
26  filename(filename),
27  sdfd (sdfd),
28  fieldref (fieldref),
29  dtype (dtype),
30  sptype (sptype),
31  fieldname (fieldname),
32  dimsizes(h4_dimsizes) {
33  }
34  virtual ~ HDFSPArray_RealField ()
35  {
36  }
37  int format_constraint (int *cor, int *step, int *edg);
38 
39  libdap::BaseType *ptr_duplicate ()
40  {
41  return new HDFSPArray_RealField (*this);
42  }
43 
44  virtual bool read ();
45 
46  private:
47  int32 rank;
48  string filename;
49  int32 sdfd;
50  int32 fieldref;
51  int32 dtype;
52  SPType sptype;
53  std::string fieldname;
54  std::vector<int32>dimsizes;
55  //void write_data_to_cache(int32,const std::string&,short);
56  void write_data_to_cache(int32,const std::string&,short,const std::vector<char>&, int);
57  bool obtain_cached_data(BESH4Cache*,const std::string&, int,std::vector<int>&, std::vector<int>&,size_t,short);
58  template<typename T> int subset(const T input[],int,std::vector<int32>&,std::vector<int>&,std::vector<int>&,std::vector<int>&,std::vector<T>*,std::vector<int32>&,int);
59 #if 0
60 int subset(
61  const T input[],
62  int rank,
63  vector<int> & dim,
64  vector<int> & start,
65  vector<int> & stride,
66  vector<int> & edge,
67  std::vector<T> *poutput,
68  vector<int>& pos,
69  int index);
70 #endif
71 };
72 
73 
74 #endif
HDFSPArray_RealField::read
virtual bool read()
Definition: HDFSPArray_RealField.cc:29
HDFSPArray_RealField
Definition: HDFSPArray_RealField.h:20
BESH4Cache
Definition: BESH4MCache.h:16