H5Rget_obj_type2
(
hid_t loc_id
,
H5R_type_t ref_type
,
void *ref
,
H5O_type_t *obj_type
)
ref
,
H5Rget_obj_type2
retrieves the type of the referenced object in obj_type
.
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_OBJECT | Object 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:
H5Dget_type
on the dataset
containing the reference to get a datatype identifier
for the dataset’s datatype.
H5Tget_class
returns a datatype class.
H5T_REFERENCE
,
H5Tequal
can then be used to determine whether
the reference’s datatype is
H5T_STD_REF_OBJ
or
H5T_STD_REF_DSETREG
:
H5T_STD_REF_OBJ
,
the reference object type is H5R_OBJECT
.
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 H5Opublic.h
):
H5O_TYPE_GROUP | Object is a group. | |
H5O_TYPE_DATASET | Object is a dataset. | |
H5O_TYPE_NAMED_DATATYPE | Object is a named datatype. |
hid_t loc_id |
IN: The dataset containing the reference object or the group containing that dataset. |
H5R_type_t ref_type |
IN: Type of reference to query. |
void *ref |
IN: Reference to query. |
H5O_type_t *obj_type |
OUT: Type of referenced object. |
H5Rget_obj_type
macro description.
Release | C |
1.8.0 | Function introduced in this release. |