Page tree









Iterates over all key-value pairs in a map object


H5M_ITERATE_BY_NAME(loc_id, map_name, idx, key_mem_type_id, op, op_data, dxpl_id, lapl_id)


herr_t H5Miterate_by_name( hid_t loc_id, const char *map_name, hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op, void *op_data, hid_t dxpl_id, hid_t lapl_id )


hid_t loc_idIN: Location identifier
const char *map_nameIN: Map object name relative to the location specified by loc_id
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
hid_t lapl_idIN: Link access property list identifier




H5M_ITERATE_BY_NAME   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.


Last value returned by callback function.

1.13.0C function introduced in this release.

--- Last Modified: December 24, 2020 | 08:53 AM