bes
Updated for version 3.20.6
HDF4_DMR.h
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-2014 The HDF Group
6
// The idea is borrowed from GDAL OPeNDAP handler that is implemented by
7
// James Gallagher<jgallagher@opendap.org>
8
9
#ifndef HDF4_DMR_H_
10
#define HDF4_DMR_H_
11
12
#include "config.h"
13
14
#include "hdf.h"
15
#include "mfhdf.h"
16
17
#ifdef USE_HDFEOS2_LIB
18
#include "HdfEosDef.h"
19
#endif
20
21
#include <DMR.h>
22
#include <InternalErr.h>
23
24
39
class
HDF4DMR
:
public
libdap::DMR {
40
private
:
41
int
sdfd;
42
int
fileid;
43
int
gridfd;
44
int
swathfd;
45
46
void
m_duplicate(
const
HDF4DMR
&src)
47
{
48
sdfd = src.sdfd;
49
fileid = src.fileid;
50
gridfd = src.gridfd;
51
swathfd = src.swathfd;
52
}
53
54
public
:
55
explicit
HDF4DMR
(libdap::DMR *dmr) : libdap::DMR(*dmr), sdfd(-1),fileid(-1),gridfd(-1),swathfd(-1) {}
56
HDF4DMR
(libdap::D4BaseTypeFactory *factory,
const
string
&name):libdap::DMR(factory,name),sdfd(-1),fileid(-1),gridfd(-1),swathfd(-1) {}
57
58
HDF4DMR
(
const
HDF4DMR
&rhs) : libdap::DMR(rhs) {
59
m_duplicate(rhs);
60
}
61
62
HDF4DMR
& operator= (
const
HDF4DMR
&rhs) {
63
if
(
this
== &rhs)
64
return
*
this
;
65
66
dynamic_cast<
libdap::DMR &
>
(*this) = rhs;
67
m_duplicate(rhs);
68
69
return
*
this
;
70
}
71
72
~
HDF4DMR
() {
73
74
if
(sdfd != -1)
75
SDend(sdfd);
76
if
(fileid != -1)
77
Hclose(fileid);
78
79
#ifdef USE_HDFEOS2_LIB
80
if
(gridfd != -1)
81
GDclose(gridfd);
82
if
(swathfd != -1)
83
SWclose(swathfd);
84
#endif
85
}
86
87
void
setHDF4Dataset(
const
int
sdfd_in,
const
int
fileid_in,
const
int
gridfd_in,
const
int
swathfd_in ) {
88
sdfd = sdfd_in;
89
fileid = fileid_in;
90
gridfd = gridfd_in;
91
swathfd = swathfd_in;
92
}
93
94
void
setHDF4Dataset(
const
int
sdfd_in,
const
int
fileid_in) {
95
sdfd = sdfd_in;
96
fileid = fileid_in;
97
}
98
};
99
100
#endif
101
102
103
HDF4DMR
Definition:
HDF4_DMR.h:39
modules
hdf4_handler
HDF4_DMR.h
Generated by
1.8.17