![]() |
HDF5
1.15.0.08e115b
API Reference
|
Macros | |
#define | H5Literate H5Literate2 |
#define | H5Literate_by_name H5Literate_by_name2 |
#define | H5Lvisit H5Lvisit2 |
#define | H5Lvisit_by_name H5Lvisit_by_name2 |
Functions | |
herr_t | H5Literate2 (hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5L_iterate2_t op, void *op_data) |
Iterates over links in a group, with user callback routine, according to the order within an index. More... | |
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, H5L_iterate2_t op, void *op_data, hid_t lapl_id) |
Iterates through links in a group. More... | |
herr_t | H5Lvisit2 (hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate2_t op, void *op_data) |
Recursively visits all links starting from a specified group. More... | |
herr_t | H5Lvisit_by_name2 (hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate2_t op, void *op_data, hid_t lapl_id) |
Recursively visits all links starting from a specified group. More... | |
herr_t | H5Literate1 (hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5L_iterate1_t op, void *op_data) |
Iterates over links in a group, with user callback routine, according to the order within an index. More... | |
herr_t | H5Literate_by_name1 (hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5L_iterate1_t op, void *op_data, hid_t lapl_id) |
Iterates through links in a group by its name. More... | |
herr_t | H5Lvisit1 (hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate1_t op, void *op_data) |
Recursively visits all links starting from a specified group. More... | |
herr_t | H5Lvisit_by_name1 (hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate1_t op, void *op_data, hid_t lapl_id) |
Recursively visits all links starting from a specified group. More... | |
#define H5Literate H5Literate2 |
H5Literate() is a macro that is mapped to either H5Literate1() or H5Literate2().
#define H5Literate_by_name H5Literate_by_name2 |
H5Literate_by_name() is a macro that is mapped to either H5Literate_by_name1() or H5Literate_by_name2().
#define H5Lvisit H5Lvisit2 |
H5Lvisit() is a macro that is mapped to either H5Lvisit1() or H5Lvisit2().
#define H5Lvisit_by_name H5Lvisit_by_name2 |
H5Lvisit_by_name() is a macro that is mapped to either H5Lvisit_by_name1() or H5Lvisit_by_name2().
herr_t H5Literate1 | ( | hid_t | grp_id, |
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
hsize_t * | idx, | ||
H5L_iterate1_t | op, | ||
void * | op_data | ||
) |
Iterates over links in a group, with user callback routine, according to the order within an index.
[in] | grp_id | Group identifier |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in,out] | idx | Pointer to an iteration index to allow continuing a previous iteration |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
H5Literate1() iterates through the links in a file or group, group_id
, in the order of the specified index, idx_type
, using a user-defined callback routine op
. H5Literate1() does not recursively follow links into subgroups of the specified group.
Three parameters are used to manage progress of the iteration: idx_type
, order
, and idx_p
.
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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | Index on creation order |
order
specifies the order in which objects are to be inspected along the index idx_type
. Valid values include the following:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
idx_p
tracks the iteration and allows an iteration to be resumed if it was stopped before all members were processed. It is passed in by the application with a starting point and returned by the library with the point at which the iteration stopped.
op_data
is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the op
callback function's op_data
parameter. op
is invoked for each link encounter.
op_data
is passed to and from each iteration and can be used to supply or aggregate information across iterations.
group_id
changes during the iteration. This does not limit the ability to change link destinations while iterating, but caution is advised.herr_t H5Literate2 | ( | hid_t | grp_id, |
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
hsize_t * | idx, | ||
H5L_iterate2_t | op, | ||
void * | op_data | ||
) |
Iterates over links in a group, with user callback routine, according to the order within an index.
[in] | grp_id | Group identifier |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in,out] | idx | Pointer to an iteration index to allow continuing a previous iteration |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
H5Literate2() iterates through the links in a file or group, group_id
, in the order of the specified index, idx_type
, using a user-defined callback routine op
. H5Literate2() does not recursively follow links into subgroups of the specified group.
Three parameters are used to manage progress of the iteration: idx_type
, order
, and idx_p
.
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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | Index on creation order |
order
specifies the order in which objects are to be inspected along the index idx_type
. Valid values include the following:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
idx_p
tracks the iteration and allows an iteration to be resumed if it was stopped before all members were processed. It is passed in by the application with a starting point and returned by the library with the point at which the iteration stopped.
op_data
is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the op
callback function's op_data
parameter. op
is invoked for each link encounter.
op_data
is passed to and from each iteration and can be used to supply or aggregate information across iterations.
group_id
changes during the iteration. This does not limit the ability to change link destinations while iterating, but caution is advised.herr_t H5Literate_by_name1 | ( | hid_t | loc_id, |
const char * | group_name, | ||
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
hsize_t * | idx, | ||
H5L_iterate1_t | op, | ||
void * | op_data, | ||
hid_t | lapl_id | ||
) |
Iterates through links in a group by its name.
[in] | loc_id | Location identifier |
[in] | group_name | Group name |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in,out] | idx | iteration position at which to start (IN) or position at which an interrupted iteration may be restarted (OUT) |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
[in] | lapl_id | Link access property list identifier |
H5Literate_by_name1() iterates through the links in a group specified by loc_id
and group_name
, in the order of the specified index, idx_type
, using a user-defined callback routine op
. H5Literate_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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | 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:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | 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.
group_name
is found to be a group, call it subgroup_a
, H5Literate_by_name1() does not examine the members of subgroup_a
. When recursive iteration is required, the application must handle the recursion, explicitly calling H5Literate_by_name1() on discovered subgroups.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, | ||
H5L_iterate2_t | op, | ||
void * | op_data, | ||
hid_t | lapl_id | ||
) |
Iterates through links in a group.
[in] | loc_id | Location identifier |
[in] | group_name | Group name |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in,out] | idx | iteration position at which to start (IN) or position at which an interrupted iteration may be restarted (OUT) |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
[in] | lapl_id | Link access property list identifier |
H5Literate_by_name2() iterates through the links in a group specified by loc_id
and group_name
, in the order of the specified index, idx_type
, using a user-defined callback routine op
. H5Literate_by_name2() 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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | 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:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
idx_p
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.
group_name
is found to be a group, call it subgroup_a
, H5Literate_by_name2() does not examine the members of subgroup_a
. When recursive iteration is required, the application must handle the recursion, explicitly calling H5Literate_by_name2() on discovered subgroups.herr_t H5Lvisit1 | ( | hid_t | grp_id, |
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
H5L_iterate1_t | op, | ||
void * | op_data | ||
) |
Recursively visits all links starting from a specified group.
[in] | grp_id | Group identifier |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
H5Lvisit1() is a recursive iteration function to visit all links in and below a group in an HDF5 file, thus providing a mechanism for an application to perform a common set of operations across all of those links or a dynamically selected subset. For non-recursive iteration across the members of a group, see H5Literate1().
The group serving as the root of the iteration is specified by its group or file identifier, group_id
.
Two parameters are used to establish the iteration: idx_type
and order
.
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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | Index on creation order |
Note that the index type passed in idx_type
is a best effort setting. If the application passes in a value indicating iteration in creation order and a group is encountered that was not tracked in creation order, that group will be iterated over in lexicographic order by name, or name order. (Name order is the native order used by the HDF5 library and is always available.)
order
specifies the order in which objects are to be inspected along the index specified in idx_type
. Valid values include the following:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
op
is a callback function of type H5L_iterate1_t that is invoked for each link encountered.
The H5L_info1_t struct is defined (in H5Lpublic.h) as follows:
The possible return values from the callback function, and the effect of each, are as follows:
The H5Lvisit1() op_data
parameter is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the op
callback function's op_data
parameter.
H5Lvisit1() and H5Ovisit1() are companion functions: one for examining and operating on links; the other for examining and operating on the objects that those links point to. Both functions ensure that by the time the function completes successfully, every link or object below the specified point in the file has been presented to the application for whatever processing the application requires.
herr_t H5Lvisit2 | ( | hid_t | grp_id, |
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
H5L_iterate2_t | op, | ||
void * | op_data | ||
) |
Recursively visits all links starting from a specified group.
[in] | grp_id | Group identifier |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
H5Lvisit2() is a recursive iteration function to visit all links in and below a group in an HDF5 file, thus providing a mechanism for an application to perform a common set of operations across all of those links or a dynamically selected subset. For non-recursive iteration across the members of a group, see H5Literate2().
The group serving as the root of the iteration is specified by its group or file identifier, group_id
.
Two parameters are used to establish the iteration: idx_type
and order
.
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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | Index on creation order |
Note that the index type passed in idx_type
is a best effort setting. If the application passes in a value indicating iteration in creation order and a group is encountered that was not tracked in creation order, that group will be iterated over in lexicographic order by name, or name order. (Name order is the native order used by the HDF5 library and is always available.)
order
specifies the order in which objects are to be inspected along the index specified in idx_type
. Valid values include the following:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
op
is a callback function of type H5L_iterate2_t that is invoked for each link encountered.
The H5L_info2_t struct is defined (in H5Lpublic.h) as follows:
The possible return values from the callback function, and the effect of each, are as follows:
The H5Lvisit2() op_data
parameter is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the op
callback function's op_data
parameter.
H5Lvisit2() and H5Ovisit2() are companion functions: one for examining and operating on links; the other for examining and operating on the objects that those links point to. Both functions ensure that by the time the function completes successfully, every link or object below the specified point in the file has been presented to the application for whatever processing the application requires.
herr_t H5Lvisit_by_name1 | ( | hid_t | loc_id, |
const char * | group_name, | ||
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
H5L_iterate1_t | op, | ||
void * | op_data, | ||
hid_t | lapl_id | ||
) |
Recursively visits all links starting from a specified group.
[in] | loc_id | Location identifier |
[in] | group_name | Group name |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
[in] | lapl_id | Link access property list identifier |
H5Lvisit_by_name1() is a recursive iteration function to visit all links in and below a group in an HDF5 file, thus providing a mechanism for an application to perform a common set of operations across all of those links or a dynamically selected subset. For non-recursive iteration across the members of a group, see H5Literate1().
The group serving as the root of the iteration is specified by the loc_id
/ group_name
parameter pair. loc_id
specifies a file or group; group_name specifies either a group in the file (with an absolute name based in the file's root group) or a group relative to loc_id
. If loc_id
fully specifies the group that is to serve as the root of the iteration, group_name should be '.' (a dot). (Note that when loc_id
fully specifies the group that is to serve as the root of the iteration, the user may wish to consider using H5Lvisit1() instead of H5Lvisit_by_name1().)
Two parameters are used to establish the iteration: idx_type
and order
.
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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | Index on creation order |
Note that the index type passed in idx_type
is a best effort setting. If the application passes in a value indicating iteration in creation order and a group is encountered that was not tracked in creation order, that group will be iterated over in lexicographic order by name, or name order. (Name order is the native order used by the HDF5 library and is always available.)
order
specifies the order in which objects are to be inspected along the index specified in idx_type
. Valid values include the following:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
The op
callback function, the related H5L_info1_t struct
, and the effect that the callback function's return value has on the application are described in H5Lvisit1().
The H5Lvisit_by_name1() op_data
parameter is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the callback function's op_data
parameter.
lapl_id
is a link access property list. In the general case, when default link access properties are acceptable, this can be passed in as H5P_DEFAULT. An example of a situation that requires a non-default link access property list is when the link is an external link; an external link may require that a link prefix be set in a link access property list (see H5Pset_elink_prefix()).
H5Lvisit_by_name1() and H5Ovisit_by_name1() are companion functions: one for examining and operating on links; the other for examining and operating on the objects that those links point to. Both functions ensure that by the time the function completes successfully, every link or object below the specified point in the file has been presented to the application for whatever processing the application requires.
herr_t H5Lvisit_by_name2 | ( | hid_t | loc_id, |
const char * | group_name, | ||
H5_index_t | idx_type, | ||
H5_iter_order_t | order, | ||
H5L_iterate2_t | op, | ||
void * | op_data, | ||
hid_t | lapl_id | ||
) |
Recursively visits all links starting from a specified group.
[in] | loc_id | Location identifier |
[in] | group_name | Group name |
[in] | idx_type | Index type |
[in] | order | Iteration order |
[in] | op | Callback function |
[in,out] | op_data | User-defined callback function context |
[in] | lapl_id | Link access property list identifier |
H5Lvisit_by_name2() is a recursive iteration function to visit all links in and below a group in an HDF5 file, thus providing a mechanism for an application to perform a common set of operations across all of those links or a dynamically selected subset. For non-recursive iteration across the members of a group, see H5Literate2().
The group serving as the root of the iteration is specified by the loc_id
/ group_name
parameter pair. loc_id
specifies a file or group; group_name specifies either a group in the file (with an absolute name based in the file's root group) or a group relative to loc_id
. If loc_id
fully specifies the group that is to serve as the root of the iteration, group_name should be '.' (a dot). (Note that when loc_id
fully specifies the group that is to serve as the root of the iteration, the user may wish to consider using H5Lvisit2() instead of H5Lvisit_by_name2().)
Two parameters are used to establish the iteration: idx_type
and order
.
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:
H5_INDEX_NAME | Lexicographic order on name |
H5_INDEX_CRT_ORDER | Index on creation order |
Note that the index type passed in idx_type
is a best effort setting. If the application passes in a value indicating iteration in creation order and a group is encountered that was not tracked in creation order, that group will be iterated over in lexicographic order by name, or name order. (Name order is the native order used by the HDF5 library and is always available.)
order
specifies the order in which objects are to be inspected along the index specified in idx_type
. Valid values include the following:
H5_ITER_INC | Increasing order |
H5_ITER_DEC | Decreasing order |
H5_ITER_NATIVE | Fastest available order |
The op
callback function, the related H5L_info2_t struct
, and the effect that the callback function's return value has on the application are described in H5Lvisit2().
The H5Lvisit_by_name2() op_data
parameter is a user-defined pointer to the data required to process links in the course of the iteration. This pointer is passed back to each step of the iteration in the callback function's op_data
parameter.
lapl_id
is a link access property list. In the general case, when default link access properties are acceptable, this can be passed in as H5P_DEFAULT. An example of a situation that requires a non-default link access property list is when the link is an external link; an external link may require that a link prefix be set in a link access property list (see H5Pset_elink_prefix()).
H5Lvisit_by_name2() and H5Ovisit_by_name2() are companion functions: one for examining and operating on links; the other for examining and operating on the objects that those links point to. Both functions ensure that by the time the function completes successfully, every link or object below the specified point in the file has been presented to the application for whatever processing the application requires.