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

Calls a user’s function for each attribute on an object (DEPRECATED)

HTML Wrap
classhdf-rm-content-block
Note

This function is deprecated in favor of the function H5A_ITERATE2.

Hdf rm anchor
AnchorNameprocedure

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

H5A_ITERATE1 ( loc_Id, idx, op, op_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">herr_t H5Aiterate1(
        hid_t loc_id,
        unsigned * idx,
        H5A_operator1_t op,
        void *op_data
    )
</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t loc_idIN: Identifier of a file, group, dataset or named datatype
unsigned * idxIN/OUT: Starting (IN) and ending (OUT) attribute index
H5A_operator1_t op    IN: User's function to pass each attribute to
void * op_dataIN/OUT: User's data to pass through to iterator operator function

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5A_ITERATE1 iterates over the attributes of the object specified by its identifier, loc_id. The object can be a file, group, dataset, or named datatype. For each attribute of the object, the op_data and some additional information specified below are passed to the operator function op. The iteration begins with the attribute specified by its index, idx; the index for the next attribute to be processed by the operator, op, is returned in idx. If idx is the null pointer, then all attributes are processed.

The prototype for H5A_operator_t is:
typedef herr_t (*H5A_operator1_t)(hid_t loc_id, const char *attr_name, void *operator_data);

The operation receives the identifier for the group, dataset or named datatype being iterated over, loc_id, the name of the current attribute about the object, attr_name, and the pointer to the operator data passed in to H5A_ITERATE1, op_data. The return values from an operator are:

  • Zero causes the iterator to continue, returning zero when all attributes 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 attribute.
  • Negative causes the iterator to immediately return that value, indicating failure. The iterator can be restarted at the next attribute.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

If successful, returns the return value of the last operator if it was non-zero, or zero if all attributes were processed. Otherwise returns a negative value.

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming Soon!

Comment
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

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    C
1.8.0The function H5Aiterate renamed to H5Aiterate1 and deprecated in this release.