H5L_ITERATE_BY_NAME1 iterates through the links in a group, specified by
group_name, in the order of the specified index,
idx_type, using a user-defined callback routine
op. H5L_ITERATE_BY_NAME1 does not recursively follow links into subgroups of the specified group.
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. Valid values include the following:
|Alpha-numeric index on name|
|Index on creation order|
order specifies the order in which objects are to be inspected along the index specified in
idx_type. Valid values include the following:
|Fastest available order|
idx allows an interrupted iteration to be resumed; it is passed in by the application with a starting point and returned by the library with the point at which the iteration stopped.
H5L_ITERATE_BY_NAME1 is not recursive. In particular, if a member of
group_name is found to be a group, call it
subgroup_a, H5L_ITERATE_BY_NAME1 does not examine the members of
subgroup_a. When recursive iteration is required, the application must handle the recursion, explicitly calling H5L_ITERATE_BY_NAME1 on discovered subgroups.
H5L_ITERATE_BY_NAME1 assumes that the membership of the group being iterated over remains unchanged through the iteration; if any of the links in the group change during the iteration, the function’s behavior is undefined. Note, however, that objects pointed to by the links can be modified.
H5L_ITERATE_BY_NAME1 is the same as H5G_ITERATE, except that H5G_ITERATE always proceeds in alphanumeric order.
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 H5P_SET_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 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.