bes Updated for version 3.20.10
hdf5_handler.h
Go to the documentation of this file.
1
2// This file is part of hdf5_handler a HDF5 file handler for the OPeNDAP
3// data server.
4
5// Copyright (c) 2009-2016 The HDF Group, Inc. and OPeNDAP, Inc.
6//
7// This is free software; you can redistribute it and/or modify it under the
8// terms of the GNU Lesser General Public License as published by the Free
9// Software Foundation; either version 2.1 of the License, or (at your
10// option) any later version.
11//
12// This software is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15// License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public
18// License along with this library; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20//
21// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
22// You can contact The HDF Group, Inc. at 1800 South Oak Street,
23// Suite 203, Champaign, IL 61820
24
33
38#ifndef _hdf5_handler_H
39#define _hdf5_handler_H
40
41#include "config_hdf5.h"
42
43#include <stdio.h>
44#include <stdlib.h>
45#include <ctype.h>
46#include <string.h>
47#include <assert.h>
48
49#include <iostream>
50#include <string>
51#include <vector>
52#include <sstream>
53
54#include <libdap/DAS.h>
55#include <libdap/DDS.h>
56#include <libdap/parser.h>
57#include <libdap/ConstraintEvaluator.h>
58#include <libdap/InternalErr.h>
59#include <hdf5.h>
60
61
63const int DODS_MAX_RANK=30;
65const int DODS_NAMELEN=1024;
67const std::string HDF5_OBJ_FULLPATH="HDF5_OBJ_FULLPATH";
68
69
71typedef struct DS {
75#if 0
76 //hid_t dset;
77#endif
79 hid_t type;
81 //hid_t dataspace;
83 int ndims;
86 vector <string> dimnames;
87 vector <string> dimnames_path;
89 hsize_t nelmts;
91 hsize_t need;
94typedef struct DSattr {
98 int type;
100 int ndims;
104 hsize_t nelmts;
106 hsize_t need;
108
110static const char STRING[] = "String";
112static const char BYTE[] = "Byte";
115static const char UINT8[] = "UInt8";
117static const char INT8[] = "Int8";
119static const char INT32[] = "Int32";
121static const char INT16[] = "Int16";
123static const char INT64[] = "Int64";
124
126static const char FLOAT64[] = "Float64";
128static const char FLOAT32[] = "Float32";
130static const char UINT16[] = "UInt16";
132static const char UINT32[] = "UInt32";
134static const char UINT64[] = "UInt64";
135
138static const char INT_ELSE[] = "Int_else";
140static const char FLOAT_ELSE[] = "Float_else";
142static const char COMPOUND[] = "Structure";
144static const char ARRAY[] = "Array";
146static const char URL[] = "Url";
147
148#include "h5das.h"
149#include "h5dds.h"
150#include "h5dmr.h"
151#include "h5get.h"
152#include "HDF5PathFinder.h"
153
155
156//#include "h5cfdds.h"
157
158//using namespace libdap;
159#endif
This class is to find and break a cycle in the HDF5 group. It is used to handle the rara case for the...
Data attributes processing header for the default option.
Data structure and retrieval processing header for the default option.
Data structure and retrieval processing header for the default option.
const int DODS_NAMELEN
Maximum length of variable or attribute name(default option only).
Definition: hdf5_handler.h:65
const int DODS_MAX_RANK
Maximum number of dimensions in an array(default option only).
Definition: hdf5_handler.h:63
struct DS DS_t
A structure for DDS generation.
const std::string HDF5_OBJ_FULLPATH
The special DAS attribute name for HDF5 path information from the top(root) group.
Definition: hdf5_handler.h:67
struct DSattr DSattr_t
A structure for DAS generation.
A structure for DDS generation.
Definition: hdf5_handler.h:71
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:89
hsize_t need
Space needed.
Definition: hdf5_handler.h:91
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:73
hid_t type
HDF5 data set id.
Definition: hdf5_handler.h:79
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:85
int ndims
HDF5 data space id.
Definition: hdf5_handler.h:83
A structure for DAS generation.
Definition: hdf5_handler.h:94
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:96
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:102
int ndims
Number of dimensions.
Definition: hdf5_handler.h:100
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:104
hsize_t need
Memory space needed to hold nelmts type.
Definition: hdf5_handler.h:106
int type
Memory type.
Definition: hdf5_handler.h:98