bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDFDMRArray_VD.h
1
2// This file is part of the hdf4 data handler for the OPeNDAP data server.
3// It retrieves HDF4 Vdata values for a direct DMR-mapping DAP4 response.
4// Each Vdata will be mapped to a DAP variable.
5
6// Authors: Kent Yang <myang6@hdfgroup.org>
7// Copyright (c) The HDF Group
9
10#ifndef HDFDMRARRAY_VD_H
11#define HDFDMRARRAY_VD_H
12
13#include "hdf.h"
14
15#include <libdap/Array.h>
16
17class HDFDMRArray_VD:public libdap::Array
18{
19 public:
20 HDFDMRArray_VD (const std::string& filename, int32 objref, const std::string & n = "", libdap::BaseType * v = nullptr):
21 Array (n, v),
22 filename(filename),
23 vdref (objref) {
24 }
25 ~ HDFDMRArray_VD () override = default;
26
27 // Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
28 // Return the number of elements to read.
29 int format_constraint (int *cor, int *step, int *edg);
30
31 libdap::BaseType *ptr_duplicate () override
32 {
33 return new HDFDMRArray_VD (*this);
34 }
35
36 bool read () override;
37 void set_rank(int32 vd_rank) { rank = vd_rank; }
38
39 friend class HDFStructure;
40
41 private:
42
43 // Field array rank
44 int rank = 1;
45
46 std::string filename;
47
48 // Vdata reference number
49 int32 vdref;
50
51 void read_one_field_vdata(int32 vdata_id,const vector<int>&offset, const vector<int>&count, const vector<int>&step, int nelms);
52 void read_multi_fields_vdata(int32 vdata_id,const vector<int>&offset, const vector<int>&count, const vector<int>&step, int nelms);
53
54};
55
56
57#endif
STL class.