Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5M_ITERATE

Iterates over all key-value pairs in a map object

Procedure:

H5M_ITERATE(map_id, idx, key_mem_type_id, op, op_data, dxpl_id)

Signature:

herr_t H5Miterate( hid_t map_id, hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op, void *op_data, hid_t dxpl_id )

 

Parameters:
hid_t map_idIN: Map object identifier
hsize_t *idxIN/OUT: iteration index
hid_t key_mem_type_idIN: Datatype identifier for a key in memory buffer for iterate function callback
H5M_iterate_t opIN: User-defined iterator function
hbool_t *op_dataIN/OUT: User-supplied context
hid_t dxpl_idIN: Property list

 

 

Description:

H5M_ITERATE  iterates over all key-value pairs stored in the map object specified by map_id, making the callback specified by op for each. The idx parameter is an in/out parameter that may be used to restart a previously interrupted iteration. At the start of iteration idx should be set to 0, and to restart iteration at the same location on a subsequent call to H5Miterate(), idx should be the same value as returned by the previous call. Iterate callback is defined as:

 herr_t (*H5M_iterate_t)(hid_t map_id, const void *key, void *op_data);


The key parameter is the buffer for the key for this iteration, converted to the datatype specified by key_mem_type_id. The op_data parameter is a simple pass through of the value passed to H5Miterate(), which can be used to store application-defined data for iteration. A negative return value from this function will cause H5Miterate() to issue an error, while a positive return value will cause H5Miterate() to stop iterating and return this value without issuing an error. A return value of zero allows iteration to continue.

 Any further options can be specified through the property list dxpl_id.

Returns:

Last value returned by callback function.

Example:
History:
ReleaseChange
1.13.0C function introduced in this release.

--- Last Modified: December 20, 2020 | 11:52 PM