bes Updated for version 3.20.13
HDFSPArray_VDField.h
1
2// 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 <libdap/Array.h>
18
19class HDFSPArray_VDField:public libdap::Array
20{
21 public:
22 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 = "", libdap::BaseType * v = 0):
23 Array (n, v),
24 rank (vdrank),
25 filename(filename),
26 fileid (fileid),
27 vdref (objref),
28 dtype (dtype),
29 fdorder (fieldorder),
30 fdname (fieldname) {
31 }
32 virtual ~ HDFSPArray_VDField ()
33 {
34 }
35
36 // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
37 // Return the number of elements to read.
38 int format_constraint (int *cor, int *step, int *edg);
39
40 libdap::BaseType *ptr_duplicate ()
41 {
42 return new HDFSPArray_VDField (*this);
43 }
44
45 virtual bool read ();
46
47 private:
48
49 // Field array rank
50 int rank;
51
52 std::string filename;
53
54 // file id
55 int32 fileid;
56
57 // Vdata reference number
58 int32 vdref;
59
60 // data type
61 int32 dtype;
62
63 // field order
64 int32 fdorder;
65
66 // field name
67 std::string fdname;
68};
69
70
71#endif