Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5R_GET_OBJ_TYPE1

Retrieves the type of object that an object reference points to (DEPRECATED)

This function has been renamed from H5Rget_obj_type and is deprecated in favor of the macro H5R_GET_OBJ_TYPE or the function H5R_GET_OBJ_TYPE2.

Procedure:

H5R_GET_OBJ_TYPE1 ( loc_id, ref_type, ref )

Signature:

H5G_obj_t H5Rget_obj_type1(
    hid_t loc_id,
    H5R_type_t ref_type,
    void *ref
    )

Fortran90 Interface: h5rget_object_type_f
   
Signature:
  SUBROUTINE h5rget_object_type_f(loc_id, ref, obj_type, hdferr)
    INTEGER(HID_T)    , INTENT(IN)  :: loc_id
    TYPE(hobj_ref_t_f), INTENT(IN)  :: ref
    INTEGER           , INTENT(OUT) :: obj_type
    INTEGER           , INTENT(OUT) :: hdferr

Inputs:
  loc_id   - Identifier for the dataset containing the reference or
             for the group that dataset is in.
  ref_type - Type of reference to query.
  ref      - Reference to query.

Outputs:
  obj_type - Type of referenced object. 
               H5G_UNKNOWN_F 
               H5G_LINK_F      
               H5G_GROUP_F     
               H5G_DATASET_F   
               H5G_TYPE_F      

  hdferr   - Returns 0 if successful and -1 if fails


Fortran2003 Interface: h5rget_object_type_f

Signature:
  SUBROUTINE h5rget_object_type_f(loc_id, ref_type, ref, obj_type, hdferr)
    INTEGER(HID_T), INTENT(IN)  :: loc_id
    INTEGER       , INTENT(IN)  :: ref_type
    TYPE(C_PTR)   , INTENT(IN)  :: ref
    INTEGER       , INTENT(OUT) :: obj_type
    INTEGER       , INTENT(OUT) :: hdferr

Inputs:
  loc_id   - Identifier for the dataset containing the reference or
             for the group that dataset is in.
  ref_type - Type of reference to query.
  ref      - Reference to query.

Outputs:
  obj_type - Type of referenced object. 
               H5G_UNKNOWN_F 
               H5G_LINK_F      
               H5G_GROUP_F     
               H5G_DATASET_F   
               H5G_TYPE_F      

  hdferr   - Returns 0 if successful and -1 if fails

Parameters:
hid_t loc_idIN: The dataset containing the reference object or the group containing that dataset
H5R_type_t ref_type    IN: Type of reference to query
void *refIN: Reference to query

Description:

Given an object reference, ref, H5R_GET_OBJ_TYPE1 returns the type of the referenced object.

A reference type is the type of reference, either an object reference or a dataset region reference. An object reference points to an HDF5 object while a dataset region reference points to a defined region within a dataset.

The referenced object is the object the reference points to. The referenced object type, or the type of the referenced object, is the type of the object that the reference points to.

The location identifier, loc_id, is the identifier for either the dataset containing the object reference or the group containing that dataset.

Valid reference types, to pass in as ref_type, include the following:

H5R_OBJECTObject reference
H5R_DATASET_REGION  Dataset region reference

If the application does not already know the object reference type, that can be determined with three preliminary calls:

  • Call H5D_GET_TYPE on the dataset containing the reference to get a datatype identifier for the dataset’s datatype.
  • Using that datatype identifier, H5T_GET_CLASS returns a datatype class.
    If the datatype class is H5T_REFERENCE, H5T_EQUAL can then be used to determine whether the reference’s datatype is H5T_STD_REF_OBJ or H5T_STD_REF_DSETREG:
       - If the datatype is H5T_STD_REF_OBJ, the reference object type is H5R_OBJECT.
       - If the datatype is H5T_STD_REF_DSETREG, the reference object type is H5R_DATASET_REGION.

When the function completes successfully, it returns one of the following valid object type values (defined in H5Gpublic.h):

H5G_LINKObject is a symbolic link.
H5G_GROUPObject is a group.
H5G_DATASET  Object is a dataset.
H5G_TYPEObject is a named datatype.

Returns:

Returns a valid object type if successful; otherwise returns a negative value (H5G_UNKNOWN).

History:
Release    Change
1.8.0Function H5Rget_obj_type renamed to H5Rget_obj_type1 and deprecated in this release.
1.6.0Function introduced in this release.

--- Last Modified: June 16, 2020 | 12:33 PM