H5Tregister
(
H5T_pers_t pers
,
const char * name
,
hid_t src_id
,
hid_t dst_id
,
H5T_conv_t func
)
H5Tregister
registers a hard or soft conversion function
for a datatype conversion path.
The parameter pers
indicates whether a conversion function
is hard (H5T_PERS_HARD
)
or soft (H5T_PERS_SOFT
).
A conversion path can have only one hard function.
When pers
is H5T_PERS_HARD
,
func
replaces any previous hard function.
If pers
is H5T_PERS_HARD
and
func
is the null pointer, then any hard function
registered for this path is removed.
When pers
is H5T_PERS_SOFT
,
H5Tregister
adds the function to the end of the master soft list and replaces
the soft function in all applicable existing conversion paths.
Soft functions are used when determining which conversion function
is appropriate for this path.
The name
is used only for debugging and should be a
short identifier for the function.
The path is specified by the source and destination datatypes
src_id
and dst_id
.
For soft conversion functions, only the class of these types is important.
The type of the conversion function pointer is declared as:
typedef
herr_t (*H5T_conv_t
) (hid_tsrc_id
, hid_tdst_id
, H5T_cdata_t *cdata
, size_tnelmts
, size_tbuf_stride
, size_tbkg_stride
, void *buf
, void *bkg
, hid_tdset_xfer_plist
)
The H5T_cdata_t
struct is declared as:
typedef
struct*H5T_cdata_t
(H5T_cmd_tcommand
, H5T_bkg_tneed_bkg
, hbool_t *recalc
, void *priv
)
The H5T_conv_t
parameters and
the elements of the H5T_cdata_t
struct
are described more fully in the
“Data Conversion”
section of “The Datatype Interface (H5T)”
in the HDF5 User's Guide.
H5T_pers_t pers |
H5T_PERS_HARD for hard conversion functions;
H5T_PERS_SOFT for soft conversion functions. |
const char * name |
Name displayed in diagnostic output. |
hid_t src_id |
Identifier of source datatype. |
hid_t dst_id |
Identifier of destination datatype. |
H5T_conv_t func |
Function to convert between source and destination datatypes. |
Release | C |
1.6.3 |
The following change occurred in the
H5Tconv_t function:nelmts parameter type changed to
size_t. |