H5Tpublic.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*
00017  * This file contains public declarations for the H5T module.
00018  */
00019 #ifndef _H5Tpublic_H
00020 #define _H5Tpublic_H
00021 
00022 /* Public headers needed by this file */
00023 #include "H5public.h"
00024 #include "H5Ipublic.h"
00025 
00026 #define HOFFSET(S,M)    (offsetof(S,M))
00027 
00028 /* These are the various classes of datatypes */
00029 /* If this goes over 16 types (0-15), the file format will need to change) */
00030 typedef enum H5T_class_t {
00031     H5T_NO_CLASS         = -1,  /*error                                      */
00032     H5T_INTEGER          = 0,   /*integer types                              */
00033     H5T_FLOAT            = 1,   /*floating-point types                       */
00034     H5T_TIME             = 2,   /*date and time types                        */
00035     H5T_STRING           = 3,   /*character string types                     */
00036     H5T_BITFIELD         = 4,   /*bit field types                            */
00037     H5T_OPAQUE           = 5,   /*opaque types                               */
00038     H5T_COMPOUND         = 6,   /*compound types                             */
00039     H5T_REFERENCE        = 7,   /*reference types                            */
00040     H5T_ENUM             = 8,   /*enumeration types                          */
00041     H5T_VLEN             = 9,   /*Variable-Length types                      */
00042     H5T_ARRAY            = 10,  /*Array types                                */
00043 
00044     H5T_NCLASSES                /*this must be last                          */
00045 } H5T_class_t;
00046 
00047 /* Byte orders */
00048 typedef enum H5T_order_t {
00049     H5T_ORDER_ERROR      = -1,  /*error                                      */
00050     H5T_ORDER_LE         = 0,   /*little endian                              */
00051     H5T_ORDER_BE         = 1,   /*bit endian                                 */
00052     H5T_ORDER_VAX        = 2,   /*VAX mixed endian                           */
00053     H5T_ORDER_NONE       = 3    /*no particular order (strings, bits,..)     */
00054     /*H5T_ORDER_NONE must be last */
00055 } H5T_order_t;
00056 
00057 /* Types of integer sign schemes */
00058 typedef enum H5T_sign_t {
00059     H5T_SGN_ERROR        = -1,  /*error                                      */
00060     H5T_SGN_NONE         = 0,   /*this is an unsigned type                   */
00061     H5T_SGN_2            = 1,   /*two's complement                           */
00062 
00063     H5T_NSGN             = 2    /*this must be last!                         */
00064 } H5T_sign_t;
00065 
00066 /* Floating-point normalization schemes */
00067 typedef enum H5T_norm_t {
00068     H5T_NORM_ERROR       = -1,  /*error                                      */
00069     H5T_NORM_IMPLIED     = 0,   /*msb of mantissa isn't stored, always 1     */
00070     H5T_NORM_MSBSET      = 1,   /*msb of mantissa is always 1                */
00071     H5T_NORM_NONE        = 2    /*not normalized                             */
00072     /*H5T_NORM_NONE must be last */
00073 } H5T_norm_t;
00074 
00075 /*
00076  * Character set to use for text strings.  Do not change these values since
00077  * they appear in HDF5 files!
00078  */
00079 typedef enum H5T_cset_t {
00080     H5T_CSET_ERROR       = -1,  /*error                                      */
00081     H5T_CSET_ASCII       = 0,   /*US ASCII                                   */
00082     H5T_CSET_UTF8        = 1,   /*UTF-8 Unicode encoding                     */
00083     H5T_CSET_RESERVED_2  = 2,   /*reserved for later use                     */
00084     H5T_CSET_RESERVED_3  = 3,   /*reserved for later use                     */
00085     H5T_CSET_RESERVED_4  = 4,   /*reserved for later use                     */
00086     H5T_CSET_RESERVED_5  = 5,   /*reserved for later use                     */
00087     H5T_CSET_RESERVED_6  = 6,   /*reserved for later use                     */
00088     H5T_CSET_RESERVED_7  = 7,   /*reserved for later use                     */
00089     H5T_CSET_RESERVED_8  = 8,   /*reserved for later use                     */
00090     H5T_CSET_RESERVED_9  = 9,   /*reserved for later use                     */
00091     H5T_CSET_RESERVED_10 = 10,  /*reserved for later use                     */
00092     H5T_CSET_RESERVED_11 = 11,  /*reserved for later use                     */
00093     H5T_CSET_RESERVED_12 = 12,  /*reserved for later use                     */
00094     H5T_CSET_RESERVED_13 = 13,  /*reserved for later use                     */
00095     H5T_CSET_RESERVED_14 = 14,  /*reserved for later use                     */
00096     H5T_CSET_RESERVED_15 = 15   /*reserved for later use                     */
00097 } H5T_cset_t;
00098 #define H5T_NCSET H5T_CSET_RESERVED_2                   /*Number of character sets actually defined  */
00099 
00100 /*
00101  * Type of padding to use in character strings.  Do not change these values
00102  * since they appear in HDF5 files!
00103  */
00104 typedef enum H5T_str_t {
00105     H5T_STR_ERROR        = -1,  /*error                                      */
00106     H5T_STR_NULLTERM     = 0,   /*null terminate like in C                   */
00107     H5T_STR_NULLPAD      = 1,   /*pad with nulls                             */
00108     H5T_STR_SPACEPAD     = 2,   /*pad with spaces like in Fortran            */
00109     H5T_STR_RESERVED_3   = 3,   /*reserved for later use                     */
00110     H5T_STR_RESERVED_4   = 4,   /*reserved for later use                     */
00111     H5T_STR_RESERVED_5   = 5,   /*reserved for later use                     */
00112     H5T_STR_RESERVED_6   = 6,   /*reserved for later use                     */
00113     H5T_STR_RESERVED_7   = 7,   /*reserved for later use                     */
00114     H5T_STR_RESERVED_8   = 8,   /*reserved for later use                     */
00115     H5T_STR_RESERVED_9   = 9,   /*reserved for later use                     */
00116     H5T_STR_RESERVED_10  = 10,  /*reserved for later use                     */
00117     H5T_STR_RESERVED_11  = 11,  /*reserved for later use                     */
00118     H5T_STR_RESERVED_12  = 12,  /*reserved for later use                     */
00119     H5T_STR_RESERVED_13  = 13,  /*reserved for later use                     */
00120     H5T_STR_RESERVED_14  = 14,  /*reserved for later use                     */
00121     H5T_STR_RESERVED_15  = 15   /*reserved for later use                     */
00122 } H5T_str_t;
00123 #define H5T_NSTR H5T_STR_RESERVED_3             /*num H5T_str_t types actually defined       */
00124 
00125 /* Type of padding to use in other atomic types */
00126 typedef enum H5T_pad_t {
00127     H5T_PAD_ERROR        = -1,  /*error                                      */
00128     H5T_PAD_ZERO         = 0,   /*always set to zero                         */
00129     H5T_PAD_ONE          = 1,   /*always set to one                          */
00130     H5T_PAD_BACKGROUND   = 2,   /*set to background value                    */
00131 
00132     H5T_NPAD             = 3    /*THIS MUST BE LAST                          */
00133 } H5T_pad_t;
00134 
00135 /* Commands sent to conversion functions */
00136 typedef enum H5T_cmd_t {
00137     H5T_CONV_INIT       = 0,    /*query and/or initialize private data       */
00138     H5T_CONV_CONV       = 1,    /*convert data from source to dest datatype */
00139     H5T_CONV_FREE       = 2     /*function is being removed from path        */
00140 } H5T_cmd_t;
00141 
00142 /* How is the `bkg' buffer used by the conversion function? */
00143 typedef enum H5T_bkg_t {
00144     H5T_BKG_NO          = 0,    /*background buffer is not needed, send NULL */
00145     H5T_BKG_TEMP        = 1,    /*bkg buffer used as temp storage only       */
00146     H5T_BKG_YES         = 2     /*init bkg buf with data before conversion   */
00147 } H5T_bkg_t;
00148 
00149 /* Type conversion client data */
00150 typedef struct H5T_cdata_t {
00151     H5T_cmd_t           command;/*what should the conversion function do?    */
00152     H5T_bkg_t           need_bkg;/*is the background buffer needed?          */
00153     hbool_t             recalc; /*recalculate private data                   */
00154     void                *priv;  /*private data                               */
00155 } H5T_cdata_t;
00156 
00157 /* Conversion function persistence */
00158 typedef enum H5T_pers_t {
00159     H5T_PERS_DONTCARE   = -1,   /*wild card                                  */
00160     H5T_PERS_HARD       = 0,    /*hard conversion function                   */
00161     H5T_PERS_SOFT       = 1     /*soft conversion function                   */
00162 } H5T_pers_t;
00163 
00164 /* The order to retrieve atomic native datatype */
00165 typedef enum H5T_direction_t {
00166     H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent            */
00167     H5T_DIR_ASCEND      = 1,    /*in inscendent order                        */
00168     H5T_DIR_DESCEND     = 2     /*in descendent order                        */
00169 } H5T_direction_t;
00170 
00171 /* The exception type passed into the conversion callback function */
00172 typedef enum H5T_conv_except_t {
00173     H5T_CONV_EXCEPT_RANGE_HI       = 0,   /*source value is greater than destination's range */
00174     H5T_CONV_EXCEPT_RANGE_LOW      = 1,   /*source value is less than destination's range    */
00175     H5T_CONV_EXCEPT_PRECISION      = 2,   /*source value loses precision in destination      */
00176     H5T_CONV_EXCEPT_TRUNCATE       = 3,   /*source value is truncated in destination         */
00177     H5T_CONV_EXCEPT_PINF           = 4,   /*source value is positive infinity(floating number) */
00178     H5T_CONV_EXCEPT_NINF           = 5,   /*source value is negative infinity(floating number) */
00179     H5T_CONV_EXCEPT_NAN            = 6    /*source value is NaN(floating number)             */
00180 } H5T_conv_except_t;
00181 
00182 /* The return value from conversion callback function H5T_conv_except_func_t */
00183 typedef enum H5T_conv_ret_t {
00184     H5T_CONV_ABORT      = -1,   /*abort conversion                           */
00185     H5T_CONV_UNHANDLED  = 0,    /*callback function failed to handle the exception      */
00186     H5T_CONV_HANDLED    = 1     /*callback function handled the exception successfully  */
00187 } H5T_conv_ret_t;
00188 
00189 /* Variable Length Datatype struct in memory */
00190 /* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */
00191 typedef struct {
00192     size_t len; /* Length of VL data (in base type units) */
00193     void *p;    /* Pointer to VL data */
00194 } hvl_t;
00195 
00196 /* Variable Length String information */
00197 #define H5T_VARIABLE    ((size_t)(-1))  /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */
00198 
00199 /* Opaque information */
00200 #define H5T_OPAQUE_TAG_MAX      256     /* Maximum length of an opaque tag */
00201                                         /* This could be raised without too much difficulty */
00202 
00203 #ifdef __cplusplus
00204 extern "C" {
00205 #endif
00206 
00207 /* All datatype conversion functions are... */
00208 typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
00209       size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf,
00210       void *bkg, hid_t dset_xfer_plist);
00211 
00212 /* Exception handler.  If an exception like overflow happenes during conversion,
00213  * this function is called if it's registered through H5Pset_type_conv_cb.
00214  */
00215 typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type,
00216     hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *user_data);
00217 
00218 /* When this header is included from a private header, don't make calls to H5open() */
00219 #undef H5OPEN
00220 #ifndef _H5private_H
00221 #define H5OPEN          H5open(),
00222 #else   /* _H5private_H */
00223 #define H5OPEN
00224 #endif  /* _H5private_H */
00225 
00226 /*
00227  * The IEEE floating point types in various byte orders.
00228  */
00229 #define H5T_IEEE_F32BE          (H5OPEN H5T_IEEE_F32BE_g)
00230 #define H5T_IEEE_F32LE          (H5OPEN H5T_IEEE_F32LE_g)
00231 #define H5T_IEEE_F64BE          (H5OPEN H5T_IEEE_F64BE_g)
00232 #define H5T_IEEE_F64LE          (H5OPEN H5T_IEEE_F64LE_g)
00233 H5_DLLVAR hid_t H5T_IEEE_F32BE_g;
00234 H5_DLLVAR hid_t H5T_IEEE_F32LE_g;
00235 H5_DLLVAR hid_t H5T_IEEE_F64BE_g;
00236 H5_DLLVAR hid_t H5T_IEEE_F64LE_g;
00237 
00238 /*
00239  * These are "standard" types.  For instance, signed (2's complement) and
00240  * unsigned integers of various sizes and byte orders.
00241  */
00242 #define H5T_STD_I8BE            (H5OPEN H5T_STD_I8BE_g)
00243 #define H5T_STD_I8LE            (H5OPEN H5T_STD_I8LE_g)
00244 #define H5T_STD_I16BE           (H5OPEN H5T_STD_I16BE_g)
00245 #define H5T_STD_I16LE           (H5OPEN H5T_STD_I16LE_g)
00246 #define H5T_STD_I32BE           (H5OPEN H5T_STD_I32BE_g)
00247 #define H5T_STD_I32LE           (H5OPEN H5T_STD_I32LE_g)
00248 #define H5T_STD_I64BE           (H5OPEN H5T_STD_I64BE_g)
00249 #define H5T_STD_I64LE           (H5OPEN H5T_STD_I64LE_g)
00250 #define H5T_STD_U8BE            (H5OPEN H5T_STD_U8BE_g)
00251 #define H5T_STD_U8LE            (H5OPEN H5T_STD_U8LE_g)
00252 #define H5T_STD_U16BE           (H5OPEN H5T_STD_U16BE_g)
00253 #define H5T_STD_U16LE           (H5OPEN H5T_STD_U16LE_g)
00254 #define H5T_STD_U32BE           (H5OPEN H5T_STD_U32BE_g)
00255 #define H5T_STD_U32LE           (H5OPEN H5T_STD_U32LE_g)
00256 #define H5T_STD_U64BE           (H5OPEN H5T_STD_U64BE_g)
00257 #define H5T_STD_U64LE           (H5OPEN H5T_STD_U64LE_g)
00258 #define H5T_STD_B8BE            (H5OPEN H5T_STD_B8BE_g)
00259 #define H5T_STD_B8LE            (H5OPEN H5T_STD_B8LE_g)
00260 #define H5T_STD_B16BE           (H5OPEN H5T_STD_B16BE_g)
00261 #define H5T_STD_B16LE           (H5OPEN H5T_STD_B16LE_g)
00262 #define H5T_STD_B32BE           (H5OPEN H5T_STD_B32BE_g)
00263 #define H5T_STD_B32LE           (H5OPEN H5T_STD_B32LE_g)
00264 #define H5T_STD_B64BE           (H5OPEN H5T_STD_B64BE_g)
00265 #define H5T_STD_B64LE           (H5OPEN H5T_STD_B64LE_g)
00266 #define H5T_STD_REF_OBJ         (H5OPEN H5T_STD_REF_OBJ_g)
00267 #define H5T_STD_REF_DSETREG     (H5OPEN H5T_STD_REF_DSETREG_g)
00268 H5_DLLVAR hid_t H5T_STD_I8BE_g;
00269 H5_DLLVAR hid_t H5T_STD_I8LE_g;
00270 H5_DLLVAR hid_t H5T_STD_I16BE_g;
00271 H5_DLLVAR hid_t H5T_STD_I16LE_g;
00272 H5_DLLVAR hid_t H5T_STD_I32BE_g;
00273 H5_DLLVAR hid_t H5T_STD_I32LE_g;
00274 H5_DLLVAR hid_t H5T_STD_I64BE_g;
00275 H5_DLLVAR hid_t H5T_STD_I64LE_g;
00276 H5_DLLVAR hid_t H5T_STD_U8BE_g;
00277 H5_DLLVAR hid_t H5T_STD_U8LE_g;
00278 H5_DLLVAR hid_t H5T_STD_U16BE_g;
00279 H5_DLLVAR hid_t H5T_STD_U16LE_g;
00280 H5_DLLVAR hid_t H5T_STD_U32BE_g;
00281 H5_DLLVAR hid_t H5T_STD_U32LE_g;
00282 H5_DLLVAR hid_t H5T_STD_U64BE_g;
00283 H5_DLLVAR hid_t H5T_STD_U64LE_g;
00284 H5_DLLVAR hid_t H5T_STD_B8BE_g;
00285 H5_DLLVAR hid_t H5T_STD_B8LE_g;
00286 H5_DLLVAR hid_t H5T_STD_B16BE_g;
00287 H5_DLLVAR hid_t H5T_STD_B16LE_g;
00288 H5_DLLVAR hid_t H5T_STD_B32BE_g;
00289 H5_DLLVAR hid_t H5T_STD_B32LE_g;
00290 H5_DLLVAR hid_t H5T_STD_B64BE_g;
00291 H5_DLLVAR hid_t H5T_STD_B64LE_g;
00292 H5_DLLVAR hid_t H5T_STD_REF_OBJ_g;
00293 H5_DLLVAR hid_t H5T_STD_REF_DSETREG_g;
00294 
00295 /*
00296  * Types which are particular to Unix.
00297  */
00298 #define H5T_UNIX_D32BE          (H5OPEN H5T_UNIX_D32BE_g)
00299 #define H5T_UNIX_D32LE          (H5OPEN H5T_UNIX_D32LE_g)
00300 #define H5T_UNIX_D64BE          (H5OPEN H5T_UNIX_D64BE_g)
00301 #define H5T_UNIX_D64LE          (H5OPEN H5T_UNIX_D64LE_g)
00302 H5_DLLVAR hid_t H5T_UNIX_D32BE_g;
00303 H5_DLLVAR hid_t H5T_UNIX_D32LE_g;
00304 H5_DLLVAR hid_t H5T_UNIX_D64BE_g;
00305 H5_DLLVAR hid_t H5T_UNIX_D64LE_g;
00306 
00307 /*
00308  * Types particular to the C language.  String types use `bytes' instead
00309  * of `bits' as their size.
00310  */
00311 #define H5T_C_S1                (H5OPEN H5T_C_S1_g)
00312 H5_DLLVAR hid_t H5T_C_S1_g;
00313 
00314 /*
00315  * Types particular to Fortran.
00316  */
00317 #define H5T_FORTRAN_S1          (H5OPEN H5T_FORTRAN_S1_g)
00318 H5_DLLVAR hid_t H5T_FORTRAN_S1_g;
00319 
00320 /*
00321  * These types are for Intel CPU's.  They are little endian with IEEE
00322  * floating point.
00323  */
00324 #define H5T_INTEL_I8            H5T_STD_I8LE
00325 #define H5T_INTEL_I16           H5T_STD_I16LE
00326 #define H5T_INTEL_I32           H5T_STD_I32LE
00327 #define H5T_INTEL_I64           H5T_STD_I64LE
00328 #define H5T_INTEL_U8            H5T_STD_U8LE
00329 #define H5T_INTEL_U16           H5T_STD_U16LE
00330 #define H5T_INTEL_U32           H5T_STD_U32LE
00331 #define H5T_INTEL_U64           H5T_STD_U64LE
00332 #define H5T_INTEL_B8            H5T_STD_B8LE
00333 #define H5T_INTEL_B16           H5T_STD_B16LE
00334 #define H5T_INTEL_B32           H5T_STD_B32LE
00335 #define H5T_INTEL_B64           H5T_STD_B64LE
00336 #define H5T_INTEL_F32           H5T_IEEE_F32LE
00337 #define H5T_INTEL_F64           H5T_IEEE_F64LE
00338 
00339 /*
00340  * These types are for DEC Alpha CPU's.  They are little endian with IEEE
00341  * floating point.
00342  */
00343 #define H5T_ALPHA_I8            H5T_STD_I8LE
00344 #define H5T_ALPHA_I16           H5T_STD_I16LE
00345 #define H5T_ALPHA_I32           H5T_STD_I32LE
00346 #define H5T_ALPHA_I64           H5T_STD_I64LE
00347 #define H5T_ALPHA_U8            H5T_STD_U8LE
00348 #define H5T_ALPHA_U16           H5T_STD_U16LE
00349 #define H5T_ALPHA_U32           H5T_STD_U32LE
00350 #define H5T_ALPHA_U64           H5T_STD_U64LE
00351 #define H5T_ALPHA_B8            H5T_STD_B8LE
00352 #define H5T_ALPHA_B16           H5T_STD_B16LE
00353 #define H5T_ALPHA_B32           H5T_STD_B32LE
00354 #define H5T_ALPHA_B64           H5T_STD_B64LE
00355 #define H5T_ALPHA_F32           H5T_IEEE_F32LE
00356 #define H5T_ALPHA_F64           H5T_IEEE_F64LE
00357 
00358 /*
00359  * These types are for MIPS cpu's commonly used in SGI systems. They are big
00360  * endian with IEEE floating point.
00361  */
00362 #define H5T_MIPS_I8             H5T_STD_I8BE
00363 #define H5T_MIPS_I16            H5T_STD_I16BE
00364 #define H5T_MIPS_I32            H5T_STD_I32BE
00365 #define H5T_MIPS_I64            H5T_STD_I64BE
00366 #define H5T_MIPS_U8             H5T_STD_U8BE
00367 #define H5T_MIPS_U16            H5T_STD_U16BE
00368 #define H5T_MIPS_U32            H5T_STD_U32BE
00369 #define H5T_MIPS_U64            H5T_STD_U64BE
00370 #define H5T_MIPS_B8             H5T_STD_B8BE
00371 #define H5T_MIPS_B16            H5T_STD_B16BE
00372 #define H5T_MIPS_B32            H5T_STD_B32BE
00373 #define H5T_MIPS_B64            H5T_STD_B64BE
00374 #define H5T_MIPS_F32            H5T_IEEE_F32BE
00375 #define H5T_MIPS_F64            H5T_IEEE_F64BE
00376 
00377 /*
00378  * The VAX floating point types (i.e. in VAX byte order)
00379  */
00380 #define H5T_VAX_F32             (H5OPEN H5T_VAX_F32_g)
00381 #define H5T_VAX_F64             (H5OPEN H5T_VAX_F64_g)
00382 H5_DLLVAR hid_t H5T_VAX_F32_g;
00383 H5_DLLVAR hid_t H5T_VAX_F64_g;
00384 
00385 /*
00386  * The predefined native types. These are the types detected by H5detect and
00387  * they violate the naming scheme a little.  Instead of a class name,
00388  * precision and byte order as the last component, they have a C-like type
00389  * name.  If the type begins with `U' then it is the unsigned version of the
00390  * integer type; other integer types are signed.  The type LLONG corresponds
00391  * to C's `long long' and LDOUBLE is `long double' (these types might be the
00392  * same as `LONG' and `DOUBLE' respectively).
00393  */
00394 #define H5T_NATIVE_CHAR         (CHAR_MIN?H5T_NATIVE_SCHAR:H5T_NATIVE_UCHAR)
00395 #define H5T_NATIVE_SCHAR        (H5OPEN H5T_NATIVE_SCHAR_g)
00396 #define H5T_NATIVE_UCHAR        (H5OPEN H5T_NATIVE_UCHAR_g)
00397 #define H5T_NATIVE_SHORT        (H5OPEN H5T_NATIVE_SHORT_g)
00398 #define H5T_NATIVE_USHORT       (H5OPEN H5T_NATIVE_USHORT_g)
00399 #define H5T_NATIVE_INT          (H5OPEN H5T_NATIVE_INT_g)
00400 #define H5T_NATIVE_UINT         (H5OPEN H5T_NATIVE_UINT_g)
00401 #define H5T_NATIVE_LONG         (H5OPEN H5T_NATIVE_LONG_g)
00402 #define H5T_NATIVE_ULONG        (H5OPEN H5T_NATIVE_ULONG_g)
00403 #define H5T_NATIVE_LLONG        (H5OPEN H5T_NATIVE_LLONG_g)
00404 #define H5T_NATIVE_ULLONG       (H5OPEN H5T_NATIVE_ULLONG_g)
00405 #define H5T_NATIVE_FLOAT        (H5OPEN H5T_NATIVE_FLOAT_g)
00406 #define H5T_NATIVE_DOUBLE       (H5OPEN H5T_NATIVE_DOUBLE_g)
00407 #if H5_SIZEOF_LONG_DOUBLE !=0
00408 #define H5T_NATIVE_LDOUBLE      (H5OPEN H5T_NATIVE_LDOUBLE_g)
00409 #endif
00410 #define H5T_NATIVE_B8           (H5OPEN H5T_NATIVE_B8_g)
00411 #define H5T_NATIVE_B16          (H5OPEN H5T_NATIVE_B16_g)
00412 #define H5T_NATIVE_B32          (H5OPEN H5T_NATIVE_B32_g)
00413 #define H5T_NATIVE_B64          (H5OPEN H5T_NATIVE_B64_g)
00414 #define H5T_NATIVE_OPAQUE       (H5OPEN H5T_NATIVE_OPAQUE_g)
00415 #define H5T_NATIVE_HADDR        (H5OPEN H5T_NATIVE_HADDR_g)
00416 #define H5T_NATIVE_HSIZE        (H5OPEN H5T_NATIVE_HSIZE_g)
00417 #define H5T_NATIVE_HSSIZE       (H5OPEN H5T_NATIVE_HSSIZE_g)
00418 #define H5T_NATIVE_HERR         (H5OPEN H5T_NATIVE_HERR_g)
00419 #define H5T_NATIVE_HBOOL        (H5OPEN H5T_NATIVE_HBOOL_g)
00420 H5_DLLVAR hid_t H5T_NATIVE_SCHAR_g;
00421 H5_DLLVAR hid_t H5T_NATIVE_UCHAR_g;
00422 H5_DLLVAR hid_t H5T_NATIVE_SHORT_g;
00423 H5_DLLVAR hid_t H5T_NATIVE_USHORT_g;
00424 H5_DLLVAR hid_t H5T_NATIVE_INT_g;
00425 H5_DLLVAR hid_t H5T_NATIVE_UINT_g;
00426 H5_DLLVAR hid_t H5T_NATIVE_LONG_g;
00427 H5_DLLVAR hid_t H5T_NATIVE_ULONG_g;
00428 H5_DLLVAR hid_t H5T_NATIVE_LLONG_g;
00429 H5_DLLVAR hid_t H5T_NATIVE_ULLONG_g;
00430 H5_DLLVAR hid_t H5T_NATIVE_FLOAT_g;
00431 H5_DLLVAR hid_t H5T_NATIVE_DOUBLE_g;
00432 #if H5_SIZEOF_LONG_DOUBLE !=0
00433 H5_DLLVAR hid_t H5T_NATIVE_LDOUBLE_g;
00434 #endif
00435 H5_DLLVAR hid_t H5T_NATIVE_B8_g;
00436 H5_DLLVAR hid_t H5T_NATIVE_B16_g;
00437 H5_DLLVAR hid_t H5T_NATIVE_B32_g;
00438 H5_DLLVAR hid_t H5T_NATIVE_B64_g;
00439 H5_DLLVAR hid_t H5T_NATIVE_OPAQUE_g;
00440 H5_DLLVAR hid_t H5T_NATIVE_HADDR_g;
00441 H5_DLLVAR hid_t H5T_NATIVE_HSIZE_g;
00442 H5_DLLVAR hid_t H5T_NATIVE_HSSIZE_g;
00443 H5_DLLVAR hid_t H5T_NATIVE_HERR_g;
00444 H5_DLLVAR hid_t H5T_NATIVE_HBOOL_g;
00445 
00446 /* C9x integer types */
00447 #define H5T_NATIVE_INT8                 (H5OPEN H5T_NATIVE_INT8_g)
00448 #define H5T_NATIVE_UINT8                (H5OPEN H5T_NATIVE_UINT8_g)
00449 #define H5T_NATIVE_INT_LEAST8           (H5OPEN H5T_NATIVE_INT_LEAST8_g)
00450 #define H5T_NATIVE_UINT_LEAST8          (H5OPEN H5T_NATIVE_UINT_LEAST8_g)
00451 #define H5T_NATIVE_INT_FAST8            (H5OPEN H5T_NATIVE_INT_FAST8_g)
00452 #define H5T_NATIVE_UINT_FAST8           (H5OPEN H5T_NATIVE_UINT_FAST8_g)
00453 H5_DLLVAR hid_t H5T_NATIVE_INT8_g;
00454 H5_DLLVAR hid_t H5T_NATIVE_UINT8_g;
00455 H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST8_g;
00456 H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST8_g;
00457 H5_DLLVAR hid_t H5T_NATIVE_INT_FAST8_g;
00458 H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST8_g;
00459 
00460 #define H5T_NATIVE_INT16                (H5OPEN H5T_NATIVE_INT16_g)
00461 #define H5T_NATIVE_UINT16               (H5OPEN H5T_NATIVE_UINT16_g)
00462 #define H5T_NATIVE_INT_LEAST16          (H5OPEN H5T_NATIVE_INT_LEAST16_g)
00463 #define H5T_NATIVE_UINT_LEAST16         (H5OPEN H5T_NATIVE_UINT_LEAST16_g)
00464 #define H5T_NATIVE_INT_FAST16           (H5OPEN H5T_NATIVE_INT_FAST16_g)
00465 #define H5T_NATIVE_UINT_FAST16          (H5OPEN H5T_NATIVE_UINT_FAST16_g)
00466 H5_DLLVAR hid_t H5T_NATIVE_INT16_g;
00467 H5_DLLVAR hid_t H5T_NATIVE_UINT16_g;
00468 H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST16_g;
00469 H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST16_g;
00470 H5_DLLVAR hid_t H5T_NATIVE_INT_FAST16_g;
00471 H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST16_g;
00472 
00473 #define H5T_NATIVE_INT32                (H5OPEN H5T_NATIVE_INT32_g)
00474 #define H5T_NATIVE_UINT32               (H5OPEN H5T_NATIVE_UINT32_g)
00475 #define H5T_NATIVE_INT_LEAST32          (H5OPEN H5T_NATIVE_INT_LEAST32_g)
00476 #define H5T_NATIVE_UINT_LEAST32         (H5OPEN H5T_NATIVE_UINT_LEAST32_g)
00477 #define H5T_NATIVE_INT_FAST32           (H5OPEN H5T_NATIVE_INT_FAST32_g)
00478 #define H5T_NATIVE_UINT_FAST32          (H5OPEN H5T_NATIVE_UINT_FAST32_g)
00479 H5_DLLVAR hid_t H5T_NATIVE_INT32_g;
00480 H5_DLLVAR hid_t H5T_NATIVE_UINT32_g;
00481 H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST32_g;
00482 H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST32_g;
00483 H5_DLLVAR hid_t H5T_NATIVE_INT_FAST32_g;
00484 H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST32_g;
00485 
00486 #define H5T_NATIVE_INT64                (H5OPEN H5T_NATIVE_INT64_g)
00487 #define H5T_NATIVE_UINT64               (H5OPEN H5T_NATIVE_UINT64_g)
00488 #define H5T_NATIVE_INT_LEAST64          (H5OPEN H5T_NATIVE_INT_LEAST64_g)
00489 #define H5T_NATIVE_UINT_LEAST64         (H5OPEN H5T_NATIVE_UINT_LEAST64_g)
00490 #define H5T_NATIVE_INT_FAST64           (H5OPEN H5T_NATIVE_INT_FAST64_g)
00491 #define H5T_NATIVE_UINT_FAST64          (H5OPEN H5T_NATIVE_UINT_FAST64_g)
00492 H5_DLLVAR hid_t H5T_NATIVE_INT64_g;
00493 H5_DLLVAR hid_t H5T_NATIVE_UINT64_g;
00494 H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST64_g;
00495 H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST64_g;
00496 H5_DLLVAR hid_t H5T_NATIVE_INT_FAST64_g;
00497 H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g;
00498 
00499 /* Operations defined on all datatypes */
00500 H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size);
00501 H5_DLL hid_t H5Tcopy(hid_t type_id);
00502 H5_DLL herr_t H5Tclose(hid_t type_id);
00503 H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id);
00504 H5_DLL herr_t H5Tlock(hid_t type_id);
00505 H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id,
00506     hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id);
00507 H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
00508 H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id);
00509 H5_DLL hid_t H5Tget_create_plist(hid_t type_id);
00510 H5_DLL htri_t H5Tcommitted(hid_t type_id);
00511 H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
00512 H5_DLL hid_t H5Tdecode(const void *buf);
00513 
00514 /* Operations defined on compound datatypes */
00515 H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset,
00516                          hid_t member_id);
00517 H5_DLL herr_t H5Tpack(hid_t type_id);
00518 
00519 /* Operations defined on enumeration datatypes */
00520 H5_DLL hid_t H5Tenum_create(hid_t base_id);
00521 H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value);
00522 H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/,
00523                              size_t size);
00524 H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name,
00525                               void *value/*out*/);
00526 
00527 /* Operations defined on variable-length datatypes */
00528 H5_DLL hid_t H5Tvlen_create(hid_t base_id);
00529 
00530 /* Operations defined on array datatypes */
00531 H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims,
00532             const hsize_t dim[/* ndims */]);
00533 H5_DLL int H5Tget_array_ndims(hid_t type_id);
00534 H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]);
00535 
00536 /* Operations defined on opaque datatypes */
00537 H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag);
00538 H5_DLL char *H5Tget_tag(hid_t type);
00539 
00540 /* Querying property values */
00541 H5_DLL hid_t H5Tget_super(hid_t type);
00542 H5_DLL H5T_class_t H5Tget_class(hid_t type_id);
00543 H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls);
00544 H5_DLL size_t H5Tget_size(hid_t type_id);
00545 H5_DLL H5T_order_t H5Tget_order(hid_t type_id);
00546 H5_DLL size_t H5Tget_precision(hid_t type_id);
00547 H5_DLL int H5Tget_offset(hid_t type_id);
00548 H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/,
00549                           H5T_pad_t *msb/*out*/);
00550 H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id);
00551 H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos/*out*/,
00552                              size_t *epos/*out*/, size_t *esize/*out*/,
00553                              size_t *mpos/*out*/, size_t *msize/*out*/);
00554 H5_DLL size_t H5Tget_ebias(hid_t type_id);
00555 H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id);
00556 H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id);
00557 H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id);
00558 H5_DLL int H5Tget_nmembers(hid_t type_id);
00559 H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno);
00560 H5_DLL int H5Tget_member_index(hid_t type_id, const char *name);
00561 H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno);
00562 H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno);
00563 H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno);
00564 H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value/*out*/);
00565 H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id);
00566 H5_DLL htri_t H5Tis_variable_str(hid_t type_id);
00567 H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction);
00568 
00569 /* Setting property values */
00570 H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size);
00571 H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order);
00572 H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec);
00573 H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset);
00574 H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb);
00575 H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign);
00576 H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos,
00577                              size_t esize, size_t mpos, size_t msize);
00578 H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias);
00579 H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm);
00580 H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad);
00581 H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset);
00582 H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad);
00583 
00584 /* Type conversion database */
00585 H5_DLL herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id,
00586                            hid_t dst_id, H5T_conv_t func);
00587 H5_DLL herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id,
00588                              hid_t dst_id, H5T_conv_t func);
00589 H5_DLL H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata);
00590 H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
00591 H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts,
00592                           void *buf, void *background, hid_t plist_id);
00593 
00594 /* Symbols defined for compatibility with previous versions of the HDF5 API.
00595  *
00596  * Use of these symbols is deprecated.
00597  */
00598 #ifndef H5_NO_DEPRECATED_SYMBOLS
00599 
00600 /* Macros */
00601 
00602 
00603 /* Typedefs */
00604 
00605 
00606 /* Function prototypes */
00607 H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id);
00608 H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name);
00609 H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims,
00610             const hsize_t dim[/* ndims */],
00611             const int perm[/* ndims */]);
00612 H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]);
00613 
00614 #endif /* H5_NO_DEPRECATED_SYMBOLS */
00615 
00616 #ifdef __cplusplus
00617 }
00618 #endif
00619 #endif /* _H5Tpublic_H */
00620