HDF5  1.12.0
H5L: Link Interface

The Link interface, H5L, functions create and manipulate links in an HDF5 group. This interface includes functions that enable the creation and use of user-defined link classes. More...

Typedefs

typedef enum H5_index_t H5_index_t
 

Enumerations

enum  H5_index_t { H5_INDEX_UNKNOWN = -1, H5_INDEX_NAME, H5_INDEX_CRT_ORDER, H5_INDEX_N }
 

Functions

herr_t H5Literate2 (hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx_p, H5L_iterate2_t op, void *op_data)
 
herr_t H5Literate_by_name2 (hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx_p, H5L_iterate2_t op, void *op_data, hid_t lapl_id)
 
herr_t H5Lvisit2 (hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate2_t op, void *op_data)
 

Detailed Description

The Link interface, H5L, functions create and manipulate links in an HDF5 group. This interface includes functions that enable the creation and use of user-defined link classes.

Typedef Documentation

◆ H5_index_t

typedef enum H5_index_t H5_index_t

The types of indices on links in groups/attributes on objects. Primarily used for "<do> <foo> by index" routines and for iterating over links in groups/attributes on objects. ()

Enumeration Type Documentation

◆ H5_index_t

enum H5_index_t
related

The types of indices on links in groups/attributes on objects. Primarily used for "<do> <foo> by index" routines and for iterating over links in groups/attributes on objects. ()

Enumerator
H5_INDEX_UNKNOWN 

Unknown index type

H5_INDEX_NAME 

Index on names

H5_INDEX_CRT_ORDER 

Index on creation order

H5_INDEX_N 

Number of indices defined

Function Documentation

◆ H5Literate2()

herr_t H5Literate2 ( hid_t  group_id,
H5_index_t  idx_type,
H5_iter_order_t  order,
hsize_t *  idx_p,
H5L_iterate2_t  op,
void *  op_data 
)

Iterates over links in a group, with user callback routine, according to the order within an index.

Same pattern of behavior as H5Giterate.

Returns
Success: The return value of the first operator that returns non-zero, or zero if all members were processed with no operator returning non-zero. Failure: Negative if something goes wrong within the library, or the negative value returned by one of the operators.
Parameters
group_idThe group ID to iterate over
idx_typeThe index type
orderSpecifies the order how to iterate
idx_pPointer to an iteration index such to allow continuing a previous iteration
opFunction pointer for a callback operation to be invoked at each iteration
op_dataUser-defined data structure that will be passed on to the callback function
See also
See also H5Literate_by_name(), H5Lvisit2(), H5Lvisit_by_name()
Note
This function is also available through the H5Literate() macro.

References FAIL, H5_INDEX_N, H5_ITER_N, H5E_BADVALUE, H5I_FILE, H5I_get_type(), H5I_GROUP, H5I_object(), H5VL_LINK_ITER, H5VL_link_specific(), H5VL_OBJECT_BY_SELF, NULL, H5VL_loc_params_t::obj_type, ret_value, and H5VL_loc_params_t::type.

◆ H5Literate_by_name2()

herr_t H5Literate_by_name2 ( hid_t  loc_id,
const char *  group_name,
H5_index_t  idx_type,
H5_iter_order_t  order,
hsize_t *  idx_p,
H5L_iterate2_t  op,
void *  op_data,
hid_t  lapl_id 
)

Iterates over links in a group, with user callback routine, according to the order within an index.

Same pattern of behavior as H5Giterate.

Returns
Success: The return value of the first operator that returns non-zero, or zero if all members were processed with no operator returning non-zero. Failure: Negative if something goes wrong within the library, or the negative value returned by one of the operators.
Author
Quincey Koziol
Date
Thursday, November 16, 2006

References FAIL, H5_INDEX_N, H5_ITER_N, H5CX_set_apl(), H5E_BADVALUE, H5I_get_type(), H5I_object(), H5P_CLS_LACC, H5VL_LINK_ITER, H5VL_link_specific(), H5VL_OBJECT_BY_NAME, H5VL_loc_by_name::lapl_id, H5VL_loc_params_t::loc_by_name, H5VL_loc_params_t::loc_data, H5VL_loc_by_name::name, NULL, H5VL_loc_params_t::obj_type, ret_value, and H5VL_loc_params_t::type.

◆ H5Lvisit2()

herr_t H5Lvisit2 ( hid_t  group_id,
H5_index_t  idx_type,
H5_iter_order_t  order,
H5L_iterate2_t  op,
void *  op_data 
)

Recursively visit all the links in a group and all the groups that are linked to from that group. Links within each group are visited according to the order within the specified index (unless the specified index does not exist for a particular group, then the "name" index is used).

NOTE: Each link reachable from the initial group will only be visited once. However, because an object may be reached from more than one link, the visitation may call the application's callback with more than one link that points to a particular object.

Returns
Success: The return value of the first operator that returns non-zero, or zero if all members were processed with no operator returning non-zero. Failure: Negative if something goes wrong within the library, or the negative value returned by one of the operators.
Author
Quincey Koziol
Date
November 24 2007

References FAIL, H5_INDEX_N, H5_ITER_N, H5E_BADVALUE, H5I_FILE, H5I_get_type(), H5I_GROUP, H5I_object(), H5VL_LINK_ITER, H5VL_link_specific(), H5VL_OBJECT_BY_SELF, NULL, H5VL_loc_params_t::obj_type, ret_value, and H5VL_loc_params_t::type.