bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
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
42using std::map;
43using std::less;
44
45struct sds_info {
46 hdf_sds sds;
47 bool in_vgroup;
48};
49
50struct vd_info {
51 hdf_vdata vdata;
52 bool in_vgroup;
53};
54
55struct gr_info {
56 hdf_gri gri;
57 bool in_vgroup;
58};
59
60struct vg_info {
61 hdf_vgroup vgroup;
62 bool toplevel;
63};
64
65using sds_map = map < int32, sds_info, less < int32 > >;
66using vd_map = map < int32, vd_info, less < int32 > >;
67using gr_map = map < int32, gr_info, less < int32 > > ;
68using vg_map = map < int32, vg_info, less < int32 > >;
69
70using SDSI = map < int32, sds_info, less < int32 > >::const_iterator;
71using VDI = map < int32, vd_info, less < int32 > >::const_iterator;
72using GRI = map < int32, gr_info, less < int32 > >::const_iterator;
73using VGI = map < int32, vg_info, less < int32 > >::const_iterator;
74
75/* Function prototypes */
76HDFGrid *NewGridFromSDS(const hdf_sds & sds, const string &dataset);
77HDFArray *NewArrayFromSDS(const hdf_sds & sds, const string &dataset);
78HDFArray *NewArrayFromGR(const hdf_gri & gr, const string &dataset);
79HDFSequence *NewSequenceFromVdata(const hdf_vdata & vd, const string &dataset);
80HDFStructure *NewStructureFromVgroup(const hdf_vgroup & vg,
81 vg_map & vgmap, sds_map & map,
82 vd_map & vdmap, gr_map & grmap,
83 const string &dataset);
84libdap::BaseType *NewDAPVar(const string &varname,
85 const string &dataset,
86 const int32 hdf_type);
87string DAPTypeName(int32 hdf_type);