Open the nth object in a group
Procedure:
H5O_OPEN_BY_IDX(loc_id, group_name, index_type, order, n, lapl_id)
Signature:
hid_t H5Oopen_by_idx( hid_t loc_id, const char *group_name, H5_index_t index_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id )
SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, &
obj_id, hdferr, lapl_id)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: group_name
INTEGER , INTENT(IN) :: index_type
INTEGER , INTENT(IN) :: order
INTEGER(HSIZE_T), INTENT(IN) :: n
INTEGER(HID_T) , INTENT(OUT) :: obj_id
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
Parameters:
hid_t loc_id | IN: Location identifier; may be a file, group, dataset, named datatype or attribute identifier |
const char *group_name | IN: Name of group, relative to loc_id , in which object is located |
H5_index_t index_type | IN: Type of index by which objects are ordered |
H5_iter_order_t order | IN: Order of iteration within index |
hsize_t n | IN: Object to open |
hid_t lapl_id | IN: Link access property list |
Description:
H5O_OPEN_BY_IDX opens the nth object in the group specified by loc_id
and group_name
.
loc_id
specifies a location identifier. group_name
specifies the group relative to loc_id
in which the object can be found. If loc_id
fully specifies the group in which the object resides, group_name
can be a dot (.).
The specific object to be opened within the group is specified by index_type
, order
, and n
as follows:
index_type
specifies the type of index by which objects are ordered. Valid index types include H5_INDEX_NAME
, indexed by name, and H5_INDEX_CRT_ORDER
, indexed by creation order.order
specifies the order in which the links are to be referenced for the purposes of this function. Valid orders include H5_ITER_INC
for increasing order, H5_ITER_DEC
for decreasing order, and H5_ITER_NATIVE
. Rather than implying a particular order, H5_ITER_NATIVE
instructs the HDF5 library to iterate through the objects in the fastest available order, i.e., in a natural order.n
specifies the position of the object within the index. Note that this count is zero-based; 0
(zero) indicates that the function will return the value of the first object; if n
is 5
, the function will return the value of the sixth object; etc.
If lapl_id
specifies the link access property list to be used in accessing the object.
An object opened with this function should be closed when it is no longer needed so that resource leaks will not develop. H5O_CLOSE can be used to close groups, datasets, or committed datatypes.
Returns:
Returns an object identifier for the opened object if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.8.11 | Fortran subroutine introduced in this release. |
1.8.0 | Function introduced in this release. |
--- Last Modified: April 25, 2019 | 01:28 PM