1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group.                                               *
3  * Copyright by the Board of Trustees of the University of Illinois.         *
4  * All rights reserved.                                                      *
5  *                                                                           *
6  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
7  * terms governing use, modification, and redistribution, is contained in    *
8  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
9  * of the source code distribution tree; Copyright.html can be found at the  *
10  * root level of an installed copy of the electronic HDF5 document set and   *
11  * is linked from the top-level documents page.  It can also be found at     *
12  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
13  * access to either file, you may request a copy from help@hdfgroup.org.     *
14  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 module hdf5.H5Tpublic;
17 
18 /*
19  * This file contains public declarations for the H5T module.
20  */
21 
22 /* Public headers needed by this file */
23 import hdf5.H5public;
24 import hdf5.H5Ipublic;
25 
26 extern(C):
27 
28 auto HOFFSET(S,M)() {
29   return offsetof(S,M);
30 }
31 
32 /* These are the various classes of datatypes */
33 /* If this goes over 16 types (0-15), the file format will need to change) */
34 enum H5T_class_t {
35     H5T_NO_CLASS         = -1,  /*error                                      */
36     H5T_INTEGER          = 0,   /*integer types                              */
37     H5T_FLOAT            = 1,   /*floating-point types                       */
38     H5T_TIME             = 2,   /*date and time types                        */
39     H5T_STRING           = 3,   /*character string types                     */
40     H5T_BITFIELD         = 4,   /*bit field types                            */
41     H5T_OPAQUE           = 5,   /*opaque types                               */
42     H5T_COMPOUND         = 6,   /*compound types                             */
43     H5T_REFERENCE        = 7,   /*reference types                            */
44     H5T_ENUM		 = 8,	/*enumeration types                          */
45     H5T_VLEN		 = 9,	/*Variable-Length types                      */
46     H5T_ARRAY	         = 10,	/*Array types                                */
47 
48     H5T_NCLASSES                /*this must be last                          */
49 }
50 
51 /* Byte orders */
52 enum H5T_order_t {
53     H5T_ORDER_ERROR      = -1,  /*error                                      */
54     H5T_ORDER_LE         = 0,   /*little endian                              */
55     H5T_ORDER_BE         = 1,   /*bit endian                                 */
56     H5T_ORDER_VAX        = 2,   /*VAX mixed endian                           */
57     H5T_ORDER_MIXED      = 3,   /*Compound type with mixed member orders     */
58     H5T_ORDER_NONE       = 4    /*no particular order (strings, bits,..)     */
59     /*H5T_ORDER_NONE must be last */
60 }
61 
62 /* Types of integer sign schemes */
63 enum H5T_sign_t {
64     H5T_SGN_ERROR        = -1,  /*error                                      */
65     H5T_SGN_NONE         = 0,   /*this is an unsigned type                   */
66     H5T_SGN_2            = 1,   /*two's complement                           */
67 
68     H5T_NSGN             = 2    /*this must be last!                         */
69 }
70 
71 /* Floating-point normalization schemes */
72 enum H5T_norm_t {
73     H5T_NORM_ERROR       = -1,  /*error                                      */
74     H5T_NORM_IMPLIED     = 0,   /*msb of mantissa isn't stored, always 1     */
75     H5T_NORM_MSBSET      = 1,   /*msb of mantissa is always 1                */
76     H5T_NORM_NONE        = 2    /*not normalized                             */
77     /*H5T_NORM_NONE must be last */
78 }
79 
80 /*
81  * Character set to use for text strings.  Do not change these values since
82  * they appear in HDF5 files!
83  */
84 enum H5T_cset_t {
85     H5T_CSET_ERROR       = -1,  /*error                                      */
86     H5T_CSET_ASCII       = 0,   /*US ASCII                                   */
87     H5T_CSET_UTF8        = 1,   /*UTF-8 Unicode encoding		     */
88     H5T_CSET_RESERVED_2  = 2,   /*reserved for later use		     */
89     H5T_CSET_RESERVED_3  = 3,   /*reserved for later use		     */
90     H5T_CSET_RESERVED_4  = 4,   /*reserved for later use		     */
91     H5T_CSET_RESERVED_5  = 5,   /*reserved for later use		     */
92     H5T_CSET_RESERVED_6  = 6,   /*reserved for later use		     */
93     H5T_CSET_RESERVED_7  = 7,   /*reserved for later use		     */
94     H5T_CSET_RESERVED_8  = 8,   /*reserved for later use		     */
95     H5T_CSET_RESERVED_9  = 9,   /*reserved for later use		     */
96     H5T_CSET_RESERVED_10 = 10,  /*reserved for later use		     */
97     H5T_CSET_RESERVED_11 = 11,  /*reserved for later use		     */
98     H5T_CSET_RESERVED_12 = 12,  /*reserved for later use		     */
99     H5T_CSET_RESERVED_13 = 13,  /*reserved for later use		     */
100     H5T_CSET_RESERVED_14 = 14,  /*reserved for later use		     */
101     H5T_CSET_RESERVED_15 = 15   /*reserved for later use		     */
102 }
103 
104 enum H5T_NCSET = H5T_cset_t.H5T_CSET_RESERVED_2 ; /*Number of character sets actually defined  */
105 
106 /*
107  * Type of padding to use in character strings.  Do not change these values
108  * since they appear in HDF5 files!
109  */
110 enum H5T_str_t {
111     H5T_STR_ERROR        = -1,  /*error                                      */
112     H5T_STR_NULLTERM     = 0,   /*null terminate like in C                   */
113     H5T_STR_NULLPAD      = 1,   /*pad with nulls                             */
114     H5T_STR_SPACEPAD     = 2,   /*pad with spaces like in Fortran            */
115     H5T_STR_RESERVED_3   = 3,   /*reserved for later use		     */
116     H5T_STR_RESERVED_4   = 4,   /*reserved for later use		     */
117     H5T_STR_RESERVED_5   = 5,   /*reserved for later use		     */
118     H5T_STR_RESERVED_6   = 6,   /*reserved for later use		     */
119     H5T_STR_RESERVED_7   = 7,   /*reserved for later use		     */
120     H5T_STR_RESERVED_8   = 8,   /*reserved for later use		     */
121     H5T_STR_RESERVED_9   = 9,   /*reserved for later use		     */
122     H5T_STR_RESERVED_10  = 10,  /*reserved for later use		     */
123     H5T_STR_RESERVED_11  = 11,  /*reserved for later use		     */
124     H5T_STR_RESERVED_12  = 12,  /*reserved for later use		     */
125     H5T_STR_RESERVED_13  = 13,  /*reserved for later use		     */
126     H5T_STR_RESERVED_14  = 14,  /*reserved for later use		     */
127     H5T_STR_RESERVED_15  = 15   /*reserved for later use		     */
128 }
129 
130 enum H5T_NSTR = H5T_str_t.H5T_STR_RESERVED_3; /*num H5T_str_t types actually defined	     */
131 
132 /* Type of padding to use in other atomic types */
133 enum H5T_pad_t {
134     H5T_PAD_ERROR        = -1,  /*error                                      */
135     H5T_PAD_ZERO         = 0,   /*always set to zero                         */
136     H5T_PAD_ONE          = 1,   /*always set to one                          */
137     H5T_PAD_BACKGROUND   = 2,   /*set to background value                    */
138 
139     H5T_NPAD             = 3    /*THIS MUST BE LAST                          */
140 }
141 
142 /* Commands sent to conversion functions */
143 enum H5T_cmd_t {
144     H5T_CONV_INIT	= 0,	/*query and/or initialize private data	     */
145     H5T_CONV_CONV	= 1, 	/*convert data from source to dest datatype */
146     H5T_CONV_FREE	= 2	/*function is being removed from path	     */
147 }
148 
149 /* How is the `bkg' buffer used by the conversion function? */
150 enum H5T_bkg_t {
151     H5T_BKG_NO		= 0, 	/*background buffer is not needed, send NULL */
152     H5T_BKG_TEMP	= 1,	/*bkg buffer used as temp storage only       */
153     H5T_BKG_YES		= 2	/*init bkg buf with data before conversion   */
154 }
155 
156 /* Type conversion client data */
157 struct H5T_cdata_t {
158     H5T_cmd_t		command;/*what should the conversion function do?    */
159     H5T_bkg_t		need_bkg;/*is the background buffer needed?	     */
160     hbool_t		recalc;	/*recalculate private data		     */
161     void		*priv;	/*private data				     */
162 }
163 
164 /* Conversion function persistence */
165 enum H5T_pers_t {
166     H5T_PERS_DONTCARE	= -1, 	/*wild card				     */
167     H5T_PERS_HARD	= 0,	/*hard conversion function		     */
168     H5T_PERS_SOFT	= 1 	/*soft conversion function		     */
169 }
170 
171 /* The order to retrieve atomic native datatype */
172 enum H5T_direction_t {
173     H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent            */
174     H5T_DIR_ASCEND      = 1,    /*in inscendent order                        */
175     H5T_DIR_DESCEND     = 2     /*in descendent order                        */
176 }
177 
178 /* The exception type passed into the conversion callback function */
179 enum H5T_conv_except_t {
180     H5T_CONV_EXCEPT_RANGE_HI       = 0,   /*source value is greater than destination's range */
181     H5T_CONV_EXCEPT_RANGE_LOW      = 1,   /*source value is less than destination's range    */
182     H5T_CONV_EXCEPT_PRECISION      = 2,   /*source value loses precision in destination      */
183     H5T_CONV_EXCEPT_TRUNCATE       = 3,   /*source value is truncated in destination         */
184     H5T_CONV_EXCEPT_PINF           = 4,   /*source value is positive infinity(floating number) */
185     H5T_CONV_EXCEPT_NINF           = 5,   /*source value is negative infinity(floating number) */
186     H5T_CONV_EXCEPT_NAN            = 6    /*source value is NaN(floating number)             */
187 }
188 
189 /* The return value from conversion callback function H5T_conv_except_func_t */
190 enum H5T_conv_ret_t {
191     H5T_CONV_ABORT      = -1,   /*abort conversion                           */
192     H5T_CONV_UNHANDLED  = 0,    /*callback function failed to handle the exception      */
193     H5T_CONV_HANDLED    = 1     /*callback function handled the exception successfully  */
194 }
195 
196 /* Variable Length Datatype struct in memory */
197 /* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */
198 struct hvl_t {
199     size_t len; /* Length of VL data (in base type units) */
200     void *p;    /* Pointer to VL data */
201 }
202 
203 /* Variable Length String information */
204 enum H5T_VARIABLE = (cast(size_t)(-1));  /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */
205 
206 /* Opaque information */
207 enum H5T_OPAQUE_TAG_MAX = 256; /* Maximum length of an opaque tag */
208                                         /* This could be raised without too much difficulty */
209 
210 /* All datatype conversion functions are... */
211 alias H5T_conv_t = herr_t function(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
212       size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf,
213       void *bkg, hid_t dset_xfer_plist);
214 
215 /* Exception handler.  If an exception like overflow happenes during conversion,
216  * this function is called if it's registered through H5Pset_type_conv_cb.
217  */
218 alias H5T_conv_except_func_t = H5T_conv_ret_t function(H5T_conv_except_t except_type,
219     hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *user_data);
220 
221 
222 /*
223  * The IEEE floating point types in various byte orders.
224  */
225 alias H5T_IEEE_F32BE = H5T_IEEE_F32BE_g;
226 alias H5T_IEEE_F32LE = H5T_IEEE_F32LE_g;
227 alias H5T_IEEE_F64BE = H5T_IEEE_F64BE_g;
228 alias H5T_IEEE_F64LE = H5T_IEEE_F64LE_g;
229 extern __gshared hid_t H5T_IEEE_F32BE_g;
230 extern __gshared hid_t H5T_IEEE_F32LE_g;
231 extern __gshared hid_t H5T_IEEE_F64BE_g;
232 extern __gshared hid_t H5T_IEEE_F64LE_g;
233 
234 /*
235  * These are "standard" types.  For instance, signed (2's complement) and
236  * unsigned integers of various sizes and byte orders.
237  */
238 alias H5T_STD_I8BE = H5T_STD_I8BE_g;
239 alias H5T_STD_I8LE = H5T_STD_I8LE_g;
240 alias H5T_STD_I16BE = H5T_STD_I16BE_g;
241 alias H5T_STD_I16LE = H5T_STD_I16LE_g;
242 alias H5T_STD_I32BE = H5T_STD_I32BE_g;
243 alias H5T_STD_I32LE = H5T_STD_I32LE_g;
244 alias H5T_STD_I64BE = H5T_STD_I64BE_g;
245 alias H5T_STD_I64LE = H5T_STD_I64LE_g;
246 alias H5T_STD_U8BE = H5T_STD_U8BE_g;
247 alias H5T_STD_U8LE = H5T_STD_U8LE_g;
248 alias H5T_STD_U16BE = H5T_STD_U16BE_g;
249 alias H5T_STD_U16LE = H5T_STD_U16LE_g;
250 alias H5T_STD_U32BE = H5T_STD_U32BE_g;
251 alias H5T_STD_U32LE = H5T_STD_U32LE_g;
252 alias H5T_STD_U64BE = H5T_STD_U64BE_g;
253 alias H5T_STD_U64LE = H5T_STD_U64LE_g;
254 alias H5T_STD_B8BE = H5T_STD_B8BE_g;
255 alias H5T_STD_B8LE = H5T_STD_B8LE_g;
256 alias H5T_STD_B16BE = H5T_STD_B16BE_g;
257 alias H5T_STD_B16LE = H5T_STD_B16LE_g;
258 alias H5T_STD_B32BE = H5T_STD_B32BE_g;
259 alias H5T_STD_B32LE = H5T_STD_B32LE_g;
260 alias H5T_STD_B64BE = H5T_STD_B64BE_g;
261 alias H5T_STD_B64LE = H5T_STD_B64LE_g;
262 alias H5T_STD_REF_OBJ = H5T_STD_REF_OBJ_g;
263 alias H5T_STD_REF_DSETREG = H5T_STD_REF_DSETREG_g;
264 extern __gshared hid_t H5T_STD_I8BE_g;
265 extern __gshared hid_t H5T_STD_I8LE_g;
266 extern __gshared hid_t H5T_STD_I16BE_g;
267 extern __gshared hid_t H5T_STD_I16LE_g;
268 extern __gshared hid_t H5T_STD_I32BE_g;
269 extern __gshared hid_t H5T_STD_I32LE_g;
270 extern __gshared hid_t H5T_STD_I64BE_g;
271 extern __gshared hid_t H5T_STD_I64LE_g;
272 extern __gshared hid_t H5T_STD_U8BE_g;
273 extern __gshared hid_t H5T_STD_U8LE_g;
274 extern __gshared hid_t H5T_STD_U16BE_g;
275 extern __gshared hid_t H5T_STD_U16LE_g;
276 extern __gshared hid_t H5T_STD_U32BE_g;
277 extern __gshared hid_t H5T_STD_U32LE_g;
278 extern __gshared hid_t H5T_STD_U64BE_g;
279 extern __gshared hid_t H5T_STD_U64LE_g;
280 extern __gshared hid_t H5T_STD_B8BE_g;
281 extern __gshared hid_t H5T_STD_B8LE_g;
282 extern __gshared hid_t H5T_STD_B16BE_g;
283 extern __gshared hid_t H5T_STD_B16LE_g;
284 extern __gshared hid_t H5T_STD_B32BE_g;
285 extern __gshared hid_t H5T_STD_B32LE_g;
286 extern __gshared hid_t H5T_STD_B64BE_g;
287 extern __gshared hid_t H5T_STD_B64LE_g;
288 extern __gshared hid_t H5T_STD_REF_OBJ_g;
289 extern __gshared hid_t H5T_STD_REF_DSETREG_g;
290 
291 /*
292  * Types which are particular to Unix.
293  */
294 alias H5T_UNIX_D32BE = H5T_UNIX_D32BE_g;
295 alias H5T_UNIX_D32LE = H5T_UNIX_D32LE_g;
296 alias H5T_UNIX_D64BE = H5T_UNIX_D64BE_g;
297 alias H5T_UNIX_D64LE = H5T_UNIX_D64LE_g;
298 extern __gshared hid_t H5T_UNIX_D32BE_g;
299 extern __gshared hid_t H5T_UNIX_D32LE_g;
300 extern __gshared hid_t H5T_UNIX_D64BE_g;
301 extern __gshared hid_t H5T_UNIX_D64LE_g;
302 
303 /*
304  * Types particular to the C language.  String types use `bytes' instead
305  * of `bits' as their size.
306  */
307 alias H5T_C_S1 = H5T_C_S1_g;
308 extern __gshared hid_t H5T_C_S1_g;
309 
310 /*
311  * Types particular to Fortran.
312  */
313 alias H5T_FORTRAN_S1 = H5T_FORTRAN_S1_g;
314 extern __gshared hid_t H5T_FORTRAN_S1_g;
315 
316 
317 /*
318  * These types are for Intel CPU's.  They are little endian with IEEE
319  * floating point.
320  */
321 alias H5T_INTEL_I8 = H5T_STD_I8LE;
322 alias H5T_INTEL_I16 = H5T_STD_I16LE;
323 alias H5T_INTEL_I32 = H5T_STD_I32LE;
324 alias H5T_INTEL_I64 = H5T_STD_I64LE;
325 alias H5T_INTEL_U8 = H5T_STD_U8LE;
326 alias H5T_INTEL_U16 = H5T_STD_U16LE;
327 alias H5T_INTEL_U32 = H5T_STD_U32LE;
328 alias H5T_INTEL_U64 = H5T_STD_U64LE;
329 alias H5T_INTEL_B8 = H5T_STD_B8LE;
330 alias H5T_INTEL_B16 = H5T_STD_B16LE;
331 alias H5T_INTEL_B32 = H5T_STD_B32LE;
332 alias H5T_INTEL_B64 = H5T_STD_B64LE;
333 alias H5T_INTEL_F32 = H5T_IEEE_F32LE;
334 alias H5T_INTEL_F64 = H5T_IEEE_F64LE;
335 
336 /*
337  * These types are for DEC Alpha CPU's.  They are little endian with IEEE
338  * floating point.
339  */
340 alias H5T_ALPHA_I8 = H5T_STD_I8LE;
341 alias H5T_ALPHA_I16 = H5T_STD_I16LE;
342 alias H5T_ALPHA_I32 = H5T_STD_I32LE;
343 alias H5T_ALPHA_I64 = H5T_STD_I64LE;
344 alias H5T_ALPHA_U8 = H5T_STD_U8LE;
345 alias H5T_ALPHA_U16 = H5T_STD_U16LE;
346 alias H5T_ALPHA_U32 = H5T_STD_U32LE;
347 alias H5T_ALPHA_U64 = H5T_STD_U64LE;
348 alias H5T_ALPHA_B8 = H5T_STD_B8LE;
349 alias H5T_ALPHA_B16 = H5T_STD_B16LE;
350 alias H5T_ALPHA_B32 = H5T_STD_B32LE;
351 alias H5T_ALPHA_B64 = H5T_STD_B64LE;
352 alias H5T_ALPHA_F32 = H5T_IEEE_F32LE;
353 alias H5T_ALPHA_F64 = H5T_IEEE_F64LE;
354 
355 /*
356  * These types are for MIPS cpu's commonly used in SGI systems. They are big
357  * endian with IEEE floating point.
358  */
359 alias H5T_MIPS_I8 = H5T_STD_I8BE;
360 alias H5T_MIPS_I16 = H5T_STD_I16BE;
361 alias H5T_MIPS_I32 = H5T_STD_I32BE;
362 alias H5T_MIPS_I64 = H5T_STD_I64BE;
363 alias H5T_MIPS_U8 = H5T_STD_U8BE;
364 alias H5T_MIPS_U16 = H5T_STD_U16BE;
365 alias H5T_MIPS_U32 = H5T_STD_U32BE;
366 alias H5T_MIPS_U64 = H5T_STD_U64BE;
367 alias H5T_MIPS_B8 = H5T_STD_B8BE;
368 alias H5T_MIPS_B16 = H5T_STD_B16BE;
369 alias H5T_MIPS_B32 = H5T_STD_B32BE;
370 alias H5T_MIPS_B64 = H5T_STD_B64BE;
371 alias H5T_MIPS_F32 = H5T_IEEE_F32BE;
372 alias H5T_MIPS_F64 = H5T_IEEE_F64BE;
373 
374 /*
375  * The VAX floating point types (i.e. in VAX byte order)
376  */
377 alias H5T_VAX_F32 = H5T_VAX_F32_g;
378 alias H5T_VAX_F64 = H5T_VAX_F64_g;
379 extern __gshared hid_t H5T_VAX_F32_g;
380 extern __gshared hid_t H5T_VAX_F64_g;
381 
382 /*
383  * The predefined native types. These are the types detected by H5detect and
384  * they violate the naming scheme a little.  Instead of a class name,
385  * precision and byte order as the last component, they have a C-like type
386  * name.  If the type begins with `U' then it is the unsigned version of the
387  * integer type; other integer types are signed.  The type LLONG corresponds
388  * to C's `long long' and LDOUBLE is `long double' (these types might be the
389  * same as `LONG' and `DOUBLE' respectively).
390  */
391 /++
392 static if ( CHAR_MIN ) {
393   alias H5T_NATIVE_CHAR = H5T_NATIVE_SCHAR;
394 }
395 else {
396   alias H5T_NATIVE_CHAR = H5T_NATIVE_UCHAR;
397 }
398 +/
399 alias H5T_NATIVE_SCHAR = H5T_NATIVE_SCHAR_g;
400 alias H5T_NATIVE_UCHAR = H5T_NATIVE_UCHAR_g;
401 alias H5T_NATIVE_SHORT = H5T_NATIVE_SHORT_g;
402 alias H5T_NATIVE_USHORT = H5T_NATIVE_USHORT_g;
403 alias H5T_NATIVE_INT = H5T_NATIVE_INT_g;
404 alias H5T_NATIVE_UINT = H5T_NATIVE_UINT_g;
405 alias H5T_NATIVE_LONG = H5T_NATIVE_LONG_g;
406 alias H5T_NATIVE_ULONG = H5T_NATIVE_ULONG_g;
407 alias H5T_NATIVE_LLONG = H5T_NATIVE_LLONG_g;
408 alias H5T_NATIVE_ULLONG = H5T_NATIVE_ULLONG_g;
409 alias H5T_NATIVE_FLOAT = H5T_NATIVE_FLOAT_g;
410 alias H5T_NATIVE_DOUBLE = H5T_NATIVE_DOUBLE_g;
411 /++
412 static if ( H5_SIZEOF_LONG_DOUBLE !=0 ) {
413   alias H5T_NATIVE_LDOUBLE = H5T_NATIVE_LDOUBLE_g;
414 }
415 +/
416 alias H5T_NATIVE_B8 = H5T_NATIVE_B8_g;
417 alias H5T_NATIVE_B16 = H5T_NATIVE_B16_g;
418 alias H5T_NATIVE_B32 = H5T_NATIVE_B32_g;
419 alias H5T_NATIVE_B64 = H5T_NATIVE_B64_g;
420 alias H5T_NATIVE_OPAQUE = H5T_NATIVE_OPAQUE_g;
421 alias H5T_NATIVE_HADDR = H5T_NATIVE_HADDR_g;
422 alias H5T_NATIVE_HSIZE = H5T_NATIVE_HSIZE_g;
423 alias H5T_NATIVE_HSSIZE = H5T_NATIVE_HSSIZE_g;
424 alias H5T_NATIVE_HERR = H5T_NATIVE_HERR_g;
425 alias H5T_NATIVE_HBOOL = H5T_NATIVE_HBOOL_g;
426 extern __gshared hid_t H5T_NATIVE_SCHAR_g;
427 extern __gshared hid_t H5T_NATIVE_UCHAR_g;
428 extern __gshared hid_t H5T_NATIVE_SHORT_g;
429 extern __gshared hid_t H5T_NATIVE_USHORT_g;
430 extern __gshared hid_t H5T_NATIVE_INT_g;
431 extern __gshared hid_t H5T_NATIVE_UINT_g;
432 extern __gshared hid_t H5T_NATIVE_LONG_g;
433 extern __gshared hid_t H5T_NATIVE_ULONG_g;
434 extern __gshared hid_t H5T_NATIVE_LLONG_g;
435 extern __gshared hid_t H5T_NATIVE_ULLONG_g;
436 extern __gshared hid_t H5T_NATIVE_FLOAT_g;
437 extern __gshared hid_t H5T_NATIVE_DOUBLE_g;
438 static if ( H5_SIZEOF_LONG_DOUBLE !=0 ) {
439   extern __gshared hid_t H5T_NATIVE_LDOUBLE_g;
440 }
441 extern __gshared hid_t H5T_NATIVE_B8_g;
442 extern __gshared hid_t H5T_NATIVE_B16_g;
443 extern __gshared hid_t H5T_NATIVE_B32_g;
444 extern __gshared hid_t H5T_NATIVE_B64_g;
445 extern __gshared hid_t H5T_NATIVE_OPAQUE_g;
446 extern __gshared hid_t H5T_NATIVE_HADDR_g;
447 extern __gshared hid_t H5T_NATIVE_HSIZE_g;
448 extern __gshared hid_t H5T_NATIVE_HSSIZE_g;
449 extern __gshared hid_t H5T_NATIVE_HERR_g;
450 extern __gshared hid_t H5T_NATIVE_HBOOL_g;
451 
452 /* C9x integer types */
453 alias H5T_NATIVE_INT8 = H5T_NATIVE_INT8_g;
454 alias H5T_NATIVE_UINT8 = H5T_NATIVE_UINT8_g;
455 alias H5T_NATIVE_INT_LEAST8 = H5T_NATIVE_INT_LEAST8_g;
456 alias H5T_NATIVE_UINT_LEAST8 = H5T_NATIVE_UINT_LEAST8_g;
457 alias H5T_NATIVE_INT_FAST8 = H5T_NATIVE_INT_FAST8_g;
458 alias H5T_NATIVE_UINT_FAST8 = H5T_NATIVE_UINT_FAST8_g;
459 extern __gshared hid_t H5T_NATIVE_INT8_g;
460 extern __gshared hid_t H5T_NATIVE_UINT8_g;
461 extern __gshared hid_t H5T_NATIVE_INT_LEAST8_g;
462 extern __gshared hid_t H5T_NATIVE_UINT_LEAST8_g;
463 extern __gshared hid_t H5T_NATIVE_INT_FAST8_g;
464 extern __gshared hid_t H5T_NATIVE_UINT_FAST8_g;
465 
466 alias H5T_NATIVE_INT16 = H5T_NATIVE_INT16_g;
467 alias H5T_NATIVE_UINT16 = H5T_NATIVE_UINT16_g;
468 alias H5T_NATIVE_INT_LEAST16 = H5T_NATIVE_INT_LEAST16_g;
469 alias H5T_NATIVE_UINT_LEAST16 = H5T_NATIVE_UINT_LEAST16_g;
470 alias H5T_NATIVE_INT_FAST16 = H5T_NATIVE_INT_FAST16_g;
471 alias H5T_NATIVE_UINT_FAST16 = H5T_NATIVE_UINT_FAST16_g;
472 extern __gshared hid_t H5T_NATIVE_INT16_g;
473 extern __gshared hid_t H5T_NATIVE_UINT16_g;
474 extern __gshared hid_t H5T_NATIVE_INT_LEAST16_g;
475 extern __gshared hid_t H5T_NATIVE_UINT_LEAST16_g;
476 extern __gshared hid_t H5T_NATIVE_INT_FAST16_g;
477 extern __gshared hid_t H5T_NATIVE_UINT_FAST16_g;
478 
479 alias H5T_NATIVE_INT32 = H5T_NATIVE_INT32_g;
480 alias H5T_NATIVE_UINT32 = H5T_NATIVE_UINT32_g;
481 alias H5T_NATIVE_INT_LEAST32 = H5T_NATIVE_INT_LEAST32_g;
482 alias H5T_NATIVE_UINT_LEAST32 = H5T_NATIVE_UINT_LEAST32_g;
483 alias H5T_NATIVE_INT_FAST32 = H5T_NATIVE_INT_FAST32_g;
484 alias H5T_NATIVE_UINT_FAST32 = H5T_NATIVE_UINT_FAST32_g;
485 extern __gshared hid_t H5T_NATIVE_INT32_g;
486 extern __gshared hid_t H5T_NATIVE_UINT32_g;
487 extern __gshared hid_t H5T_NATIVE_INT_LEAST32_g;
488 extern __gshared hid_t H5T_NATIVE_UINT_LEAST32_g;
489 extern __gshared hid_t H5T_NATIVE_INT_FAST32_g;
490 extern __gshared hid_t H5T_NATIVE_UINT_FAST32_g;
491 
492 alias H5T_NATIVE_INT64 = H5T_NATIVE_INT64_g;
493 alias H5T_NATIVE_UINT64 = H5T_NATIVE_UINT64_g;
494 alias H5T_NATIVE_INT_LEAST64 = H5T_NATIVE_INT_LEAST64_g;
495 alias H5T_NATIVE_UINT_LEAST64 = H5T_NATIVE_UINT_LEAST64_g;
496 alias H5T_NATIVE_INT_FAST64 = H5T_NATIVE_INT_FAST64_g;
497 alias H5T_NATIVE_UINT_FAST64 = H5T_NATIVE_UINT_FAST64_g;
498 extern __gshared hid_t H5T_NATIVE_INT64_g;
499 extern __gshared hid_t H5T_NATIVE_UINT64_g;
500 extern __gshared hid_t H5T_NATIVE_INT_LEAST64_g;
501 extern __gshared hid_t H5T_NATIVE_UINT_LEAST64_g;
502 extern __gshared hid_t H5T_NATIVE_INT_FAST64_g;
503 extern __gshared hid_t H5T_NATIVE_UINT_FAST64_g;
504 
505 version(Posix) {
506 
507 /* Operations defined on all datatypes */
508 hid_t H5Tcreate(H5T_class_t type, size_t size);
509 hid_t H5Tcopy(hid_t type_id);
510 herr_t H5Tclose(hid_t type_id);
511 htri_t H5Tequal(hid_t type1_id, hid_t type2_id);
512 herr_t H5Tlock(hid_t type_id);
513 herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id,
514     hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id);
515 hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
516 herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id);
517 hid_t H5Tget_create_plist(hid_t type_id);
518 htri_t H5Tcommitted(hid_t type_id);
519 herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
520 hid_t H5Tdecode(const void *buf);
521 
522 /* Operations defined on compound datatypes */
523 herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset,
524 			 hid_t member_id);
525 herr_t H5Tpack(hid_t type_id);
526 
527 /* Operations defined on enumeration datatypes */
528 hid_t H5Tenum_create(hid_t base_id);
529 herr_t H5Tenum_insert(hid_t type, const char *name, const void *value);
530 herr_t H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/,
531 			     size_t size);
532 herr_t H5Tenum_valueof(hid_t type, const char *name,
533 			      void *value/*out*/);
534 
535 /* Operations defined on variable-length datatypes */
536 hid_t H5Tvlen_create(hid_t base_id);
537 
538 /* Operations defined on array datatypes */
539 hid_t H5Tarray_create2(hid_t base_id, uint ndims,
540             const hsize_t*/* [ndims] */ dim);
541 int H5Tget_array_ndims(hid_t type_id);
542 int H5Tget_array_dims2(hid_t type_id, hsize_t[] dims);
543 
544 /* Operations defined on opaque datatypes */
545 herr_t H5Tset_tag(hid_t type, const char *tag);
546 char *H5Tget_tag(hid_t type);
547 
548 /* Querying property values */
549 hid_t H5Tget_super(hid_t type);
550 H5T_class_t H5Tget_class(hid_t type_id);
551 htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls);
552 size_t H5Tget_size(hid_t type_id);
553 H5T_order_t H5Tget_order(hid_t type_id);
554 size_t H5Tget_precision(hid_t type_id);
555 int H5Tget_offset(hid_t type_id);
556 herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/,
557 			  H5T_pad_t *msb/*out*/);
558 H5T_sign_t H5Tget_sign(hid_t type_id);
559 herr_t H5Tget_fields(hid_t type_id, size_t *spos/*out*/,
560 			     size_t *epos/*out*/, size_t *esize/*out*/,
561 			     size_t *mpos/*out*/, size_t *msize/*out*/);
562 size_t H5Tget_ebias(hid_t type_id);
563 H5T_norm_t H5Tget_norm(hid_t type_id);
564 H5T_pad_t H5Tget_inpad(hid_t type_id);
565 H5T_str_t H5Tget_strpad(hid_t type_id);
566 int H5Tget_nmembers(hid_t type_id);
567 char *H5Tget_member_name(hid_t type_id, uint membno);
568 int H5Tget_member_index(hid_t type_id, const char *name);
569 size_t H5Tget_member_offset(hid_t type_id, uint membno);
570 H5T_class_t H5Tget_member_class(hid_t type_id, uint membno);
571 hid_t H5Tget_member_type(hid_t type_id, uint membno);
572 herr_t H5Tget_member_value(hid_t type_id, uint membno, void *value/*out*/);
573 H5T_cset_t H5Tget_cset(hid_t type_id);
574 htri_t H5Tis_variable_str(hid_t type_id);
575 hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction);
576 
577 /* Setting property values */
578 herr_t H5Tset_size(hid_t type_id, size_t size);
579 herr_t H5Tset_order(hid_t type_id, H5T_order_t order);
580 herr_t H5Tset_precision(hid_t type_id, size_t prec);
581 herr_t H5Tset_offset(hid_t type_id, size_t offset);
582 herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb);
583 herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign);
584 herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos,
585 			     size_t esize, size_t mpos, size_t msize);
586 herr_t H5Tset_ebias(hid_t type_id, size_t ebias);
587 herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm);
588 herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad);
589 herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset);
590 herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad);
591 
592 /* Type conversion database */
593 herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id,
594 			   hid_t dst_id, H5T_conv_t func);
595 herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id,
596 			     hid_t dst_id, H5T_conv_t func);
597 H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata);
598 htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
599 herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts,
600 			  void *buf, void *background, hid_t plist_id);
601 }
602 
603 /++ DEPRECATED
604 /* Symbols defined for compatibility with previous versions of the HDF5 API.
605  *
606  * Use of these symbols is deprecated.
607  */
608 #ifndef H5_NO_DEPRECATED_SYMBOLS
609 
610 /* Macros */
611 
612 
613 /* Typedefs */
614 
615 
616 /* Function prototypes */
617 herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id);
618 hid_t H5Topen1(hid_t loc_id, const char *name);
619 hid_t H5Tarray_create1(hid_t base_id, int ndims,
620             const hsize_t[/* ndims */] dim,
621             const int[/* ndims */] perm);
622 int H5Tget_array_dims1(hid_t type_id, hsize_t[] dims, int[] perm);
623 
624 #endif /* H5_NO_DEPRECATED_SYMBOLS */
625 
626 #ifdef __cplusplus
627 }
628 #endif
629 +/
630