Page tree

The license could not be verified: License Certificate has expired!

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

Iterates an operation over the entries of a group

.

HTML Wrap
classhdf-rm-content-block
Note

This function is deprecated in favor of the function H5L_ITERATE.

Hdf rm anchor
AnchorNameprocedure

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

H5G_ITERATE(loc_id, name, idx, operator, operator_data)

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">int H5Giterate(hid_t loc_id, const char *name, int *idx, H5G_iterate_t operator, void *operator_data )</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

There is no direct FORTRAN

couterpart

counterpart for the C function H5Giterate. Instead, that functionality is provided by two FORTRAN functions:

HTML
<pre><code class="language-fortran">SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr)           
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: loc_id        ! File or group identifier 
  CHARACTER(LEN=*), INTENT(IN) :: name        ! Name of the group 
  INTEGER, INTENT(OUT) :: nmembers            ! Number of members in the group
  INTEGER, INTENT(OUT) :: hdferr              ! Error code 
                                              ! 0 on success and -1 on failure
END SUBROUTINE h5gn_members_f</code></pre>
HTML
<pre><code class="language-fortran">SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & 
                                 obj_name, obj_type, hdferr)           
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: loc_id        ! File or group identifier 
  CHARACTER(LEN=*), INTENT(IN) :: name        ! Name of the group 
  INTEGER, INTENT(IN) :: idx                  ! Index of member object 
  CHARACTER(LEN=*), INTENT(OUT) :: obj_name   ! Name of the object 
  INTEGER, INTENT(OUT) :: obj_type            ! Object type : 
                                              !     H5G_LINK_F 
                                              !     H5G_GROUP_F 
                                              !     H5G_DATASET_F 
                                              !     H5G_TYPE_F 
  INTEGER, INTENT(OUT) :: hdferr              ! Error code 
                                              ! 0 on success and -1 on failure
END SUBROUTINE h5gget_obj_info_idx_f</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t loc_idIN: File or group identifier

.

const char *nameIN: Group over which the iteration is performed

.

int *idxIN/OUT: Location at which to begin the iteration

.

H5G_iterate_t operator    IN: Operation to be performed on an object at each step of the iteration

.

void *operator_dataIN/OUT: Data associated with the operation

. iterates

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5Giterate

H5G_ITERATE iterates over the members of name in the file or group specified with loc_id. For each object in the group, the operator_data and some additional information, specified below, are passed to the operator function. The iteration begins with the idx object in the group and the next element to be processed by the operator is returned in idx. If idx is NULL, then the iterator starts at the first group member; since no stopping point is returned in this case, the iterator cannot be restarted if one of the calls to its operator returns non-zero.

 H5Giterate does

H5G_ITERATE does not recursively follow links into subgroups of the specified group.

The prototype for H5G_iterate_t is:

    typedef herr_t (*H5G_iterate_t) (hid_t group_idconst char * member_namevoid *operator_data);

 

The operation receives the group identifier for the group being iterated over, group_id, the name of the current object within the group, member_name, and the pointer to the operator data passed in to 

H5Giterate

H5G_ITERATEoperator_data.

The return values from an operator are:

  • Zero causes the iterator to continue, returning zero when all group members have been processed.
  • Positive causes the iterator to immediately return that positive value, indicating short-circuit success. The iterator can be restarted at the next group member.
  • Negative causes the iterator to immediately return that value, indicating failure. The iterator can be restarted at the next group member.

H5Giterate assumes

H5G_ITERATE assumes that the membership of the group identified by name remains unchanged through the iteration. If the membership changes during the iteration, the function's behavior is undefined.

H5Giterate is

H5G_ITERATE is not recursive. In particular, if a member of name is found to be a group, call it subgroup_a,

 H5Giterate does

H5G_ITERATE does not examine the members of subgroup_a. When recursive iteration is required, the application must handle the recursion, explicitly

calling H5Giterate on

calling H5G_ITERATE on discovered subgroups.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns the return value of the last operator if it was non-zero, or zero if all group members were processed. Otherwise returns a negative value.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming soon!

Comment (Hide)
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

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

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

html-wrap

 

class

hdf-

togglebox hdf-cxx hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathc++/examples/create.cpp
showLineNumberstrue
lineStart33
progLangcpp
lineEnd43
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-java hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathjava/examples/datasets/H5Ex_D_Chunk.java
showLineNumberstrue
lineStart32
progLangjava
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

hdf-

rm-anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    

C

Change
1.8.0Function deprecated in this release.