Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Retrieves the type of object that an object reference points to

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5R_GET_OBJ_TYPE2 ( loc_id, ref_type, ref, obj_type )

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">herr_t H5Rget_obj_type2(
    hid_t loc_id,
    H5R_type_t ref_type,
    void *ref,
    H5O_type_t *obj_type
    )
</code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">Replace this text with the Fortran function signature</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
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
H5O_type_t *obj_typeOUT: Type of referenced object

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

Given an object reference, ref, H5R_GET_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_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 H5Opublic.h):

H5O_TYPE_GROUPObject is a group
H5O_TYPE_DATASET  Object is a dataset
H5O_TYPE_NAMED_DATATYPEObject is a named datatype

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns a non-negative value if successful; otherwise returns a negative value.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5-examples
branchIdrefs/heads/master
projectKeyHDFFV
filepath1_10/C/H5T/h5ex_t_objref.c
showLineNumberstrue
lineStart118
progLangplain
lineEnd122
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5-examples
branchIdrefs/heads/master
projectKeyHDFFV
filepath1_10/FORTRAN/H5T/h5ex_t_objref_F03.f90
showLineNumberstrue
lineStart106
progLangplain
lineEnd110
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
C
Release    Change
1.8.0Function introduced in this release.