Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5L_ITERATE1

Iterates through links in a group

As of HDF5-1.12 this function has been deprecated in favor of the function H5L_ITERATE2 or the macro  H5L_ITERATE.

Procedure:

H5L_ITERATE1 ( group_id, idx_type, order, idx_p, op, op_data )

Signature:

herr_t H5Literate1 ( hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
    hsize_t *idx_p, H5L_iterate1_t op, void *op_data )
)

SUBROUTINE h5literate_f(group,index_type, order, position,
           op, ctx, return_value, hdferr)
    INTEGER(HID_T) , INTENT(IN) :: group
    INTEGER , INTENT(IN) :: index_type
    INTEGER , INTENT(IN) :: order
    INTEGER(HSIZE_T), INTENT(INOUT) :: position
    TYPE(C_FUNPTR) , INTENT(IN) :: op
    TYPE(C_PTR) , INTENT(IN) :: ctx
    INTEGER , INTENT(OUT) :: return_value
    INTEGER , INTENT(OUT) :: hdferr
Parameters:
NameModeKindDescription
group_idINhandleFile or group identifier
idx_typeINchoiceIndex for iteration order
orderINchoiceTraversal order
idx_pINOUTintegerIteration position
opINdelegateUser-defined operator
op_dataINOUTopaqueUser-supplied context
Description:

H5L_ITERATE1 iterates through the links in a file or group, group_id, in the order of the specified index, idx_type, using a user-defined callback routine op.H5L_ITERATE1 does not recursively follow links into subgroups of the specified group.

Three parameters are used to manage progress of the iteration: idx_type, order, and idx_p.

idx_type specifies the index to be used. If the links have not been indexed by the index type, they will first be sorted by that index then the iteration will begin; if the links have been so indexed, the sorting step will be unnecessary, so the iteration may begin more quickly.

The choices for idx_type are:

NameMeaning
H5_INDEX_NAMELexicographic order
H5_INDEX_CRT_ORDERCreation order

order specifies the order in which objects are to be inspected along the index idx_type. The choices for order are:

Name

Meaning

H5_ITER_INCIncreasing order
H5_ITER_DECDecreasing order
H5_ITER_NATIVEFastest order

idx_p tracks the iteration and allows an iteration to be resumed if it was stopped before all members were processed. It is passed in by the application with a starting point and returned by the library with the point at which the iteration stopped.

The op callback function, the related H5L_info1_t struct, and the effect of the callback function’s return value on the application are described in H5L_VISIT.

op_data is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the op callback function’s op_data parameter.

op is invoked for each link encounter:

Signature:
herr_t (*H5L_iterate1_t)
(
  hid_t               group,
  const char*         name,
  const H5L_info1_t*  info,
  void*               op_data
)
Info:
typedef struct {
    H5L_type_t     type;         /* Type of link                   */
    hbool_t        corder_valid; /* Indicates whether creation     */
                                 /* order is valid                 */
    int64_t        corder;       /* Creation order                 */
    H5T_cset_t     cset;         /* Character set of link name     */
    union {
        haddr_t    address;      /* Address hard link points to    */
        size_t     val_size;     /* Size of soft link or           */
                                 /* user-defined link value        */
    } u;
} H5L_info1_t;
Returns:
Return valueMeaning
0Continue iteration
> 0Stop iteration; successful termination
< 0Stop iteration; abnormal termination

op_data is passed to and from each iteration and can be used to supply or aggregate information across iterations.

The behavior of H5L_ITERATE1 is undefined if the link membership of group_id changes during the iteration. This does not limit the ability to change link destinations while iterating, but caution is advised.

For recursive behavior, see the following:

H5L_VISIT1

H5L_VISIT_BY_NAME1

H5O_VISIT

H5O_VISIT_BY_NAME

Returns:

On success, returns the return value of the first operator that returns a positive value, or zero if all members were processed with no operator returning non-zero.

On failure, returns a negative value if something goes wrong within the library, or the first negative value returned by an operator. 

Example:

Include Bitbucket Server for Confluence: An error occured

Connection to Bitbucket Server could not be established. Verify that you have properly configured the Bitbucket Server application link for your Confluence space and that your Bitbucket Server instance is up and running. Error details: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Include Bitbucket Server for Confluence: An error occured

Connection to Bitbucket Server could not be established. Verify that you have properly configured the Bitbucket Server application link for your Confluence space and that your Bitbucket Server instance is up and running. Error details: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

History:
ReleaseChange
1.12.0Function was renamed from H5L_ITERATE and deprecated.
1.8.8Fortran subroutine added.
1.8.0C function introduced.

--- Last Modified: March 12, 2020 | 01:55 PM