Page tree

The license could not be verified: License Certificate has expired!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

 

JAVA

FORTRAN

C++

C

 

Link

H5A_GET_TYPE

Gets an attribute datatype.

Procedure:

H5A_GET_TYPE ( attr_id )

Signature:

hid_t H5Aget_type(hid_t attr_id)

Fortran90 Interface: h5aget_type_f
    
SUBROUTINE h5aget_type_f(attr_id, type_id, hdferr) 
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: attr_id  ! Attribute identifier 
  INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier
  INTEGER, INTENT(OUT) :: hdferr         ! Error code:
                                         ! 0 on success and -1 on failure
END SUBROUTINE h5aget_type_f
	

Replace this text with the C++ Function Signature

Replace this text with the JAVA Function Signature

Parameters:

hid_t attr_id     IN: Identifier of an attribute.

Description:

H5Aget_type retrieves a copy of the datatype for an attribute.

The datatype is reopened if it is a named type before returning it to the application. The datatypes returned by this function are always read-only. If an error occurs when atomizing the return datatype, then the datatype is closed.

The datatype identifier returned from this function must be released with H5Tclose or resource leaks will develop.

Returns:

Returns a datatype identifier if successful; otherwise returns a negative value.

Example:

     */
    dtype = H5Aget_type (attr);

  ! Get datatype and properties for the datatype.
  !
  CALL h5aget_type_f(attr, dtype, hdferr)

c++ / examples / create.cpp [33:43]  1.10/master  HDFFV/hdf5
int main (void)
{
   /*
    * Data initialization.
    */
   int i, j;
   int data[NX][NY];          // buffer for data to write
   for (j = 0; j < NX; j++)
   {
      for (i = 0; i < NY; i++)

        // Get datatype and properties for the datatype.
        try {
            if (attribute_id >= 0)
                datatype_id = H5.H5Aget_type(attribute_id);
            if (datatype_id >= 0) {
                type_len = H5.H5Tget_size(datatype_id);
                tag_name = H5.H5Tget_tag(datatype_id);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
        }

History:

None

--- Last Modified: November 09, 2017 | 02:56 PM