![]() |
HDF5
1.13.0
|
Functions | |
herr_t | H5Pclose_class (hid_t plist_id) |
Closes an existing property list class. More... | |
herr_t | H5Pcopy_prop (hid_t dst_id, hid_t src_id, const char *name) |
Copies a property from one list or class to another. More... | |
hid_t | H5Pcreate_class (hid_t parent, const char *name, H5P_cls_create_func_t cls_create, void *create_data, H5P_cls_copy_func_t cls_copy, void *copy_data, H5P_cls_close_func_t cls_close, void *close_data) |
Creates a new property list class. More... | |
Closes an existing property list class.
[in] | class | Property list identifier |
H5Pclose_class() removes a property list class from the library. Existing property lists of this class will continue to exist, but new ones are not able to be created.
Copies a property from one list or class to another.
[in] | dst_id | Property list identifier |
[in] | src_id | Property list identifier |
[in] | name | Name of the property to copy |
H5Pcopy_prop() copies a property from one property list or class to another.
If a property is copied from one class to another, all the property information will be first deleted from the destination class and then the property information will be copied from the source class into the destination class.
If a property is copied from one list to another, the property will be first deleted from the destination list (generating a call to the close callback for the property, if one exists) and then the property is copied from the source list to the destination list (generating a call to the copy callback for the property, if one exists).
If the property does not exist in the class or list, this call is equivalent to calling H5Pregister() or H5Pinsert() (for a class or list, as appropriate) and the create callback will be called in the case of the property being copied into a list (if such a callback exists for the property).
hid_t H5Pcreate_class | ( | hid_t | parent, |
const char * | name, | ||
H5P_cls_create_func_t | cls_create, | ||
void * | create_data, | ||
H5P_cls_copy_func_t | cls_copy, | ||
void * | copy_data, | ||
H5P_cls_close_func_t | cls_close, | ||
void * | close_data | ||
) |
Creates a new property list class.
[in] | parent | Property list identifier |
[in] | name | Name of property list class to register |
[in] | create | Callback routine called when a property list is created |
[in] | create_data | Pointer to user-defined class create data, to be passed along to class create callback |
[in] | copy | Callback routine called when a property list is copied |
[in] | copy_data | Pointer to user-defined class copy data, to be passed along to class copy callback |
[in] | close | Callback routine called when a property list is being closed |
[in] | close_data | Pointer to user-defined class close data, to be passed along to class close callback |
H5Pcreate_class() registers a new property list class with the library. The new property list class can inherit from an existing property list class, parent
, or may be derived from the default “empty” class, NULL. New classes with inherited properties from existing classes may not remove those existing properties, only add or remove their own class properties. Property list classes defined and supported in the HDF5 library distribution are listed and briefly described in H5Pcreate(). The create
routine is called when a new property list of this class is being created. The H5P_cls_create_func_t callback function is defined as follows:
The parameters to this callback function are defined as follows:
hid_t prop_id | IN: The identifier of the property list being created |
void * create_data | IN: User pointer to any class creation data required |
The create
routine is called after any registered create
function is called for each property value. If the create
routine returns a negative value, the new list is not returned to the user and the property list creation routine returns an error value.
The copy
routine is called when an existing property list of this class is copied. The H5P_cls_copy_func_t callback function is defined as follows:
The parameters to this callback function are defined as follows:
hid_t prop_id | IN: The identifier of the property list created by copying |
void * copy_data | IN: User pointer to any class copy data required |
The copy
routine is called after any registered copy
function is called for each property value. If the copy
routine returns a negative value, the new list is not returned to the user and the property list copy
routine returns an error value.
The close
routine is called when a property list of this class is being closed. #The H5P_cls_close_func_t callback function is defined as follows:
The parameters to this callback function are defined as follows:
hid_t prop_id | IN: The identifier of the property list being closed |
void * close_data | IN: User pointer to any class close data required |
The close
routine is called before any registered close
function is called for each property value. If the close
routine returns a negative value, the property list close routine returns an error value but the property list is still closed.
H5Pclose_class() can be used to release the property list class identifier returned by this function so that resources leaks will not develop.