summaryrefslogtreecommitdiffstats
path: root/src/H5Tpublic.h
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-01-14 19:42:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-01-14 19:42:59 (GMT)
commitd70c7d7a64b821f9d3532cc01c7a7fa934f2a17d (patch)
tree5b7750fffd98153d874bb28daad40c49ac977eeb /src/H5Tpublic.h
parent1063eb8a1ea0cbdbdc4244f0627b94b3096d65ab (diff)
downloadhdf5-d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d.zip
hdf5-d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d.tar.gz
hdf5-d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d.tar.bz2
[svn-r153] Changes since 19980108
---------------------- ./MANIFEST ./src/H5Dconv.c [REMOVED] ./src/H5Tconv.c [NEW] ./src/Makefile.in Changed H5Dconv.c to H5Tconv.c ./html/Datatypes.html Updated data type conversion section. ./html/H5.apiv2.html Removed sections about datasets and data types since they're covered in their own chapters. ./src/H5D.c Supports data type conversion. ./src/H5Odtype.c ./src/H5Tpkg.h Changed `lo_pad' and `hi_pad' to `lsb_pad' and `msb_pad'. ./src/H5T.c ./src/H5Tpkg.h ./src/H5Tprivate.h ./src/H5Tpublic.h ./src/H5detect.c Added predefined data types. Added query/set more properties. Added type conversion infrastructure. ./test/dsets.c Tests data type conversion during read.
Diffstat (limited to 'src/H5Tpublic.h')
-rw-r--r--src/H5Tpublic.h75
1 files changed, 66 insertions, 9 deletions
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 907aff1..291282a 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -32,7 +32,9 @@ typedef enum H5T_class_t {
H5T_STRING =3, /*character string types */
H5T_BITFIELD =4, /*bit field types */
H5T_OPAQUE =5, /*opaque types */
- H5T_COMPOUND =6 /*compound types */
+ H5T_COMPOUND =6, /*compound types */
+
+ H5T_NCLASSES =7 /*This must be last */
} H5T_class_t;
/* Byte orders */
@@ -51,7 +53,7 @@ typedef enum H5T_sign_t {
H5T_SGN_NONE =0, /*this is an unsigned type */
H5T_SGN_2 =1, /*two's complement */
- H5T_SGN_N =2 /*this must be last */
+ H5T_NSGN =2 /*this must be last! */
} H5T_sign_t;
/* Floating-point normalization schemes */
@@ -66,14 +68,18 @@ typedef enum H5T_norm_t {
/* Character set to use for text strings */
typedef enum H5T_cset_t {
H5T_CSET_ERROR =-1, /*error */
- H5T_CSET_ASCII =0 /*US ASCII */
+ H5T_CSET_ASCII =0, /*US ASCII */
+
+ H5T_NCSET =1 /*this must be last! */
} H5T_cset_t;
/* Type of padding to use in character strings */
typedef enum H5T_str_t {
H5T_STR_ERROR =-1, /*error */
H5T_STR_NULL =0, /*pad with null term like in C */
- H5T_STR_SPACE =1 /*pad with spaces like in Fortran */
+ H5T_STR_SPACE =1, /*pad with spaces like in Fortran */
+
+ H5T_NSTR =2 /*this must be last! */
} H5T_str_t;
/* Type of padding to use in other atomic types */
@@ -86,6 +92,9 @@ typedef enum H5T_pad_t {
H5T_NPAD =3 /*THIS MUST BE LAST */
} H5T_pad_t;
+/* All data type conversion functions are... */
+typedef herr_t (*H5T_conv_t)(hid_t, hid_t, size_t, void*, const void*);
+
#define HOFFSET(S,M) ((const char*)&S.M-(const char*)&S)
#define HPOFFSET(P,M) ((const char*)&(P->M)-(const char*)P)
@@ -98,8 +107,29 @@ typedef enum H5T_pad_t {
#define H5T_NATIVE_UINT (H5init(), H5T_NATIVE_UINT_g)
#define H5T_NATIVE_LONG (H5init(), H5T_NATIVE_LONG_g)
#define H5T_NATIVE_ULONG (H5init(), H5T_NATIVE_ULONG_g)
+#define H5T_NATIVE_LLONG (H5init(), H5T_NATIVE_LLONG_g)
+#define H5T_NATIVE_ULLONG (H5init(), H5T_NATIVE_ULLONG_g)
+#define H5T_NATIVE_HYPER (H5init(), H5T_NATIVE_HYPER_g)
+#define H5T_NATIVE_UHYPER (H5init(), H5T_NATIVE_UHYPER_g)
+#define H5T_NATIVE_INT8 (H5init(), H5T_NATIVE_INT8_g)
+#define H5T_NATIVE_UINT8 (H5init(), H5T_NATIVE_UINT8_g)
+#define H5T_NATIVE_INT16 (H5init(), H5T_NATIVE_INT16_g)
+#define H5T_NATIVE_UINT16 (H5init(), H5T_NATIVE_UINT16_g)
+#define H5T_NATIVE_INT32 (H5init(), H5T_NATIVE_INT32_g)
+#define H5T_NATIVE_UINT32 (H5init(), H5T_NATIVE_UINT32_g)
+#define H5T_NATIVE_INT64 (H5init(), H5T_NATIVE_INT64_g)
+#define H5T_NATIVE_UINT64 (H5init(), H5T_NATIVE_UINT64_g)
#define H5T_NATIVE_FLOAT (H5init(), H5T_NATIVE_FLOAT_g)
#define H5T_NATIVE_DOUBLE (H5init(), H5T_NATIVE_DOUBLE_g)
+#define H5T_NATIVE_TIME (H5init(), H5T_NATIVE_TIME_g)
+#define H5T_NATIVE_STRING (H5init(), H5T_NATIVE_STRING_g)
+#define H5T_NATIVE_BITFIELD (H5init(), H5T_NATIVE_BITFIELD_g)
+#define H5T_NATIVE_OPAQUE (H5init(), H5T_NATIVE_OPAQUE_g)
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
extern hid_t H5T_NATIVE_CHAR_g;
extern hid_t H5T_NATIVE_UCHAR_g;
@@ -108,19 +138,32 @@ extern hid_t H5T_NATIVE_USHORT_g;
extern hid_t H5T_NATIVE_INT_g;
extern hid_t H5T_NATIVE_UINT_g;
extern hid_t H5T_NATIVE_LONG_g;
+extern hid_t H5T_NATIVE_INT8_g;
+extern hid_t H5T_NATIVE_UINT8_g;
+extern hid_t H5T_NATIVE_INT16_g;
+extern hid_t H5T_NATIVE_UINT16_g;
+extern hid_t H5T_NATIVE_INT32_g;
+extern hid_t H5T_NATIVE_UINT32_g;
+extern hid_t H5T_NATIVE_INT64_g;
+extern hid_t H5T_NATIVE_UINT64_g;
extern hid_t H5T_NATIVE_ULONG_g;
+extern hid_t H5T_NATIVE_LLONG_g;
+extern hid_t H5T_NATIVE_ULLONG_g;
+extern hid_t H5T_NATIVE_HYPER_g;
+extern hid_t H5T_NATIVE_UHYPER_g;
extern hid_t H5T_NATIVE_FLOAT_g;
extern hid_t H5T_NATIVE_DOUBLE_g;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+extern hid_t H5T_NATIVE_TIME_g;
+extern hid_t H5T_NATIVE_STRING_g;
+extern hid_t H5T_NATIVE_BITFIELD_g;
+extern hid_t H5T_NATIVE_OPAQUE_g;
/* Operations defined on all data types */
hid_t H5Tcreate (H5T_class_t type, size_t size);
hid_t H5Tcopy (hid_t type_id);
herr_t H5Tclose (hid_t type_id);
hbool_t H5Tequal (hid_t type1_id, hid_t type2_id);
+herr_t H5Tlock (hid_t type_id);
/* Operations defined on compound data types */
herr_t H5Tinsert (hid_t parent_id, const char *name, off_t offset,
@@ -133,30 +176,44 @@ size_t H5Tget_size (hid_t type_id);
H5T_order_t H5Tget_order (hid_t type_id);
size_t H5Tget_precision (hid_t type_id);
size_t H5Tget_offset (hid_t type_id);
+herr_t H5Tget_pad (hid_t type_id, H5T_pad_t *lsb/*out*/,
+ H5T_pad_t *msb/*out*/);
H5T_sign_t H5Tget_sign (hid_t type_id);
herr_t H5Tget_fields (hid_t type_id, size_t *spos/*out*/,
size_t *epos/*out*/, size_t *esize/*out*/,
size_t *mpos/*out*/, size_t *msize/*out*/);
size_t H5Tget_ebias (hid_t type_id);
H5T_norm_t H5Tget_norm (hid_t type_id);
+H5T_pad_t H5Tget_inpad (hid_t type_id);
+H5T_str_t H5Tget_strpad (hid_t type_id);
intn H5Tget_nmembers (hid_t type_id);
char *H5Tget_member_name (hid_t type_id, int membno);
size_t H5Tget_member_offset (hid_t type_id, int membno);
int H5Tget_member_dims (hid_t type_id, int membno,
int dims[]/*out*/, int perm[]/*out*/);
hid_t H5Tget_member_type (hid_t type_id, int membno);
+H5T_cset_t H5Tget_cset (hid_t type_id);
/* Setting property values */
herr_t H5Tset_size (hid_t type_id, size_t size);
herr_t H5Tset_order (hid_t type_id, H5T_order_t order);
herr_t H5Tset_precision (hid_t type_id, size_t prec);
herr_t H5Tset_offset (hid_t type_id, size_t offset);
+herr_t H5Tset_pad (hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb);
herr_t H5Tset_sign (hid_t type_id, H5T_sign_t sign);
herr_t H5Tset_fields (hid_t type_id, size_t spos, size_t epos, size_t esize,
size_t mpos, size_t msize);
herr_t H5Tset_ebias (hid_t type_id, size_t ebias);
herr_t H5Tset_norm (hid_t type_id, H5T_norm_t norm);
-
+herr_t H5Tset_inpad (hid_t type_id, H5T_pad_t pad);
+herr_t H5Tset_cset (hid_t type_id, H5T_cset_t cset);
+herr_t H5Tset_strpad (hid_t type_id, H5T_str_t strpad);
+
+/* Type conversion database */
+herr_t H5Tregister_hard (hid_t src_id, hid_t dst_id, H5T_conv_t func);
+herr_t H5Tregister_soft (H5T_class_t src, H5T_class_t dst, H5T_conv_t func);
+herr_t H5Tunregister (H5T_conv_t func);
+H5T_conv_t H5Tfind (hid_t src_id, hid_t dst_id);
#ifdef __cplusplus
}