Page tree









Returns the property list class identifier for a property list


H5P_GET_CLASS ( plist )


hid_t H5Pget_class ( hid_t plist )

Fortran90 Interface: h5pget_class_f
SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) 
  INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier 
  INTEGER, INTENT(OUT) :: classtype    ! The type of the property list 
                                       ! to be created 
  INTEGER, INTENT(OUT) :: hdferr       ! Error code
                                       ! 0 on success and -1 on failure
END SUBROUTINE h5pget_class_f


hid_t plist     IN: Identifier of property list to query


H5P_GET_CLASS returns the property list class identifier for the property list identified by the plist parameter.

Note that H5P_GET_CLASS returns a value of hid_t type, an internal HDF5 identifier, rather than directly returning a property list class. That identifier can then be used with either H5P_EQUAL or H5P_GET_CLASS_NAME to determine which predefined HDF5 property list class H5P_GET_CLASS has returned.

A full list of valid predefined property list classes appears in the description of H5P_CREATE.

Determining the HDF5 property list class name with H5P_EQUAL requires a series of H5P_EQUAL calls in an if-else sequence. An iterative sequence of H5P_EQUAL calls can compare the identifier returned by H5P_GET_CLASS to members of the list of valid property list class names. A pseudo-code snippet might read as follows:

    plist_class_id = H5Pget_class (dsetA_plist);

    if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = TRUE;        
            [ H5P_OBJECT_CREATE is the property list class    ]
            [ returned by H5Pget_class.                        ]

        else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = TRUE;
            [ H5P_DATASET_CREATE is the property list class.  ]

        else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = TRUE;
            [ H5P_DATASET_XFER is the property list class.    ]

        .   [ Continuing the iteration until a match is found. ]

H5P_GET_CLASS_NAME returns the property list class name directly as a string:

    plist_class_id = H5Pget_class (dsetA_plist);
    plist_class_name = H5Pget_class_name (plist_class_id) 

Note that frequent use of H5P_GET_CLASS_NAME can become a performance problem in a high-performance environment. The H5P_EQUAL approach is generally much faster.



Returns a property list class identifier if successful. Otherwise returns a negative value.


Coming Soon!

Release    Change
1.8.15Updated the Fortran subroutine.
1.6.0Return type changed in this release.

--- Last Modified: May 01, 2019 | 02:49 PM