IN/OUT: Array containing pre- and post-conversion values H5Tconvertwill not resize this buffer; it must be large enough to hold the larger of the input and output data.
IN: Optional background buffer
IN: Dataset transfer property list identifier
H5T_CONVERT convertsnelmtselements from a source datatype, specified bysrc_type_id, to a destination datatype,dest_type_id. The source elements are packed inbufand on return the destination elements will be packed inbuf. That is, the conversion is performed in place.
The optional background buffer is for use with compound datatypes. It is an array ofnelmtsvalues for the destination datatype which can then be merged with the converted values to recreate the compound datatype. For instance,background might be an array of structs with theaandbfields already initialized and the conversion ofbufsupplies thecanddfield values.
The parameterplist_idcontains the dataset transfer property list identifier which is passed to the conversion functions. As of Release 1.2, this parameter is only used to pass along the variable-length datatype custom allocation information.
Programming Note for C++ Developers Using C Functions:
If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.
Examples of this kind of routine include callbacks such as H5P_SET_ELINK_CB and H5P_SET_TYPE_CONV_CBand functions such as H5T_CONVERTand H5E_WALK2.
Exiting the routine in its normal fashion allows the HDF5 C library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.
Returns a non-negative value if successful; otherwise returns a negative value.
Fortran subroutine added.
In C function,nelmtsparameter type changed tosize_t.
In C function,nelmtsparameter type changed tohsize_t.