OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
HDFSPArray_VDField.h
Go to the documentation of this file.
1 // This file is part of the hdf4 data handler for the OPeNDAP data server.
3 // It retrieves the Vdata fields from NASA HDF4 data products.
4 // Each Vdata will be decomposed into individual Vdata fields.
5 // Each field will be mapped to A DAP variable.
6 
7 // Authors: MuQun Yang <myang6@hdfgroup.org>
8 // Copyright (c) 2010-2012 The HDF Group
10 
11 #ifndef HDFSPARRAY_VDFIELD_H
12 #define HDFSPARRAY_VDFIELD_H
13 
14 #include "hdf.h"
15 #include "mfhdf.h"
16 
17 #include "Array.h"
18 using namespace libdap;
19 
20 class HDFSPArray_VDField:public Array
21 {
22  public:
23  HDFSPArray_VDField (int vdrank, const std::string& filename, const int fileid, int32 objref, int32 dtype, int32 fieldorder, const std::string & fieldname, const std::string & n = "", BaseType * v = 0):
24  Array (n, v),
25  rank (vdrank),
26  filename(filename),
27  fileid (fileid),
28  vdref (objref),
29  dtype (dtype),
30  fdorder (fieldorder),
31  fdname (fieldname) {
32  }
33  virtual ~ HDFSPArray_VDField ()
34  {
35  }
36 
37  // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
38  // Return the number of elements to read.
39  int format_constraint (int *cor, int *step, int *edg);
40 
41  BaseType *ptr_duplicate ()
42  {
43  return new HDFSPArray_VDField (*this);
44  }
45 
46  virtual bool read ();
47 
48  private:
49 
50  // Field array rank
51  int rank;
52 
53  std::string filename;
54 
55  // file id
56  int32 fileid;
57 
58  // Vdata reference number
59  int32 vdref;
60 
61  // data type
62  int32 dtype;
63 
64  // field order
65  int32 fdorder;
66 
67  // field name
68  std::string fdname;
69 };
70 
71 
72 #endif
BaseType * ptr_duplicate()
static class NCMLUtil overview
HDFSPArray_VDField(int vdrank, const std::string &filename, const int fileid, int32 objref, int32 dtype, int32 fieldorder, const std::string &fieldname, const std::string &n="", BaseType *v=0)