OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
HDF5_DDS.h
Go to the documentation of this file.
1 // 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 <DataDDS.h>
19 #include <InternalErr.h>
20 
21 using namespace libdap;
22 
38 class HDF5DDS : public DataDDS {
39 private:
40  hid_t fileid;
41 
42  void m_duplicate(const HDF5DDS &src)
43  {
44  fileid = src.fileid;
45  }
46 
47 public:
48  HDF5DDS(DataDDS *ddsIn) : DataDDS(*ddsIn), fileid(-1) {}
49 
50  HDF5DDS(const HDF5DDS &rhs) : DataDDS(rhs) {
51  m_duplicate(rhs);
52  }
53 
54  HDF5DDS & operator= (const HDF5DDS &rhs) {
55  if (this == &rhs)
56  return *this;
57 
58  m_duplicate(rhs);
59 
60  return *this;
61  }
62 
64 
65  if (fileid != -1)
66  H5Fclose(fileid);
67 
68  }
69 
70  void setHDF5Dataset(const hid_t fileid_in) {
71  fileid = fileid_in;
72  }
73 
74 };
75 
76 #endif
77 
78 
79 
~HDF5DDS()
Definition: HDF5_DDS.h:63
HDF5DDS(const HDF5DDS &rhs)
Definition: HDF5_DDS.h:50
static class NCMLUtil overview
HDF5DDS(DataDDS *ddsIn)
Definition: HDF5_DDS.h:48
This specialization of DDS is used to manage the 'resource' of the open HDF5 dataset handle so that t...
Definition: HDF5_DDS.h:38
void setHDF5Dataset(const hid_t fileid_in)
Definition: HDF5_DDS.h:70