Commits a transient datatype, linking it into the file and creating a new committed datatype
Procedure:
H5T_COMMIT2(loc_id, name, dtype_id, lcpl_id, tcpl_id, tapl_id)
Signature:
herr_t H5Tcommit2( hid_t loc_id, const char *name, hid_t dtype_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id )
SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, &
lcpl_id, tcpl_id, tapl_id )
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group
INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id
! Link creation property list
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id
! Datatype creation property list
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id
! Datatype access property list
END SUBROUTINE h5tcommit_f
Parameters:
hid_t loc_id | IN: Location identifier |
const char *name | IN: Name given to committed datatype |
hid_t dtype_id | IN: Identifier of datatype to be committed and, upon function’s return, identifier for the committed datatype |
hid_t lcpl_id | IN: Link creation property list |
hid_t tcpl_id | IN: Datatype creation property list |
hid_t tapl_id | IN: Datatype access property list |
Description:
H5T_COMMIT2 saves a transient datatype as an immutable committed datatype in a file. The datatype specified by dtype_id
is committed to the file with the name name
at the location specified by loc_id
and with the datatype creation and access property lists tcpl_id
and tapl_id
, respectively.
loc_id
may be a file identifier, or a group identifier within that file. name
may be either an absolute path in the file or a relative path from loc_id
naming the newly-commited datatype.
The link creation property list, lcpl_id
, governs creation of the link(s) by which the new committed datatype is accessed and the creation of any intermediate groups that may be missing.
Once commited, this datatype may be used to define the datatype of any other dataset or attribute in the file.
This function will not accept a datatype that cannot actually hold data. This currently includes compound datatypes with no fields and enumerated datatypes with no members.
Committed datatypes are sometimes referred to as named datatypes.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
History:
Release | Change
|
---|
1.8.7 | Function modified in this release to reject datatypes that will not accomodate actual data, such as a compound datatype with no fields or an enumerated datatype with no members. |
1.8.0 | Function introduced in this release. |
--- Last Modified: May 03, 2019 | 03:16 PM