bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDFCFStrField.h
1
2// This file is part of the hdf4 data handler for the OPeNDAP data server.
3// It retrieves the HDF4 DFNT_CHAR >1D array and then send to DAP as a DAP string array for the CF option.
4// Authors: Kent Yang <myang6@hdfgroup.org> Eunsoo Seo
5// Copyright (c) The HDF Group
7
8#ifndef HDFCFSTR_FIELD_H
9#define HDFCFSTR_FIELD_H
10
11#include <libdap/Array.h>
12#include "HDFCFUtil.h"
13
14
15class HDFCFStrField:public libdap::Array
16{
17 public:
18 HDFCFStrField (int rank,
19 const std::string & filename,
20 bool is_vdata,
21 const int h4fd,
22 int32 fieldref,
23 int32 fieldorder,
24 const std::string & fieldname,
25 const std::string & n = "",
26 libdap::BaseType * v = nullptr):
27 Array (n, v),
28 rank (rank),
29 filename(filename),
30 is_vdata(is_vdata),
31 h4fd(h4fd),
32 fieldref(fieldref),
33 fieldorder(fieldorder),
34 fieldname(fieldname)
35 {
36 }
37
38 ~ HDFCFStrField () override = default;
39
40 // Standard way to pass the coordinates of the subsetted region from the client to the handlers
41 int format_constraint (int *cor, int *step, int *edg);
42
43 BaseType *ptr_duplicate () override
44 {
45 return new HDFCFStrField (*this);
46 }
47
48 // Read the data.
49 bool read () override;
50
51 private:
52
53 // Field array rank
54 int rank;
55
56 // file name
57 std::string filename;
58
59 bool is_vdata;
60
61 int h4fd;
62
63 int32 fieldref;
64
65 int32 fieldorder;
66
67 // field name
68 std::string fieldname;
69
70};
71
72
73#endif