OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
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-2013 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 1901 South First Street,
23 // Suite C-2, Champaign, IL 61820
24 
33 
38 #ifndef _hdf5_handler_H
39 #define _hdf5_handler_H
40 #define DODS_MAX_RANK 30
42 #define DODS_NAMELEN 1024
44 #define HDF5_OBJ_FULLPATH "HDF5_OBJ_FULLPATH"
46 
47 #include "config_hdf5.h"
48 
49 #include <stdio.h>
50 #include <stdlib.h>
51 #include <ctype.h>
52 #include <string.h>
53 #include <assert.h>
54 
55 #include <iostream>
56 #include <string>
57 #include <sstream>
58 
59 #include <debug.h>
60 #include <DAS.h>
61 #include <DDS.h>
62 #include <parser.h>
63 #include <ConstraintEvaluator.h>
64 #include <InternalErr.h>
65 #include <hdf5.h>
66 
68 typedef struct DS {
72  hid_t dset;
74  hid_t type;
76  hid_t dataspace;
78  int ndims;
82  hsize_t nelmts;
84  size_t need;
85 } DS_t;
87 typedef struct DSattr {
91  int type;
93  int ndims;
97  hsize_t nelmts;
99  size_t need;
100 } DSattr_t;
101 
103 static const char STRING[] = "String";
105 static const char BYTE[] = "Byte";
107 static const char INT8[] = "Int8";
109 static const char INT32[] = "Int32";
111 static const char INT16[] = "Int16";
113 static const char FLOAT64[] = "Float64";
115 static const char FLOAT32[] = "Float32";
117 static const char UINT16[] = "UInt16";
119 static const char UINT32[] = "UInt32";
121 static const char INT_ELSE[] = "Int_else";
123 static const char FLOAT_ELSE[] = "Float_else";
125 static const char COMPOUND[] = "Structure";
127 static const char ARRAY[] = "Array";
129 static const char URL[] = "Url";
130 
131 
132 #include "h5das.h"
133 #include "h5dds.h"
134 #include "h5get.h"
135 #include "HDF5PathFinder.h"
136 
138 
139 //#include "h5cfdds.h"
140 
141 using namespace libdap;
142 #endif
This class is to find and break a cycle in the HDF5 group. It is used to handle the rara case for the...
A structure for DDS generation.
Definition: hdf5_handler.h:68
hid_t dset
HDF5 data set id.
Definition: hdf5_handler.h:72
#define DODS_MAX_RANK
Maximum number of dimensions in an array(default option only).
Definition: hdf5_handler.h:41
Data structure and retrieval processing header for the default option.
#define DODS_NAMELEN
Maximum length of variable or attribute name(default option only).
Definition: hdf5_handler.h:43
struct DS DS_t
A structure for DDS generation.
int type
Memory type.
Definition: hdf5_handler.h:91
static class NCMLUtil overview
size_t need
Memory space needed to hold nelmts type.
Definition: hdf5_handler.h:99
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:80
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:70
Data attributes processing header for the default option.
A structure for DAS generation.
Definition: hdf5_handler.h:87
struct DSattr DSattr_t
A structure for DAS generation.
hid_t type
HDF5 data type id.
Definition: hdf5_handler.h:74
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:82
hsize_t nelmts
Number of elements.
Definition: hdf5_handler.h:97
int ndims
Number of dimensions.
Definition: hdf5_handler.h:93
int size[DODS_MAX_RANK]
Size of each dimension.
Definition: hdf5_handler.h:95
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
Definition: hdf5_handler.h:89
size_t need
Space needed.
Definition: hdf5_handler.h:84
Helper functions to generate DDS/DAS/DODS for the default option.
int ndims
Number of dimensions.
Definition: hdf5_handler.h:78
hid_t dataspace
HDF5 data space id.
Definition: hdf5_handler.h:76