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

Finds the memory referred to by an ID within the given ID type such that some criterion is satisfied

. searches

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

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

H5I_SEARCH(type, func, key)

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">void *H5Isearch( H5I_type_t type, H5I_search_func_t func, void *key )</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
H5I_type_t typeIN: The identifier of the type to be searched
H5I_search_func_t func    IN: The function defining the search criteria
void *keyIN: A key for the search function

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5Isearch

H5I_SEARCH searches through a given ID type to find an object that satisfies the criteria defined by func. If such an object is found, the pointer to the memory containing this object is returned. Otherwise, NULL is returned. To do this, func is called on every member of type. The first member to satisfy func is returned.

The type parameter is the identifier for the ID type which is to be searched. This identifier must have been created by a call

to H5Iregister_type

to H5I_REGISTER_TYPE.

The parameter func is a function pointer to a function which takes three parameters. The first parameter is a void * and will be a pointer to the object to be tested. This is the same object that was placed in storage

using H5Iregister

using H5I_REGISTER. The second parameter is a hid_t and is the ID of the object to be tested. The last parameter is a void *. This is the key parameter and can be used however the user finds helpful, or it can be ignored if it is not needed. func returns 0 if the object it is testing does not pass its criteria. A non-zero value should be returned if the object does pass its criteria. H5I_search__func_t is defined in H5Ipublic.h and is shown below.

typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key);

The key parameter will be passed to the search function as a parameter. It can be used to further define the search at run-time.

Note

Programming Note for C++ Developers Using C Functions:

If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.

Examples of this kind of routine include callbacks such

as H5Pset

as H5P_

elink

SET_

cb and H5Pset_type_conv_cb and functions such as H5Tconvert and H5Ewalk2

ELINK_CB and H5P_SET_TYPE_CONV_CB and functions such as H5T_CONVERT and H5E_WALK2.

Exiting the routine in its normal fashion allows the HDF5 C

Library

library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns a pointer to the object which satisfies the search function on success, NULL on failure.

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