bes  Updated for version 3.20.6
hdf-maps.h
1 // This file is part of the hdf4 data handler for the OPeNDAP data server.
2 
3 // Copyright (c) 2005 OPeNDAP, Inc.
4 // Author: James Gallagher <jgallagher@opendap.org>
5 //
6 // This is free software; you can redistribute it and/or modify it under the
7 // terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 2.1 of the License, or (at your
9 // option) any later version.
10 //
11 // This software is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with this software; if not, write to the Free Software Foundation,
18 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
21 
23 // Copyright 1998, by the California Institute of Technology.
24 // ALL RIGHTS RESERVED. United States Government Sponsorship
25 // acknowledged. Any commercial use must be negotiated with the
26 // Office of Technology Transfer at the California Institute of
27 // Technology. This software may be subject to U.S. export control
28 // laws and regulations. By accepting this software, the user
29 // agrees to comply with all applicable U.S. export laws and
30 // regulations. User has the responsibility to obtain export
31 // licenses, or other export authority as may be required before
32 // exporting such information to foreign countries or providing
33 // access to foreign persons.
34 
35 // Author: Jake Hamby, NASA/Jet Propulsion Laboratory
36 // Jake.Hamby@jpl.nasa.gov
37 //
38 
39 // STL map include
40 #include <map>
41 
42 using std::map;
43 using std::less;
44 
45 struct sds_info {
46  hdf_sds sds;
47  bool in_vgroup;
48 };
49 
50 struct vd_info {
51  hdf_vdata vdata;
52  bool in_vgroup;
53 };
54 
55 struct gr_info {
56  hdf_gri gri;
57  bool in_vgroup;
58 };
59 
60 struct vg_info {
61  hdf_vgroup vgroup;
62  bool toplevel;
63 };
64 
65 typedef map < int32, sds_info, less < int32 > >sds_map;
66 typedef map < int32, vd_info, less < int32 > >vd_map;
67 typedef map < int32, gr_info, less < int32 > >gr_map;
68 typedef map < int32, vg_info, less < int32 > >vg_map;
69 
70 typedef map < int32, sds_info, less < int32 > >::const_iterator SDSI;
71 typedef map < int32, vd_info, less < int32 > >::const_iterator VDI;
72 typedef map < int32, gr_info, less < int32 > >::const_iterator GRI;
73 typedef map < int32, vg_info, less < int32 > >::const_iterator VGI;
74 
75 /* Function prototypes */
76 HDFGrid *NewGridFromSDS(const hdf_sds & sds, const string &dataset);
77 HDFArray *NewArrayFromSDS(const hdf_sds & sds, const string &dataset);
78 HDFArray *NewArrayFromGR(const hdf_gri & gr, const string &dataset);
79 HDFSequence *NewSequenceFromVdata(const hdf_vdata & vd, const string &dataset);
80 HDFStructure *NewStructureFromVgroup(const hdf_vgroup & vg,
81  vg_map & vgmap, sds_map & map,
82  vd_map & vdmap, gr_map & grmap,
83  const string &dataset);
84 BaseType *NewDAPVar(const string &varname,
85  const string &dataset,
86  int32 hdf_type);
87 string DAPTypeName(int32 hdf_type);
vg_info
Definition: hdf-maps.h:60
HDFGrid
Definition: HDFGrid.h:56
hdf_vgroup
Definition: hdfclass.h:218
vd_info
Definition: hdf-maps.h:50
HDFStructure
Definition: HDFStructure.h:52
HDFSequence
Definition: HDFSequence.h:53
HDFArray
Definition: HDFArray.h:55
hdf_sds
Definition: hdfclass.h:179
hdf_gri
Definition: hdfclass.h:243
hdf_vdata
Definition: hdfclass.h:204
gr_info
Definition: hdf-maps.h:55
sds_info
Definition: hdf-maps.h:45