bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDF5_DDS.h
1
2// This file is part of the hdf4 data handler for the OPeNDAP data server.
3//
4// Author: Kent Yang <myang6@hdfgroup.org>
5// Copyright (c) 2010-2012 The HDF Group
6// The idea is borrowed from HDF4 OPeNDAP handler that is implemented by
7// James Gallagher<jgallagher@opendap.org>
8
9#ifndef HDF5_DDS_H_
10#define HDF5_DDS_H_
11
12#include "config_hdf5.h"
13
14
15#include "hdf5.h"
16
17
18#include <libdap/DDS.h>
19#include <libdap/InternalErr.h>
20
21
37class HDF5DDS : public libdap::DDS {
38private:
39 hid_t fileid = -1;
40
41 void m_duplicate(const HDF5DDS &src)
42 {
43 fileid = src.fileid;
44 }
45
46public:
47 explicit HDF5DDS( const libdap::DDS *ddsIn) : libdap::DDS(*ddsIn) {}
48
49 HDF5DDS(const HDF5DDS &rhs) : libdap::DDS(rhs) {
50 m_duplicate(rhs);
51 }
52
53 HDF5DDS & operator= (const HDF5DDS &rhs) {
54 if (this == &rhs)
55 return *this;
56
57 libdap::DDS::operator=(rhs);
58
59 m_duplicate(rhs);
60
61 return *this;
62 }
63
64 ~HDF5DDS() override {
65
66 if (fileid != -1)
67 H5Fclose(fileid);
68
69 }
70
71 // I think this should be set_fileid(...). jhrg 2/18/16
72 void setHDF5Dataset(const hid_t fileid_in) {
73 fileid = fileid_in;
74 }
75
76};
77
78#endif
79
80
81