Last modified: 26 March 2014
Name: H5Pcreate_class

Signature:
  hid_t `H5Pcreate_class`( hid_t `parent_class`, const char *`name`, H5P_cls_create_func_t `create`, void *`create_data`, H5P_cls_copy_func_t `copy`, void *`copy_data`, H5P_cls_close_func_t `close`, void *`close_data` )

Purpose:
  Creates a new property list class.

Description:
  `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_class`, 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:
  typedef herr_t (*`H5P_cls_create_func_t`)( hid_t `prop_id`, void * `create_data` );
  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:
  typedef herr_t (*`H5P_cls_copy_func_t`)( hid_t `prop_id`, void * `copy_data` );
  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:
  typedef herr_t (*`H5P_cls_close_func_t`)( hid_t `prop_id`, void * `close_data` );
  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.

Parameters:

hid_t `parent_class` | IN: Property list class to inherit from or `NULL`
const char *`name` | IN: Name of property list class to register
H5P_cls_create_func_t `create` | IN: Callback routine called when a property list is created
void *`create_data` | IN: Pointer to user-defined class create data, to be passed along to class create callback
H5P_cls_copy_func_t `copy` | IN: Callback routine called when a property list is copied
void *`copy_data` | IN: Pointer to user-defined class copy data, to be passed along to class copy callback
H5P_cls_close_func_t `close` | IN: Callback routine called when a property list is being closed
void *`close_data` | IN: Pointer to user-defined class close data, to be passed along to class close callback

Returns:
  On success, returns a valid property list class identifier; otherwise returns a negative value.

  `H5Pclose_class` can be used to release the property list class identifier returned by this function so that resources leaks will not develop.

Fortran90 Interface: h5pcreate_class_f

      SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: parent  ! Parent property list class
                                              ! identifier
                                              ! Possible values include:
                                              !    H5P_NO_CLASS_F
                                              !    H5P_FILE_CREATE_F
                                              !    H5P_FILE_ACCESS_F
                                              !    H5P_DATASET_CREATE_F
                                              !    H5P_DATASET_XFER_F
                                              !    H5P_FILE_MOUNT_F
        CHARACTER(LEN=*), INTENT(IN) :: name  ! Name of property to create
        INTEGER(HID_T), INTENT(OUT) :: class  ! Property list class identifier
        INTEGER, INTENT(OUT) :: hdferr        ! Error code
                                              ! 0 on success and -1 on failure
      END SUBROUTINE h5pcreate_class_f

Fortran2003 Interface: h5pcreate_class_f

History:

  Release | Change
  1.8.8 | Fortran updated to Fortran2003.