Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5P_GET_CLASS

Returns the property list class identifier for a property list

Procedure:

H5P_GET_CLASS ( plist )

Signature:

hid_t H5Pget_class ( hid_t plist )

Fortran90 Interface: h5pget_class_f
    
SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) 
  IMPLICIT NONE
  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
    

Parameters:

hid_t plist     IN: Identifier of property list to query

Description:

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

Note that H5Pget_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 H5Pequal or H5Pget_class_name to determine which predefined HDF5 property list class H5Pget_class has returned.

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

Determining the HDF5 property list class name with H5Pequal requires a series of H5Pequal calls in an if-else sequence. An iterative sequence of H5Pequal calls can compare the identifier returned by H5Pget_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. ]
        .  

H5Pget_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 H5Pget_class_name can become a performance problem in a high-performance environment. The H5Pequal approach is generally much faster.

 

Returns:

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

Example:

Coming Soon!

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

--- Last Modified: January 24, 2018 | 11:10 AM