/src/gdal/netcdf-c-4.7.4/libhdf5/hdf5dispatch.c
Line | Count | Source |
1 | | /* Copyright 2005-2018 University Corporation for Atmospheric |
2 | | Research/Unidata. */ |
3 | | /** |
4 | | * @file |
5 | | * @internal This header file contains prototypes and initialization |
6 | | * for the HDF5 dispatch layer. |
7 | | * |
8 | | * @author Ed Hartnett, Dennis Heimbigner |
9 | | */ |
10 | | |
11 | | #include "config.h" |
12 | | #include "hdf5internal.h" |
13 | | |
14 | | #ifdef ENABLE_BYTERANGE |
15 | | #include "H5FDhttp.h" |
16 | | #endif |
17 | | |
18 | | static const NC_Dispatch HDF5_dispatcher = { |
19 | | |
20 | | NC_FORMATX_NC4, |
21 | | NC_DISPATCH_VERSION, |
22 | | |
23 | | NC4_create, |
24 | | NC4_open, |
25 | | |
26 | | NC4_redef, |
27 | | NC4__enddef, |
28 | | NC4_sync, |
29 | | NC4_abort, |
30 | | NC4_close, |
31 | | NC4_set_fill, |
32 | | NC4_inq_format, |
33 | | NC4_inq_format_extended, |
34 | | |
35 | | NC4_inq, |
36 | | NC4_inq_type, |
37 | | |
38 | | NC4_def_dim, |
39 | | NC4_inq_dimid, |
40 | | NC4_inq_dim, |
41 | | NC4_inq_unlimdim, |
42 | | NC4_rename_dim, |
43 | | |
44 | | NC4_HDF5_inq_att, |
45 | | NC4_HDF5_inq_attid, |
46 | | NC4_HDF5_inq_attname, |
47 | | NC4_HDF5_rename_att, |
48 | | NC4_HDF5_del_att, |
49 | | NC4_HDF5_get_att, |
50 | | NC4_HDF5_put_att, |
51 | | |
52 | | NC4_def_var, |
53 | | NC4_inq_varid, |
54 | | NC4_rename_var, |
55 | | NC4_get_vara, |
56 | | NC4_put_vara, |
57 | | NC4_get_vars, |
58 | | NC4_put_vars, |
59 | | NCDEFAULT_get_varm, |
60 | | NCDEFAULT_put_varm, |
61 | | |
62 | | NC4_HDF5_inq_var_all, |
63 | | |
64 | | NC4_var_par_access, |
65 | | NC4_def_var_fill, |
66 | | |
67 | | NC4_show_metadata, |
68 | | NC4_inq_unlimdims, |
69 | | |
70 | | NC4_inq_ncid, |
71 | | NC4_inq_grps, |
72 | | NC4_inq_grpname, |
73 | | NC4_inq_grpname_full, |
74 | | NC4_inq_grp_parent, |
75 | | NC4_inq_grp_full_ncid, |
76 | | NC4_inq_varids, |
77 | | NC4_inq_dimids, |
78 | | NC4_inq_typeids, |
79 | | NC4_inq_type_equal, |
80 | | NC4_def_grp, |
81 | | NC4_rename_grp, |
82 | | NC4_inq_user_type, |
83 | | NC4_inq_typeid, |
84 | | |
85 | | NC4_def_compound, |
86 | | NC4_insert_compound, |
87 | | NC4_insert_array_compound, |
88 | | NC4_inq_compound_field, |
89 | | NC4_inq_compound_fieldindex, |
90 | | NC4_def_vlen, |
91 | | NC4_put_vlen_element, |
92 | | NC4_get_vlen_element, |
93 | | NC4_def_enum, |
94 | | NC4_insert_enum, |
95 | | NC4_inq_enum_member, |
96 | | NC4_inq_enum_ident, |
97 | | NC4_def_opaque, |
98 | | NC4_def_var_deflate, |
99 | | NC4_def_var_fletcher32, |
100 | | NC4_def_var_chunking, |
101 | | NC4_def_var_endian, |
102 | | NC4_def_var_filter, |
103 | | NC4_HDF5_set_var_chunk_cache, |
104 | | NC4_get_var_chunk_cache, |
105 | | |
106 | | NC4_filter_actions, |
107 | | }; |
108 | | |
109 | | const NC_Dispatch* HDF5_dispatch_table = NULL; /* moved here from ddispatch.c */ |
110 | | |
111 | | /** |
112 | | * @internal Initialize the HDF5 dispatch layer. |
113 | | * |
114 | | * @return ::NC_NOERR No error. |
115 | | * @author Ed Hartnett |
116 | | */ |
117 | | int |
118 | | NC_HDF5_initialize(void) |
119 | 9 | { |
120 | 9 | HDF5_dispatch_table = &HDF5_dispatcher; |
121 | 9 | if (!nc4_hdf5_initialized) |
122 | 9 | nc4_hdf5_initialize(); |
123 | | |
124 | | #ifdef ENABLE_BYTERANGE |
125 | | (void)H5FD_http_init(); |
126 | | #endif |
127 | 9 | return NC4_provenance_init(); |
128 | 9 | } |
129 | | |
130 | | /** |
131 | | * @internal Finalize the HDF5 dispatch layer. |
132 | | * |
133 | | * @return ::NC_NOERR No error. |
134 | | * @author Dennis Heimbigner |
135 | | */ |
136 | | int |
137 | | NC_HDF5_finalize(void) |
138 | 0 | { |
139 | 0 | (void)nc4_hdf5_finalize(); |
140 | 0 | return NC_NOERR; |
141 | 0 | } |