bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
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: Kent Yang <myang6@hdfgroup.org>
8// Copyright (c) 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 = nullptr):
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 ~ HDFSPArray_VDField () override = default;
33
34 // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
35 // Return the number of elements to read.
36 int format_constraint (int *cor, int *step, int *edg);
37
38 libdap::BaseType *ptr_duplicate () override
39 {
40 return new HDFSPArray_VDField (*this);
41 }
42
43 bool read () override;
44
45 private:
46
47 // Field array rank
48 int rank;
49
50 std::string filename;
51
52 // file id
53 int32 fileid;
54
55 // Vdata reference number
56 int32 vdref;
57
58 // data type
59 int32 dtype;
60
61 // field order
62 int32 fdorder;
63
64 // field name
65 std::string fdname;
66};
67
68
69#endif