bes  Updated for version 3.20.6
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 <DAS.h>
55 #include <DDS.h>
56 #include <parser.h>
57 #include <ConstraintEvaluator.h>
58 #include <InternalErr.h>
59 #include <hdf5.h>
60 
62 const int DODS_MAX_RANK=30;
64 const int DODS_NAMELEN=1024;
66 const std::string HDF5_OBJ_FULLPATH="HDF5_OBJ_FULLPATH";
67 
68 
70 typedef struct DS {
74 #if 0
75  //hid_t dset;
76 #endif
77  hid_t type;
80  //hid_t dataspace;
82  int ndims;
85  vector <string> dimnames;
87  hsize_t nelmts;
89  hsize_t need;
90 } DS_t;
92 typedef struct DSattr {
96  int type;
98  int ndims;
102  hsize_t nelmts;
104  hsize_t need;
105 } DSattr_t;
106 
108 static const char STRING[] = "String";
110 static const char BYTE[] = "Byte";
113 static const char UINT8[] = "UInt8";
115 static const char INT8[] = "Int8";
117 static const char INT32[] = "Int32";
119 static const char INT16[] = "Int16";
121 static const char INT64[] = "Int64";
122 
124 static const char FLOAT64[] = "Float64";
126 static const char FLOAT32[] = "Float32";
128 static const char UINT16[] = "UInt16";
130 static const char UINT32[] = "UInt32";
132 static const char UINT64[] = "UInt64";
133 
136 static const char INT_ELSE[] = "Int_else";
138 static const char FLOAT_ELSE[] = "Float_else";
140 static const char COMPOUND[] = "Structure";
142 static const char ARRAY[] = "Array";
144 static const char URL[] = "Url";
145 
146 
147 #include "h5das.h"
148 #include "h5dds.h"
149 #include "h5dmr.h"
150 #include "h5get.h"
151 #include "HDF5PathFinder.h"
152 
154 
155 //#include "h5cfdds.h"
156 
157 //using namespace libdap;
158 #endif
DSattr
A structure for DAS generation.
Definition: hdf5_handler.h:92
DODS_NAMELEN
const int DODS_NAMELEN
Maximum length of variable or attribute name(default option only).
Definition: hdf5_handler.h:64
DSattr::ndims
int ndims
Number of dimensions.
Definition: hdf5_handler.h:98
DSattr::size
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:100
DS
A structure for DDS generation.
Definition: hdf5_handler.h:70
DS::name
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:72
DS_t
struct DS DS_t
A structure for DDS generation.
DSattr::type
int type
Memory type.
Definition: hdf5_handler.h:96
h5dds.h
Data structure and retrieval processing header for the default option.
DSattr::name
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:94
DS::need
hsize_t need
Space needed.
Definition: hdf5_handler.h:89
HDF5_OBJ_FULLPATH
const std::string HDF5_OBJ_FULLPATH
The special DAS attribute name for HDF5 path information from the top(root) group.
Definition: hdf5_handler.h:66
DSattr::nelmts
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:102
DSattr_t
struct DSattr DSattr_t
A structure for DAS generation.
h5das.h
Data attributes processing header for the default option.
DS::ndims
int ndims
HDF5 data space id.
Definition: hdf5_handler.h:82
DODS_MAX_RANK
const int DODS_MAX_RANK
Maximum number of dimensions in an array(default option only).
Definition: hdf5_handler.h:62
DS::size
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:84
DSattr::need
hsize_t need
Memory space needed to hold nelmts type.
Definition: hdf5_handler.h:104
DS::type
hid_t type
HDF5 data set id.
Definition: hdf5_handler.h:78
h5dmr.h
Data structure and retrieval processing header for the default option.
DS::nelmts
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:87
h5get.h
HDF5PathFinder.h
This class is to find and break a cycle in the HDF5 group. It is used to handle the rara case for the...