Creates and returns a new ID type
Procedure:
H5I_REGISTER_TYPE(hash_size, reserved, free_func)
Signature:
H5I_type_t H5Iregister_type( size_t hash_size, unsigned reserved, H5I_free_t free_func )
Parameters:
size_t hash_size | IN: Size of the hash table (in entries) used to store IDs for the new type |
unsigned reserved | IN: Number of reserved IDs for the new type |
H5I_free_t free_func | IN: Function used to deallocate space for a single ID |
Description:
H5I_REGISTER_TYPE allocates space for a new ID type and returns an identifier for it.
The hash_size
parameter indicates the minimum size of the hash table used to store IDs in the new type.
The reserved
parameter indicates the number of IDs in this new type to be reserved. Reserved IDs are valid IDs which are not associated with any storage within the library.
The free_func
parameter is a function pointer to a function which returns an herr_t and accepts a void *. The purpose of this function is to deallocate memory for a single ID. It will be called by H5I_CLEAR_TYPE and H5I_DESTROY_TYPE on each ID. This function is NOT called by H5I_REMOVE_VERIFY. The void * will be the same pointer which was passed in to the H5I_REGISTER function. The free_func
function should return 0 on success and -1 on failure.
Returns:
Returns the type identifier on success, negative on failure.
Example:
--- Last Modified: April 25, 2019 | 12:31 PM