bes Updated for version 3.20.13
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#if 0
82 //hid_t dataspace;
83#endif
85 int ndims;
88 vector <string> dimnames;
89 vector <string> dimnames_path;
91 hsize_t nelmts;
93 hsize_t need;
96typedef struct DSattr {
100 hid_t type;
102 int ndims;
106 hsize_t nelmts;
108 hsize_t need;
110
112static const char STRING[] = "String";
114static const char BYTE[] = "Byte";
117static const char UINT8[] = "UInt8";
119static const char INT8[] = "Int8";
121static const char INT32[] = "Int32";
123static const char INT16[] = "Int16";
125static const char INT64[] = "Int64";
126
128static const char FLOAT64[] = "Float64";
130static const char FLOAT32[] = "Float32";
132static const char UINT16[] = "UInt16";
134static const char UINT32[] = "UInt32";
136static const char UINT64[] = "UInt64";
137
140static const char INT_ELSE[] = "Int_else";
142static const char FLOAT_ELSE[] = "Float_else";
144static const char COMPOUND[] = "Structure";
146static const char ARRAY[] = "Array";
148static const char URL[] = "Url";
149
150#include "h5das.h"
151#include "h5dds.h"
152#include "h5dmr.h"
153#include "h5get.h"
154#include "HDF5PathFinder.h"
155
156
157#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:91
hsize_t need
Space needed.
Definition: hdf5_handler.h:93
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:87
int ndims
HDF5 data space id.
Definition: hdf5_handler.h:85
A structure for DAS generation.
Definition: hdf5_handler.h:96
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:98
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:104
int ndims
Number of dimensions.
Definition: hdf5_handler.h:102
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:106
hid_t type
Memory type.
Definition: hdf5_handler.h:100
hsize_t need
Memory space needed to hold nelmts type.
Definition: hdf5_handler.h:108