Retrieves the type of an object
Procedure:
Signature:
H5I_type_t H5Iget_type( hid_t obj_id )
SUBROUTINE h5iget_type_f(obj_id, type, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id !Object identifier
INTEGER, INTENT(OUT) :: type !type of an object.
!possible values are:
!H5I_FILE_F
!H5I_GROUP_F
!H5I_DATATYPE_F
!H5I_DATASPACE_F
!H5I_DATASET_F
!H5I_ATTR_F
!H5I_BADID_F
INTEGER, INTENT(OUT) :: hdferr ! E rror code
! 0 on success, and -1 on failure
END SUBROUTINE h5iget_type_f
Parameters:
hid_t obj_id | IN: Object identifier whose type is to be determined |
Description:
H5I_GET_TYPE retrieves the type of the object identified by obj_id
.
Valid types returned by the function are
H5I_FILE | File |
H5I_GROUP | Group |
H5I_DATATYPE | Datatype |
H5I_DATASPACE | Dataspace |
H5I_DATASET | Dataset |
H5I_ATTR | Attribute |
If no valid type can be determined or the identifier submitted is invalid, the function returns
H5I_BADID | Invalid identifier |
This function is of particular value in determining the type of object closing function (H5D_CLOSE, H5G_CLOSE, etc.) to call after a call to H5R_DEREFERENCE.
Note that this function returns only the type of object that obj_id
would identify if it were valid; it does not determine whether obj_id
is valid identifier. Validity can be determined with a call to H5I_IS_VALID.
Returns:
Returns the object type if successful; otherwise H5I_BADID
.
Example:
--- Last Modified: April 25, 2019 | 12:07 PM