Name: H5Lregister
Signature:
herr_t H5Lregister( const H5L_class_t * link_class )

Purpose:
Registers user-defined link class or changes behavior of existing class.

Description:
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 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_LINK_UD_MIN and H5L_LINK_UD_MAX, Note that as distributed with the HDF5 Library, the external link class is implemented as an example user-defined link class and H5L_LINK_EXTERNAL equals H5L_LINK_UD_MIN. Therefore, class_id should not equal H5L_LINK_UD_MIN unless you intend to overwrite or modify the behavior of external links. To summarize:
H5L_TYPE_ERROR indicates that an error has occurred.
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.

Note:
If you plan to distribute files with a new user-defined link class, please contact the Help Desk at The HDF Group to help prevent collisions between class_id values.

Parameters:
const H5L_class_t * link_class     IN: Struct describing user-defined link class

Returns:
Returns a non-negative value if successful; otherwise returns a negative value.

Fortran90 Interface:
None.

History:
Release     C
1.8.0 Function introduced in this release.