HDF5 documents and links Introduction to HDF5 HDF5 User Guide |
And in this document, the
HDF5 Reference Manual
H5 H5A H5D H5E H5F H5G H5I H5P H5R H5S H5T H5Z Tools Datatypes |
The C Interfaces:
The FORTRAN90 Interfaces:
In general, each FORTRAN90 subroutine performs exactly the same task
as the corresponding C function.
|
H5Rcreate
(void *ref
,
hid_t loc_id
,
const char *name
,
H5R_type_t ref_type
,
hid_t space_id
)
H5Rcreate
creates the reference, ref
,
of the type specified in ref_type
, pointing to
the object name
located at loc_id
.
The HDF5 library maps the void type specified above
for ref
to the type specified in ref_type
,
which will be one of those appearing in the first column of
the following table.
The second column of the table lists the HDF5 constant associated
with each reference type.
hdset_reg_ref_t | H5R_DATASET_REGION |
Dataset region reference |
hobj_ref_t | H5R_OBJECT |
Object reference |
The parameters loc_id
and name
are
used to locate the object.
The parameter space_id
identifies the region
to be pointed to for a dataset region reference.
This parameter is unused with object references.
ref
loc_id
name
loc_id
.
ref_type
space_id
To create an object reference
SUBROUTINE h5rcreate_f(loc_id, name, ref, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location ! specified by loc_id identifier TYPE(hobj_ref_t_f), INTENT(OUT) :: ref ! Object reference INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5rcreate_f
SUBROUTINE h5rcreate_f(loc_id, name, space_id, ref, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location ! specified by loc_id identifier INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5rcreate_f
H5Rdereference
(hid_t dataset
,
H5R_type_t ref_type
,
void *ref
)
H5Rdereference
opens that object and returns an identifier.
The parameter ref_type
specifies the reference type
of ref
.
ref_type
may contain either of the following values:
H5R_OBJECT
(0
)
H5R_DATASET_REGION
(1
)
dataset
ref_type
ref
.
ref
To dereference an object
SUBROUTINE h5rdereference_f(dset_id, ref, obj_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5rdereference_f
SUBROUTINE h5rdereference_f(dset_id, ref, obj_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object identifier INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5rdereference_f
H5Rget_obj_type
(hid_t id
,
H5R_type_t ref_type
,
void *ref
)
ref_type
,
and a reference to an object, ref
,
H5Rget_obj_type
returns the type of the referenced object.
Valid object reference types, to pass in as ref_type
,
include the following:
H5R_OBJECT | Reference is an object reference. | |
H5R_DATASET_REGION | Reference is a dataset region reference. |
Valid object type return values include the following:
H5G_LINK | Object is a symbolic link. | |
H5G_GROUP | Object is a group. | |
H5G_DATASET | Object is a dataset. | |
H5G_TYPE | Object is a named datatype. |
id
,
ref_type
ref
H5Gpublic.h
if successful;
otherwise returns H5G_UNKNOWN
.
SUBROUTINE h5rget_object_type_f(dset_id, ref, obj_type, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference INTEGER, INTENT(OUT) :: obj_type ! Object type ! H5G_UNKNOWN_F (-1) ! H5G_LINK_F 0 ! H5G_GROUP_F 1 ! H5G_DATASET_F 2 ! H5G_TYPE_F 3 INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5rget_object_type_f
H5Rget_object_type
(hid_t id
,
void *ref
)
H5_WANT_H5_V1_4_COMPAT
and is not
enabled in the binaries distributed by NCSA.
This function has been replaced in Release 1.6 by the function
H5Rget_obj_type
and will eventually be deleted from the HDF5 distribution.]
Given a reference to an object
ref
,
H5Rget_object_type
returns the
type of the object pointed to.
id
,
ref
H5Gpublic.h
;
otherwise returns H5G_UNKNOWN
.
H5Rget_region
(hid_t dataset
,
H5R_type_t ref_type
,
void *ref
)
ref
,
H5Rget_region
creates a copy of the dataspace
of the dataset pointed to and defines a selection in the copy
which is the region pointed to.
The parameter ref_type
specifies the reference type
of ref
.
ref_type
may contain the following value:
H5R_DATASET_REGION
(1
)
dataset
,
ref_type
,
ref
.
ref
SUBROUTINE h5rget_region_f(dset_id, ref, space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5rget_region_f
HDF5 documents and links Introduction to HDF5 HDF5 User Guide |
And in this document, the
HDF5 Reference Manual
H5 H5A H5D H5E H5F H5G H5I H5P H5R H5S H5T H5Z Tools Datatypes |