H5Lregister
(
const H5L_class_t * link_class
)
H5Lregister
registers a class of user-defined links,
or changes the behavior of an existing class.
The struct H5L_class_t
is defined in
H5Lpublic.h
as follows:
typedef struct H5L_class_t { int version; /* Version number of this struct */ H5L_type_t class_id; /* Link class identifier */ const char *comment; /* Comment for debugging */ H5L_create_func_t create_func; /* Callback during link creation */ H5L_move_func_t move_func; /* Callback after moving link */ H5L_copy_func_t copy_func; /* Callback after copying link */ H5L_traverse_func_t trav_func; /* The main traversal function */ H5L_delete_func_t del_func; /* Callback for link deletion */ H5L_query_func_t query_func; /* Callback for queries */ } H5L_class_t;
The link class passed in will override any existing link
class for the specified link class identifier class_id
.
The class definition must include at least a
H5L_class_t
version
(which should be H5L_LINK_CLASS_T_VERS
),
a link class identifier, and a traversal function,
trav_func
.
Valid values of class_id
already used in the HDF5
distribution include the following
(defined in H5Lpublic.h
):
H5L_TYPE_HARD
| Hard link | |
H5L_TYPE_SOFT
| Soft link | |
H5L_TYPE_EXTERNAL
| External link |
class_id
must be a value between
H5L_TYPE_UD_MIN
and H5L_TYPE_UD_MAX
(which equals H5L_TYPE_MAX
).
Important details include the following:
H5L_TYPE_MAX is the maximum allowed value for a
link type identifier.
|
H5L_TYPE_UD_MIN equals H5L_TYPE_EXTERNAL .
|
H5L_TYPE_UD_MAX equals H5L_TYPE_MAX .
|
H5L_TYPE_HARD and H5L_TYPE_SOFT
reside in the reserved space below H5L_TYPE_UD_MIN .
|
H5L_TYPE_ERROR indicates that an error has occurred.
|
class_id
values.
As distributed with the HDF5 Library,
the external link class is implemented as an example of a
user-defined link class and H5L_LINK_EXTERNAL
equals
H5L_LINK_UD_MIN
. Therefore, class_id
in the H5L_class_t
H5L_LINK_UD_MIN unless you intend to
overwrite or modify the behavior of external links.
const H5L_class_t * link_class
|
IN: Struct describing user-defined link class |
Release | C |
1.8.0 | Function introduced in this release. |