Doxygen Fortran (#2062)

This commit is contained in:
Scot Breitenfeld
2022-09-07 17:11:20 -05:00
committed by GitHub
parent 1804e0e0c4
commit 99f17c7271
20 changed files with 8587 additions and 15591 deletions

View File

@@ -372,3 +372,11 @@ ALIASES += storage_type="<table><tr><td>#H5G_STORAGE_TYPE_COMPACT</td><td>Compac
ALIASES += str_pad_type="<table><tr><td>#H5T_STR_NULLTERM</td><td>0</td><td>Null terminate (as C does)</td></tr><tr><td>#H5T_STR_NULLPAD</td><td>1</td><td>Pad with zeros</td></tr><tr><td>#H5T_STR_SPACEPAD</td><td>2</td><td>Pad with spaces (as FORTRAN does)</td></tr></table>"
ALIASES += see_virtual=" \see Supporting Functions: H5Pget_layout(), H5Pset_layout(), H5Sget_regular_hyperslab(), H5Sis_regular_hyperslab(), H5Sselect_hyperslab() \see VDS Functions: H5Pget_virtual_count(), H5Pget_virtual_dsetname(), H5Pget_virtual_filename(), H5Pget_virtual_prefix(), H5Pget_virtual_printf_gap(), H5Pget_virtual_srcspace(), H5Pget_virtual_view(), H5Pget_virtual_vspace(), H5Pset_virtual(), H5Pset_virtual_prefix(), H5Pset_virtual_printf_gap(), H5Pset_virtual_view()"
ALIASES += obj_info_fields="<table><tr><th>Flag</th><th>Purpose</th></tr><tr><td>#H5O_INFO_BASIC</td><td>Fill in the fileno, addr, type, and rc fields</td></tr><tr> <td>#H5O_INFO_TIME</td><td>Fill in the atime, mtime, ctime, and btime fields</td></tr><tr> <td>#H5O_INFO_NUM_ATTRS</td> <td>Fill in the num_attrs field</td></tr><tr><td>#H5O_INFO_HDR</td><td>Fill in the num_attrs field</td></tr><tr><td>#H5O_INFO_META_SIZE</td><td>Fill in the meta_size field</td></tr><tr><td>#H5O_INFO_ALL</td><td>#H5O_INFO_BASIC | #H5O_INFO_TIME | #H5O_INFO_NUM_ATTRS | #H5O_INFO_HDR | #H5O_INFO_META_SIZE</td></tr></table>"
################################################################################
# FORTRAN
################################################################################
ALIASES += fortran_error="Returns 0 if successful and -1 if it fails."
ALIASES += fortran_approved="The preferred API, Fortran 2003 version."
ALIASES += fortran_obsolete="Obsolete API, use the Fortran 2003 version instead."

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
!****h* ROBODoc/H5E
!
! NAME
! MODULE H5E
!
! FILE
! fortran/src/H5Eff.F90
!
! PURPOSE
! This Module contains Fortran interfaces for H5E functions.
!> @defgroup FH5E Fortran Error (H5E) Interface
!!
!! @see H5E, C-API
!!
!! @see @ref H5E_UG, User Guide
!!
!> @ingroup FH5E
!!
!! @brief This module contains Fortran interfaces for H5E functions.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -35,52 +35,29 @@
! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
MODULE H5E
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR
USE H5GLOBAL
!Turn on automatic printing of errors
INTEGER, PARAMETER :: PRINTON = 1
!Turn off automatic printing of errors
INTEGER, PARAMETER :: PRINTOFF = 0
INTEGER, PARAMETER :: PRINTON = 1 !< Turn on automatic printing of errors
INTEGER, PARAMETER :: PRINTOFF = 0 !< Turn off automatic printing of errors
CONTAINS
!****s* H5E/h5eclear_f
!
! NAME
! h5eclear_f
!
! PURPOSE
! Clears the error stack for the current thread.
!
! OUTPUTS
! hdferr - Returns 0 if successful and -1 if fails
! OPTIONAL PARAMETERS
! estack_id - Error Stack id
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). April 6, 2001
!
! Added optional error stack identifier in order to bring
! the function in line with the h5eclear2 routine.
! MSB, July 9, 2009
!
! SOURCE
!>
!! \ingroup FH5E
!!
!! \brief Clears the error stack for the current thread.
!!
!! \param hdferr \fortran_error
!! \param estack_id Error Stack id
!!
SUBROUTINE h5eclear_f(hdferr, estack_id)
IMPLICIT NONE
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id
!*****
INTEGER(HID_T) :: estack_id_default
INTERFACE
@@ -97,33 +74,17 @@ CONTAINS
hdferr = h5eclear_c(estack_id_default)
END SUBROUTINE h5eclear_f
!****s* H5E/h5eprint_f
!
! NAME
! h5eprint_f
!
! PURPOSE
! Prints the error stack in a default manner.
!
! OUTPUTS
! hdferr - Returns 0 if successful and -1 if fails
!
! OPTIONAL PARAMETERS
! name - name of the file that contains print output
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). April 6, 2001
!
! SOURCE
!>
!! \ingroup FH5E
!!
!! \brief Prints the error stack in a default manner.
!!
!! \param hdferr \fortran_error
!! \param name Name of the file that contains print output
!!
SUBROUTINE h5eprint_f(hdferr, name)
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER :: namelen
INTERFACE
@@ -147,41 +108,21 @@ CONTAINS
hdferr = h5eprint_c2()
ENDIF
END SUBROUTINE h5eprint_f
!****s* H5E/h5eget_major_f
!
! NAME
! h5eget_major_f
!
! PURPOSE
! Returns a character string describing an error specified
! by a major error number.
!
! INPUTS
! error_no - major error number
!
! OUTPUTS
! name - character string describing the error
! namelen - number of characters in the name buffer
! hdferr - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). April 6, 2001
!
! SOURCE
!>
!! \ingroup FH5E
!!
!! \brief Returns a character string describing an error specified by a major error number.
!!
!! \param error_no Major error number.
!! \param name Character string describing the error.
!! \param namelen Number of characters in the name buffer.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr)
INTEGER, INTENT(IN) :: error_no ! Major error number
CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
! the error.
INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters
! in name.
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER, INTENT(IN) :: error_no
CHARACTER(LEN=*), INTENT(OUT) :: name
INTEGER(SIZE_T), INTENT(IN) :: namelen
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) BIND(C,NAME='h5eget_major_c')
IMPORT :: C_CHAR
@@ -195,38 +136,19 @@ CONTAINS
hdferr = h5eget_major_c(error_no, name, namelen)
END SUBROUTINE h5eget_major_f
!****s* H5E/h5eget_minor_f
!
! NAME
! h5eget_minor_f
!
! PURPOSE
! Returns a character string describing an error specified
! by a minor error number.
!
! INPUTS
! error_no - minor error number
!
! OUTPUTS
! name - character string describing the error
! hdferr - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). April 6, 2001
!
! SOURCE
!>
!! \ingroup FH5E
!!
!! \brief Returns a character string describing an error specified by a minor error number.
!!
!! \param error_no Minor error number.
!! \param name Character string describing the error.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5eget_minor_f(error_no, name, hdferr)
INTEGER, INTENT(IN) :: error_no ! Major error number
CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
! the error
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER, INTENT(IN) :: error_no
CHARACTER(LEN=*), INTENT(OUT) :: name
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5eget_minor_c(error_no, name) BIND(C,NAME='h5eget_minor_c')
IMPORT :: C_CHAR
@@ -238,31 +160,19 @@ CONTAINS
hdferr = h5eget_minor_c(error_no, name)
END SUBROUTINE h5eget_minor_f
!****s* H5E/h5eset_auto_f
!
! NAME
! h5eset_auto_f
!
! PURPOSE
! Returns settings for automatic error stack traversal function and its data.
!
! Inputs:
! printflag - Flag to turn automatic error printing on or off;
! possible values are:
! printon (1)
! printoff(0)
! estack_id - Error stack identifier.
! func - Function to be called upon an error condition.
! client_data - Data passed to the error function
!
! Outputs:
! hdferr - Returns 0 if successful and -1 if fails
!
! AUTHOR
! M. Scot Breitenfeld
! July 10, 2009
!
! Fortran2003 Interface:
!>
!! \ingroup FH5E
!!
!! \brief Returns settings for automatic error stack traversal function and its data.
!!
!! \param printflag Flag to turn automatic error printing on or off; possible values are:
!! \li printon (1)
!! \li printoff(0)
!! \param estack_id Error stack identifier.
!! \param func Function to be called upon an error condition.
!! \param client_data Data passed to the error function.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR
INTEGER , INTENT(IN) :: printflag
@@ -270,7 +180,6 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id
TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func
TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data
!*****
INTEGER(HID_T) :: estack_id_default
TYPE(C_FUNPTR) :: func_default
TYPE(C_PTR) :: client_data_default

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
!****h* ROBODoc/H5I
!
! NAME
! MODULE H5I
!
! FILE
! fortran/src/H5Iff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5I functions.
!> @defgroup FH5I Fortran Identifier (H5I) Interface
!!
!! @see H5I, C-API
!!
!! @see @ref H5I_UG, User Guide
!!
!> @ingroup FH5I
!!
!! @brief This module contains Fortran interfaces for H5I functions.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -35,7 +35,6 @@
! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
MODULE H5I
@@ -44,53 +43,27 @@ MODULE H5I
CONTAINS
!****s* H5I/h5iget_type_f
!
! NAME
! h5iget_type_f
!
! PURPOSE
! Retrieves the type of an object.
!
! INPUTS
! obj_id - object identifier
! OUTPUTS
! type - type of the object, possible values:
! H5I_FILE_F
! H5I_GROUP_F
! H5I_DATATYPE_F
! H5I_DATASPACE_F
! H5I_DATASET_F
! H5I_ATTR_F
! H5I_BADID_F
! hdferr: - error code
! Success: 0
! Failure: -1
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). March 5, 2001
!
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Retrieves the type of an object.
!!
!! \param obj_id Object identifier.
!! \param type Type of the object, possible values:
!! \li H5I_FILE_F
!! \li H5I_GROUP_F
!! \li H5I_DATATYPE_F
!! \li H5I_DATASPACE_F
!! \li H5I_DATASET_F
!! \li H5I_ATTR_F
!! \li H5I_BADID_F
!! \param hdferr \fortran_error
!!
SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER, INTENT(OUT) :: TYPE ! type of an object.
! possible values are:
! H5I_FILE_F
! H5I_GROUP_F
! H5I_DATATYPE_F
! H5I_DATASPACE_F
! H5I_DATASET_F
! H5I_ATTR_F
! H5I_BADID_F
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: TYPE
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) BIND(C, NAME='h5iget_type_c')
IMPORT :: HID_T
@@ -102,39 +75,24 @@ CONTAINS
hdferr = h5iget_type_c(obj_id, TYPE)
END SUBROUTINE h5iget_type_f
!****s* H5I/h5iget_name_f
!
! NAME
! h5iget_name_f
!
! PURPOSE
! Gets a name of an object specified by its identifier.
!
! INPUTS
! obj_id - attribute identifier
! buf_size - size of a buffer to read name in
! OUTPUTS
! buf - buffer to read name in, name will be truncated if
! buffer is not big enough
! name_size - name size
! hdferr: - error code
! Success: 0
! Failure: -1
!
! AUTHOR
! Elena Pourmal
! March 12, 2003
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Gets a name of an object specified by its identifier.
!!
!! \param obj_id Attribute identifier.
!! \param buf_size Size of a buffer to read name in.
!! \param buf Buffer to read name in, name will be truncated if buffer is not big enough.
!! \param name_size Name size.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size
CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name
INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size
INTEGER, INTENT(OUT) :: hdferr ! Error code:
! 0 if successful,
! -1 if fail
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER(SIZE_T), INTENT(IN) :: buf_size
CHARACTER(LEN=*), INTENT(OUT) :: buf
INTEGER(SIZE_T), INTENT(OUT) :: name_size
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) BIND(C, NAME='h5iget_name_c')
IMPORT :: C_CHAR
@@ -150,32 +108,20 @@ CONTAINS
hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size)
END SUBROUTINE h5iget_name_f
!****s* H5I/h5iinc_ref_f
!
! NAME
! h5iinc_ref_f
!
! PURPOSE
! Increments the reference count of an ID
!
! INPUTS
! obj_id - object identifier
! OUTPUTS
! ref_count - Current reference count of the ID
! hdferr: - error code
! Success: 0
! Failure: -1
! AUTHOR
! Quincey Koziol
! December 9, 2003
!
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Increments the reference count of an ID.
!!
!! \param obj_id Object identifier.
!! \param ref_count Current reference count of the ID.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: ref_count
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) BIND(C, NAME='h5iinc_ref_c')
IMPORT :: HID_T
@@ -187,32 +133,20 @@ CONTAINS
hdferr = h5iinc_ref_c(obj_id, ref_count)
END SUBROUTINE h5iinc_ref_f
!****s* H5I/h5idec_ref_f
!
! NAME
! h5idec_ref_f
!
! PURPOSE
! Decrements the reference count of an ID
!
! INPUTS
! obj_id - Object identifier
! OUTPUTS
! ref_count - Current reference count of the ID
! hdferr: - Error code
! Success: 0
! Failure: -1
! AUTHOR
! Quincey Koziol
! December 9, 2003
!
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Decrements the reference count of an ID.
!!
!! \param obj_id Object identifier.
!! \param ref_count Current reference count of the ID.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: ref_count
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) BIND(C, NAME='h5idec_ref_c')
IMPORT :: HID_T
@@ -224,32 +158,20 @@ CONTAINS
hdferr = h5idec_ref_c(obj_id, ref_count)
END SUBROUTINE h5idec_ref_f
!****s* H5I/h5iget_ref_f
! NAME
! h5iget_ref_f
!
! PURPOSE
! Retrieves the reference count of an ID
!
! INPUTS
! obj_id - object identifier
!
! OUTPUTS
! ref_count - Current reference count of the ID
! hdferr: - error code
! Success: 0
! Failure: -1
! AUTHOR
! Quincey Koziol
! December 9, 2003
!
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Retrieves the reference count of an ID.
!!
!! \param obj_id Object identifier.
!! \param ref_count Current reference count of the ID.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(OUT) :: ref_count
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) BIND(C, NAME='h5iget_ref_c')
IMPORT :: HID_T
@@ -260,32 +182,20 @@ CONTAINS
END INTERFACE
hdferr = h5iget_ref_c(obj_id, ref_count)
END SUBROUTINE h5iget_ref_f
!
!****s* H5I/h5iget_file_id_f
! NAME
! h5iget_file_id_f
!
! PURPOSE
! Obtains file identifier from the object identifier
!
! INPUTS
! obj_id - object identifier
! OUTPUTS
! file_id - file identifier
! hdferr: - error code
! Success: 0
! Failure: -1
!
! AUTHOR
! Elena Pourmal
! August 23, 2004
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Obtains file identifier from the object identifier.
!!
!! \param obj_id Object identifier.
!! \param file_id File identifier.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER(HID_T), INTENT(OUT) :: file_id
INTEGER, INTENT(OUT) :: hdferr
INTERFACE
INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) BIND(C, NAME='h5iget_file_id_c')
IMPORT :: HID_T
@@ -296,39 +206,27 @@ CONTAINS
END INTERFACE
hdferr = h5iget_file_id_c(obj_id, file_id)
END SUBROUTINE h5iget_file_id_f
!
!****s* H5I/h5iis_valid_f
! NAME
! h5iget_file_id_f
!
! PURPOSE
! Check if an ID is valid without producing an error message
!
! INPUTS
! id - identifier
! OUTPUTS
! valid - status of id as a valid identifier
! hdferr: - error code
! Success: 0
! Failure: -1
!
! AUTHOR
! M. Scot Breitenfeld
! April 13, 2009
! SOURCE
!>
!! \ingroup FH5I
!!
!! \brief Check if an ID is valid without producing an error message.
!!
!! \param id Identifier.
!! \param valid Status of id as a valid identifier.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5iis_valid_f(id, valid, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: id ! Identifier
LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: id
LOGICAL, INTENT(OUT) :: valid
INTEGER, INTENT(OUT) :: hdferr
INTEGER :: c_valid ! 0 = .false, 1 = .true.
INTERFACE
INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c')
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: id ! Identifier
INTEGER(HID_T), INTENT(IN) :: id
INTEGER :: c_valid
END FUNCTION h5iis_valid_c
END INTERFACE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,13 @@
!****h* ROBODoc/H5R
!> @defgroup FH5R Fortran References (H5R) Interface
!!
!! @see H5R, C-API
!!
!! @see @ref H5R_UG, User Guide
!!
!> @ingroup FH5R
!!
!! @brief This module contains Fortran interfaces for H5R functions.
!
! NAME
! MODULE H5R
@@ -36,7 +45,6 @@
! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
MODULE H5R
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR
@@ -56,45 +64,44 @@ MODULE H5R
! END TYPE
!
PRIVATE h5rget_object_type_obj_f
PRIVATE h5rget_region_region_f, h5rget_region_ptr_f
PRIVATE h5rcreate_object_f, h5rcreate_region_f, h5rcreate_ptr_f
PRIVATE h5rdereference_object_f, h5rdereference_region_f, h5rdereference_ptr_f
PRIVATE h5rget_name_object_f, h5rget_name_region_f, h5rget_name_ptr_f
!> @brief hdset_reg_ref_t_f03 C compatible reference
TYPE :: hdset_reg_ref_t_f03
INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref
INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref
END TYPE hdset_reg_ref_t_f03
INTERFACE h5rget_region_f
MODULE PROCEDURE h5rget_region_region_f ! obsolete
MODULE PROCEDURE h5rget_region_ptr_f ! F2003
INTERFACE h5rget_object_type_f
MODULE PROCEDURE h5rget_object_type_obj_f
END INTERFACE
#ifndef H5_DOXYGEN_FORTRAN
INTERFACE h5rget_region_f
MODULE PROCEDURE h5rget_region_ptr_f ! F2003
MODULE PROCEDURE h5rget_region_region_f ! obsolete
END INTERFACE
INTERFACE h5rcreate_f
MODULE PROCEDURE h5rcreate_ptr_f ! F2003
MODULE PROCEDURE h5rcreate_object_f ! obsolete
MODULE PROCEDURE h5rcreate_region_f ! obsolete
MODULE PROCEDURE h5rcreate_ptr_f ! F2003
END INTERFACE
INTERFACE h5rdereference_f
MODULE PROCEDURE h5rdereference_ptr_f ! F2003
MODULE PROCEDURE h5rdereference_object_f ! obsolete
MODULE PROCEDURE h5rdereference_region_f ! obsolete
MODULE PROCEDURE h5rdereference_ptr_f ! F2003
END INTERFACE
INTERFACE h5rget_name_f
MODULE PROCEDURE h5rget_name_ptr_f ! F2003
MODULE PROCEDURE h5rget_name_object_f ! obsolete
MODULE PROCEDURE h5rget_name_region_f ! obsolete
MODULE PROCEDURE h5rget_name_ptr_f ! F2003
END INTERFACE
INTERFACE
@@ -151,54 +158,37 @@ MODULE H5R
INTEGER(HID_T), INTENT(OUT) :: space_id
END FUNCTION h5rget_region_ptr_c
END INTERFACE
#endif
CONTAINS
!****s* H5R/h5rget_object_type_f
!
! NAME
! h5rget_object_type_f
!
! PURPOSE
! Retrieves the type of object that an object reference points to.
!
! INPUTS
! dset_id - identifier of the dataset containing
! reference to the objects
! ref - reference to open
! OUTPUTS
! obj_type - object_type, possible values:
! H5G_UNKNOWN_F
! H5G_GROUP_F
! H5G_DATASET_F
! H5G_TYPE_F
! hdferr - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! NOTES
! This is a module procedure for the h5rget_object_type_f
! subroutine.
! SOURCE
SUBROUTINE h5rget_object_type_f(dset_id, ref, obj_type, hdferr)
!>
!! \ingroup FH5R
!!
!! \brief Retrieves the type of object that an object reference points to.
!!
!! \note \fortran_obsolete
!!
!! \param dset_id Identifier of the dataset containing reference to the objects.
!! \param ref Reference to open.
!! \param obj_type Object_type, possible values:
!! \li H5G_UNKNOWN_F
!! \li H5G_GROUP_F
!! \li H5G_DATASET_F
!! \li H5G_TYPE_F
!! \param hdferr \fortran_error
!!
#ifdef H5_DOXYGEN_FORTRAN
SUBROUTINE h5rget_object_type_f(&
#else
SUBROUTINE h5rget_object_type_obj_f(&
#endif
dset_id, ref, obj_type, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference
INTEGER, INTENT(OUT) :: obj_type ! Object type
! H5G_UNKNOWN_F
! H5G_GROUP_F
! H5G_DATASET_F
! H5G_TYPE_F
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: dset_id
TYPE(hobj_ref_t_f), INTENT(IN) :: ref
INTEGER, INTENT(OUT) :: obj_type
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
INTERFACE
@@ -214,44 +204,32 @@ CONTAINS
ref_f = ref%ref
hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type )
#ifdef H5_DOXYGEN_FORTRAN
END SUBROUTINE h5rget_object_type_f
#else
END SUBROUTINE h5rget_object_type_obj_f
#endif
!>
!! \ingroup FH5R
!!
!! \brief Retrieves a dataspace with the specified region selected.
!!
!! \note \fortran_obsolete
!!
!! \param dset_id Identifier of the dataset containing reference to the regions.
!! \param ref Reference to open.
!! \param space_id Dataspace identifier.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr)
!****s* H5R/h5rget_region_region_f
!
! NAME
! h5rget_region_region_f
!
! PURPOSE
! Retrieves a dataspace with the specified region selected
!
! INPUTS
! dset_id - identifier of the dataset containing
! reference to the regions
! ref - reference to open
! OUTPUTS
! space_id - dataspace identifier
! hdferr - Returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! NOTES
! This is a module procedure for the h5rget_region_f subroutine.
!
! SOURCE
SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference
INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: dset_id
TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref
INTEGER(HID_T), INTENT(OUT) :: space_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference
INTERFACE
@@ -268,80 +246,57 @@ CONTAINS
hdferr = h5rget_region_region_c(dset_id, ref_f, space_id )
END SUBROUTINE h5rget_region_region_f
!****s* H5R/h5rget_region_ptr_f
!
! NAME
! h5rget_region_ptr_f
!
! PURPOSE
! Retrieves a dataspace with the specified region
! selected using pointer
!
! INPUTS
! dset_id - identifier of the dataset containing
! reference to the regions
! ref - reference to open
! OUTPUTS
! space_id - dataspace identifier
! hdferr - Returns 0 if successful and -1 if fails
! AUTHOR
! M. Scot Breitenfeld
! August 4, 2012
!
! NOTES
! This is a module procedure for the h5rget_region_f subroutine.
!
! SOURCE
SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr)
!>
!! \ingroup FH5R
!!
!! \brief Retrieves a dataspace with the specified region selected using pointer.
!!
!! \note \fortran_approved
!!
!! \param dset_id Identifier of the dataset containing reference to the regions.
!! \param ref Reference to open.
!! \param space_id Dataspace identifier.
!! \param hdferr \fortran_error
!!
#ifdef H5_DOXYGEN_FORTRAN
SUBROUTINE h5rget_region_f(&
#else
SUBROUTINE h5rget_region_ptr_f(&
#endif
dset_id, ref, space_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference
INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: dset_id
TYPE(C_PTR), INTENT(IN) :: ref
INTEGER(HID_T), INTENT(OUT) :: space_id
INTEGER, INTENT(OUT) :: hdferr
hdferr = h5rget_region_ptr_c(dset_id, ref, space_id )
hdferr = h5rget_region_ptr_c(dset_id, ref, space_id)
#ifdef H5_DOXYGEN_FORTRAN
END SUBROUTINE h5rget_region_f
#else
END SUBROUTINE h5rget_region_ptr_f
#endif
!****s* H5R (F03)/h5rcreate_object_f
!
! NAME
! h5rcreate_object_f
!
! PURPOSE
! Creates reference to the object
!
! Inputs:
! loc_id - location identifier
! name - name of the object at the specified location
! Outputs:
! ref - reference to the specified object
! hdferr - returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! NOTES
! This is a module procedure for the h5rcreate_f subroutine.
!
! Signature:
!>
!! \ingroup FH5R
!!
!! \brief Creates reference to the object.
!!
!! \note \fortran_obsolete
!!
!! \param loc_id Location identifier.
!! \param name Name of the object at the specified location.
!! \param ref Reference to the specified object.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified
! by loc_id identifier
TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref
INTEGER, INTENT(OUT) :: hdferr
INTEGER :: namelen ! Name length
TYPE(C_PTR) :: f_ptr
@@ -352,44 +307,26 @@ CONTAINS
hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T))
END SUBROUTINE h5rcreate_object_f
!****s* H5R (F90)/h5rcreate_region_f
!
! NAME
! h5rcreate_region_f
!
! PURPOSE
! Creates reference to the dataset region
!
! INPUTS
! loc_id - location identifier
! name - name of the dataset at the specified location
! space_id - dataspace identifier that describes selected region
! OUTPUTS
! ref - reference to the dataset region
! hdferr - returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! NOTES
! This is a module procedure for the h5rcreate_f subroutine.
!
! SOURCE
!>
!! \ingroup FH5R
!!
!! \brief Creates reference to the dataset region
!!
!! \note \fortran_obsolete
!!
!! \param loc_id Location identifier.
!! \param name Name of the dataset at the specified location.
!! \param space_id Dataspace identifier that describes selected region.
!! \param ref Reference to the dataset region.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified
! by loc_id identifier
INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier
TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER(HID_T), INTENT(IN) :: space_id
TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref
INTEGER, INTENT(OUT) :: hdferr
INTEGER :: namelen ! Name length
INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference
@@ -413,46 +350,36 @@ CONTAINS
END SUBROUTINE h5rcreate_region_f
!****s* H5R (F03)/h5rcreate_ptr_f
!
! NAME
! h5rcreate_ptr_f
!
! PURPOSE
! Creates a reference.
!
! Inputs:
! loc_id - location identifier
! name - name of the dataset at the specified location
! ref_type - type of reference:
! H5R_OBJECT
! H5T_STD_REF_DSETREG
! Outputs:
! ref - reference created by the function call.
! hdferr - returns 0 if successful and -1 if fails.
! OPTIONAL
! space_id - dataspace identifier that describes selected region
!
! AUTHOR
! M. Scot Breitenfeld
! June 20, 2008
!
! NOTES
! This is a module procedure for the h5rcreate_f
! subroutine where the output is a pointer.
!
! Signature:
SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id)
!>
!! \ingroup FH5R
!!
!! \brief Creates a reference.
!!
!! \note \fortran_approved
!!
!! \param loc_id Location identifier.
!! \param name Name of the dataset at the specified location.
!! \param ref_type Type of reference:
!! \li H5R_OBJECT_F
!! \li H5T_STD_REF_DSETREG_F
!! \param ref Reference created by the function call.
!! \param hdferr \fortran_error
!! \param space_id Dataspace identifier that describes selected region.
!!
#ifdef H5_DOXYGEN_FORTRAN
SUBROUTINE h5rcreate_f(&
#else
SUBROUTINE h5rcreate_ptr_f(&
#endif
loc_id, name, ref_type, ref, hdferr, space_id)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified
! by loc_id identifier
INTEGER, INTENT(IN) :: ref_type ! type of reference
TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call
INTEGER, INTENT(OUT) :: hdferr ! Error code
INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier
!*****
INTEGER(HID_T), INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER, INTENT(IN) :: ref_type
TYPE(C_PTR), INTENT(INOUT) :: ref
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id
INTEGER :: namelen ! Name length
INTEGER(HID_T) :: space_id_c
@@ -461,86 +388,56 @@ CONTAINS
IF(PRESENT(space_id)) space_id_c = space_id
hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c)
#ifdef H5_DOXYGEN_FORTRAN
END SUBROUTINE h5rcreate_f
#else
END SUBROUTINE h5rcreate_ptr_f
!****s* H5R (F03)/h5rdereference_object_f
!
! NAME
! h5rdereference_object_f
!
! PURPOSE
! Opens the HDF5 object referenced
!
! Inputs:
! dset_id - identifier of the dataset containing
! reference
! ref - reference to open
! Outputs:
! obj_id - object_identifier
! hdferr - returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! NOTES
! This is a module procedure for the h5rdereference_f subroutine.
!
! Signature:
#endif
!>
!! \ingroup FH5R
!!
!! \brief Opens the HDF5 object referenced.
!!
!! \note \fortran_obsolete
!!
!! \param obj_id Identifier of the dataset containing reference.
!! \param ref Reference to open.
!! \param ref_obj_id Object_identifier.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier
TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref
INTEGER(HID_T), INTENT(OUT) :: ref_obj_id
INTEGER, INTENT(OUT) :: hdferr
TYPE(C_PTR) :: f_ptr
f_ptr = C_LOC(ref)
hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id)
END SUBROUTINE h5rdereference_object_f
!****s* H5R (F03)/h5rdereference_region_f
!
! NAME
! h5rdereference_region_f
!
! PURPOSE
! Opens the dataset region
!
! Inputs:
! dset_id - identifier of the dataset containing
! reference to the regions
! ref - reference to open
! Outputs:
! obj_id - dataspace identifier
! hdferr - returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! NOTES
! This is a module procedure for the h5rdereference_f subroutine.
!
! Signature:
!>
!! \ingroup FH5R
!!
!! \brief Opens the dataset region.
!!
!! \note \fortran_obsolete
!!
!! \param obj_id Object identifier.
!! \param ref Reference to open.
!! \param ref_obj_id Identifier of the object containing reference to the regions.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier
TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER(HID_T), INTENT(IN) :: obj_id
TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref
INTEGER(HID_T), INTENT(OUT) :: ref_obj_id
INTEGER, INTENT(OUT) :: hdferr
TYPE(C_PTR) :: f_ptr
f_ptr = C_LOC(ref)
@@ -548,72 +445,45 @@ CONTAINS
END SUBROUTINE h5rdereference_region_f
!****s* H5R (F03)/h5rdereference_ptr_f
!
! NAME
! h5rdereference_ptr_f
!
! PURPOSE
! Opens the HDF5 object referenced.
!
! Inputs:
! obj_id - valid identifier for the file containing the
! referenced object or any object in that file.
! ref_type - the reference type of ref.
! ref - Reference to open.
! Outputs:
! ref_obj_id - identifier of referenced object
! hdferr - returns 0 if successful and -1 if fails
!
! AUTHOR
! M. Scot Breitenfeld
! June 20, 2008
!
! NOTES
! This is a module procedure for the h5rdereference_f
! subroutine using pointers.
!
! Signature:
!>
!! \ingroup FH5R
!!
!! \brief Opens the HDF5 object referenced.
!!
!! \note \fortran_approved
!!
!! \param obj_id Valid identifier for the file containing the referenced object or any object in that file.
!! \param ref_type The reference type of ref.
!! \param ref Reference to open.
!! \param ref_obj_id Identifier of referenced object.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the
! referenced object or any object in that file.
INTEGER, INTENT(IN) :: ref_type ! The reference type of ref.
TYPE(C_PTR), INTENT(IN) :: ref ! Object reference
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER, INTENT(IN) :: ref_type
TYPE(C_PTR), INTENT(IN) :: ref
INTEGER(HID_T), INTENT(OUT) :: ref_obj_id
! Identifier of referenced object
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
INTEGER, INTENT(OUT) :: hdferr
hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id)
END SUBROUTINE h5rdereference_ptr_f
!
!****s* H5R (F03)/h5rget_name_object_f
!
! NAME
! h5rget_name_object_f
!
! PURPOSE
! Retrieves a name of a referenced object.
!
! Inputs:
! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref - An object or dataset region reference.
!
! Outputs:
! name - A name associated with the referenced object or dataset region.
! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
! size - The size of the name buffer, returning 0 (zero) if no name is associated
! with the identifier.
!
! AUTHOR
! M. Scot Breitenfeld
! March 28, 2008
!
! Signature:
!>
!! \ingroup FH5R
!!
!! \brief Retrieves a name of a referenced object.
!!
!! \note \fortran_obsolete
!!
!! \param loc_id Identifier for the file containing the reference or for any object in that file.
!! \param ref An object or dataset region reference.
!! \param name A name associated with the referenced object or dataset region.
!! \param hdferr \fortran_error
!! \param size The size of the name buffer, returning 0 (zero) if no name is associated with the identifier.
!!
SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
@@ -622,7 +492,6 @@ CONTAINS
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
@@ -637,30 +506,20 @@ CONTAINS
IF(PRESENT(size)) size = size_default
END SUBROUTINE h5rget_name_object_f
!****s* H5R (F03)/h5rget_name_region_f
!
! NAME
! h5rget_name_region_f
!
! PURPOSE
! Retrieves a name of a dataset region.
!
! Inputs:
! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref - An object or dataset region reference.
!
! Outputs:
! name - A name associated with the referenced object or dataset region.
! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
! size - The size of the name buffer, returning 0 (zero) if no name is associated with the identifier
!
! AUTHOR
! M. Scot Breitenfeld
! March 28, 2008
!
! Signature:
!>
!! \ingroup FH5R
!!
!! \brief Retrieves a name of a dataset region.
!!
!! \note \fortran_obsolete
!!
!! \param loc_id Identifier for the file containing the reference or for any object in that file.
!! \param ref An object or dataset region reference.
!! \param name A name associated with the referenced object or dataset region.
!! \param hdferr \fortran_error
!! \param size The size of the name buffer, returning 0 (zero) if no name is associated with the identifier.
!!
SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
@@ -669,7 +528,6 @@ CONTAINS
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
TYPE(C_PTR) :: f_ptr
@@ -684,33 +542,27 @@ CONTAINS
END SUBROUTINE h5rget_name_region_f
!****s* H5R (F03)/h5rget_name_ptr_f
!
! NAME
! h5rget_name_ptr_f
!
! PURPOSE
! Retrieves a name of a referenced object.
!
! Inputs:
! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref_type - Type of reference.
! ref - An object or dataset region reference.
!
! Outputs:
! name - A name associated with the referenced object or dataset ptr.
! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
! size - The size of the name buffer, returning 0 (zero) if no name is associated
! with the identifier
!
! AUTHOR
! M. Scot Breitenfeld
! March 28, 2008
!
! Signature:
SUBROUTINE h5rget_name_ptr_f(loc_id, ref_type, ref, name, hdferr, size)
!>
!! \ingroup FH5R
!!
!! \brief Retrieves a name of a referenced object.
!!
!! \note \fortran_approved
!!
!! \param loc_id Identifier for the file containing the reference or for any object in that file.
!! \param ref_type Type of reference.
!! \param ref An object or dataset region reference.
!! \param name A name associated with the referenced object or dataset ptr.
!! \param hdferr \fortran_error
!!\param size The size of the name buffer, returning 0 (zero) if no name is associated with the identifier.
!!
#ifdef H5_DOXYGEN_FORTRAN
SUBROUTINE h5rget_name_f(&
#else
SUBROUTINE h5rget_name_ptr_f(&
#endif
loc_id, ref_type, ref, name, hdferr, size)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
@@ -719,7 +571,6 @@ CONTAINS
CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER, INTENT(OUT) :: hdferr
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
!*****
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
@@ -729,37 +580,29 @@ CONTAINS
IF(PRESENT(size)) size = size_default
#ifdef H5_DOXYGEN_FORTRAN
END SUBROUTINE h5rget_name_f
#else
END SUBROUTINE h5rget_name_ptr_f
#endif
!****s* H5R (F03)/h5rget_obj_type_f
!
! NAME
! h5rget_obj_type_f
!
! PURPOSE
! Retrieves the type of object that an object reference points to.
!
! Inputs:
! loc_id - Identifier for the dataset containing the reference or
! for the group that dataset is in.
! ref_type - Type of reference to query.
! ref - Reference to query.
!
! Outputs:
! obj_type - Type of referenced object.
! H5G_UNKNOWN_F
! H5G_GROUP_F
! H5G_DATASET_F
! H5G_TYPE_F
!
! hdferr - Returns 0 if successful and -1 if fails.
!
! AUTHOR
! M. Scot Breitenfeld
! Decemeber 17, 2008
!
! Signature:
!>
!! \ingroup FH5R
!!
!! \brief Retrieves the type of object that an object reference points to.
!!
!! loc_id - Identifier for the dataset containing the reference or for the group that dataset is in.
!! ref_type - Type of reference to query.
!! ref - Reference to query.
!! obj_type - Type of referenced object:
!! \li H5G_UNKNOWN_F
!! \li H H5G_GROUP_F
!! \li H H5G_DATASET_F
!! \li H H5G_TYPE_F
!! hdferr - \fortran_error
!!
SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr)
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
@@ -767,7 +610,6 @@ CONTAINS
TYPE(C_PTR), INTENT(IN) :: ref
INTEGER, INTENT(OUT) :: obj_type
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) &

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,13 @@
!****h* ROBODoc/H5VL
!
! NAME
! MODULE H5VL
!
! PURPOSE
! This file contains Fortran interfaces for H5VL (VOL) functions.
!> @defgroup FH5VL Fortran Datatype (H5VL) Interface
!!
!! @see H5VL, C-API
!!
!! @see @ref H5VL_UG, User Guide
!!
!> @ingroup FH5VL
!!
!! @brief This module contains Fortran interfaces for H5VL (VOL) functions.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -32,7 +35,6 @@
! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
MODULE H5VL
@@ -46,30 +48,22 @@ CONTAINS
! H5VLregister_connector
!
!****s* H5VL/H5VLregister_connector_by_name_f
!
! NAME
! H5VLregister_connector_by_name_f
!
! PURPOSE
! Registers a new VOL connector as a member of the virtual object
! layer class by name.
!
! INPUTS
! name - Connector name
! OUTPUTS
! vol_id - VOL id
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Registers a new VOL connector as a member of the virtual object layer class by name.
!!
!! \param name Connector name.
!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F.
!! \param hdferr \fortran_error
!! \param vipl_id VOL initialization property list identifier.
!!
SUBROUTINE H5VLregister_connector_by_name_f(name, vol_id, hdferr, vipl_id)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER(HID_T), INTENT(OUT) :: vol_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id
!*****
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTEGER(HID_T) :: vipl_id_default
@@ -93,14 +87,22 @@ CONTAINS
IF(vol_id.LT.0) hdferr = H5I_INVALID_HID_F
END SUBROUTINE H5VLregister_connector_by_name_f
!>
!! \ingroup FH5V
!!
!! \brief Registers a new VOL connector by value.
!!
!! \param connector_value Connector value.
!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F.
!! \param hdferr \fortran_error
!! \param vipl_id VOL initialization property list identifier.
!!
SUBROUTINE H5VLregister_connector_by_value_f(connector_value, vol_id, hdferr, vipl_id)
IMPLICIT NONE
INTEGER, INTENT(IN) :: connector_value
INTEGER(HID_T), INTENT(OUT) :: vol_id
INTEGER, INTENT(OUT) :: hdferr
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id
!*****
INTEGER(HID_T) :: vipl_id_default
INTERFACE
@@ -123,29 +125,20 @@ CONTAINS
END SUBROUTINE H5VLregister_connector_by_value_f
!
!****s* H5VL/H5VLis_connector_registered_by_name_f
!
! NAME
! H5VLis_connector_registered_by_name_f
!
! PURPOSE
! Tests whether a VOL class has been registered or not
! according to a specified connector name.
!
! INPUTS
! name - Connector name
! OUTPUTS
! registered - state of VOL class registration
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Determines whether a VOL class has been registered or not ccording to a specified connector name.
!!
!! \param name Connector name.
!! \param registered State of VOL class registration.
!! \param hdferr \fortran_error
!!
SUBROUTINE H5VLis_connector_registered_by_name_f(name, registered, hdferr)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: name
LOGICAL, INTENT(OUT) :: registered
INTEGER, INTENT(OUT) :: hdferr
!*****
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTEGER(C_INT) :: registered_c
@@ -167,29 +160,20 @@ CONTAINS
END SUBROUTINE H5VLis_connector_registered_by_name_f
!
!****s* H5VL/H5VLis_connector_registered_by_value_f
!
! NAME
! H5VLis_connector_registered_by_value_f
!
! PURPOSE
! Tests whether a VOL class has been registered or not
! according to a specified connector value (ID).
!
! INPUTS
! value - Connector value
! OUTPUTS
! registered - state of VOL class registration
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Determines whether a VOL class has been registered or not according to a specified connector value (ID).
!!
!! \param value ConneConnector value.
!! \param registered State of VOL class registration.
!! \param hdferr Retu\fortran_error
!!
SUBROUTINE H5VLis_connector_registered_by_value_f(value, registered, hdferr)
IMPLICIT NONE
INTEGER, INTENT(IN) :: value
LOGICAL, INTENT(OUT) :: registered
INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER(C_INT) :: registered_c
INTERFACE
@@ -208,28 +192,20 @@ CONTAINS
END SUBROUTINE H5VLis_connector_registered_by_value_f
!
!****s* H5VL/H5VLget_connector_id_f
!
! NAME
! H5VLget_connector_id_f
!
! PURPOSE
! Retrieves the ID for a registered VOL connector.
!
! INPUTS
! obj_id - Object id
! OUTPUTS
! vol_id - Connector id
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Retrieves the ID for a registered VOL connector.
!!
!! \param obj_id Object id.
!! \param vol_id Connector id.
!! \param hdferr \fortran_error
!!
SUBROUTINE H5VLget_connector_id_f(obj_id, vol_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER(HID_T), INTENT(OUT) :: vol_id
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER(HID_T) FUNCTION H5VLget_connector_id(obj_id) BIND(C,NAME='H5VLget_connector_id')
@@ -247,28 +223,20 @@ CONTAINS
END SUBROUTINE H5VLget_connector_id_f
!
!****s* H5VL/H5VLget_connector_id_by_name_f
!
! NAME
! H5VLget_connector_id_by_name_f
!
! PURPOSE
! Retrieves the ID for a registered VOL connector.
!
! INPUTS
! name - Connector name
! OUTPUTS
! vol_id - Connector id
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Retrieves the ID for a registered VOL connector.
!!
!! \param name Connector name.
!! \param vol_id Connector id.
!! \param hdferr \fortran_error
!!
SUBROUTINE H5VLget_connector_id_by_name_f(name, vol_id, hdferr)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER(HID_T), INTENT(OUT) :: vol_id
INTEGER, INTENT(OUT) :: hdferr
!*****
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTERFACE
@@ -290,28 +258,20 @@ CONTAINS
END SUBROUTINE H5VLget_connector_id_by_name_f
!
!****s* H5VL/H5VLget_connector_id_by_value_f
!
! NAME
! H5VLget_connector_id_by_value_f
!
! PURPOSE
! Retrieves the ID for a registered VOL connector.
!
! INPUTS
! value - Connector value
! OUTPUTS
! vol_id - Connector id
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Retrieves the ID for a registered VOL connector.
!!
!! \param value CConnector value.
!! \param vol_id Connector id.
!! \param hdferr \fortran_error
!!
SUBROUTINE H5VLget_connector_id_by_value_f(value, vol_id, hdferr)
IMPLICIT NONE
INTEGER, INTENT(IN) :: value
INTEGER(HID_T), INTENT(OUT) :: vol_id
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER(HID_T) FUNCTION H5VLget_connector_id_by_value(value) BIND(C,NAME='H5VLget_connector_id_by_value')
IMPORT :: C_INT
@@ -329,14 +289,22 @@ CONTAINS
ENDIF
END SUBROUTINE H5VLget_connector_id_by_value_f
!>
!! \ingroup FH5V
!!
!! \brief Retrieves a connector name for a VOL.
!!
!! \param obj_id Object identifier or file identifier.
!! \param name Connector name.
!! \param hdferr \fortran_error
!! \param name_len Maximum length of the name to retrieve.
!!
SUBROUTINE H5VLget_connector_name_f(obj_id, name, hdferr, name_len)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
CHARACTER(LEN=*), INTENT(OUT) :: name
INTEGER, INTENT(OUT) :: hdferr
INTEGER(SIZE_T), OPTIONAL :: name_len
!*****
CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name
INTEGER(SIZE_T) :: l
@@ -346,7 +314,6 @@ CONTAINS
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN), VALUE :: obj_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name
! TYPE(C_PTR), value :: name
INTEGER(SIZE_T), INTENT(IN), VALUE :: size
END FUNCTION H5VLget_connector_name
END INTERFACE
@@ -367,28 +334,18 @@ CONTAINS
END SUBROUTINE H5VLget_connector_name_f
!
!
!****s* H5VL/H5VLclose_f
!
! NAME
! H5VLclose_f
!
! PURPOSE
! Closes a VOL connector ID.
!
! INPUTS
! vol_id - A valid identifier of the connectory to unregister.
!
! OUTPUTS
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Closes a VOL connector ID.
!!
!! \param vol_id A valid identifier of the connectory to unregister.
!! \param hdferr \fortran_error
!!
SUBROUTINE H5VLclose_f(vol_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: vol_id
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION H5VLclose(vol_id) BIND(C, NAME='H5VLclose')
@@ -401,27 +358,18 @@ CONTAINS
END SUBROUTINE H5VLclose_f
!
!****s* H5VL/H5VLunregister_connector_f
!
! NAME
! H5VLunregister_connector_f
!
! PURPOSE
! Removes a VOL connector ID from the library.
!
! INPUTS
! plugin_id - A valid identifier of the connector to unregister.
!
! OUTPUTS
! hdferr - Returns 0 if successful and -1 if fails
! SOURCE
!>
!! \ingroup FH5V
!!
!! \brief Removes a VOL connector ID from the library.
!!
!! \param plugin_id A valid identifier of the connector to unregister..
!! \param hdferr Ret\fortran_error
!!
SUBROUTINE H5VLunregister_connector_f(plugin_id, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: plugin_id
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION H5VLunregister_connector(plugin_id) BIND(C, NAME='H5VLunregister_connector')

View File

@@ -1,10 +1,6 @@
!****h* ROBODoc/H5Z
!
! NAME
! MODULE H5Z
!
! PURPOSE
! This file contains Fortran interfaces for H5Z functions.
!> @ingroup FH5Z
!!
!! @brief This module contains Fortran interfaces for H5Z functions.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -14,10 +10,10 @@
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! the COPYING file, which can be found at the root of the source code *
! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES!
@@ -32,7 +28,6 @@
! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
MODULE H5Z
@@ -40,38 +35,24 @@ MODULE H5Z
CONTAINS
!****s* H5Z/h5zunregister_f
!
! NAME
! h5zunregister_f
!
! PURPOSE
! Unregisters specified filetr
!
! INPUTS
! filter - Filter; may have one of the following values:
! H5Z_FILTER_DEFLATE_F
! H5Z_FILTER_SZIP_F
! H5Z_FILTER_NBIT_F
! H5Z_FILTER_SCALEOFFSET_F
! H5Z_FILTER_SHUFFLE_F
! H5Z_FILTER_FLETCHER32_F
!
! OUTPUTS
! hdferr - Error code
! Success: 0
! Failure: -1
!
! AUTHOR
! Elena Pourmal
! March 12, 2003
!
! SOURCE
!>
!! \ingroup FH5Z
!!
!! \brief Unregisters specified filters.
!!
!! \param filter Filter; may have one of the following values:
!! \li H5Z_FILTER_DEFLATE_F
!! \li H5Z_FILTER_SZIP_F
!! \li H5Z_FILTER_NBIT_F
!! \li H5Z_FILTER_SCALEOFFSET_F
!! \li H5Z_FILTER_SHUFFLE_F
!! \li H5Z_FILTER_FLETCHER32_F
!! \param hdferr \fortran_error
!!
SUBROUTINE h5zunregister_f(filter, hdferr)
IMPLICIT NONE
INTEGER, INTENT(IN) :: filter
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION h5zunregister_c(filter) BIND(C,NAME='h5zunregister_c')
INTEGER, INTENT(IN) :: filter
@@ -80,39 +61,26 @@ CONTAINS
hdferr = h5zunregister_c(filter)
END SUBROUTINE h5zunregister_f
!****s* H5Z/h5zfilter_avail_f
! NAME
! h5zfilter_avail_f
!
! PURPOSE
! Queries if filter is available
!
! INPUTS
! filter - Filter; may be one of the following:
! H5Z_FILTER_DEFLATE_F
! H5Z_FILTER_SZIP_F
! H5Z_FILTER_NBIT_F
! H5Z_FILTER_SCALEOFFSET_F
! H5Z_FILTER_SHUFFLE_F
! H5Z_FILTER_FLETCHER32_F
! OUTPUTS
! status - Flag; .TRUE. if filter is available,
! .FALSE. otherwise
! hdferr: - Error code
! Success: 0
! Failure: -1
!
! AUTHOR
! Elena Pourmal
! March 12, 2003
!
! SOURCE
!>
!! \ingroup FH5Z
!!
!! \brief Queries if filter is available
!!
!! \param filter Filter; may be one of the following:
!! \li H5Z_FILTER_DEFLATE_F
!! \li H5Z_FILTER_SZIP_F
!! \li H5Z_FILTER_NBIT_F
!! \li H5Z_FILTER_SCALEOFFSET_F
!! \li H5Z_FILTER_SHUFFLE_F
!! \li H5Z_FILTER_FLETCHER32_F
!! \param status Flag; .TRUE. if filter is available, .FALSE. otherwise.
!! \param hdferr \fortran_error
!!
SUBROUTINE h5zfilter_avail_f(filter, status, hdferr)
IMPLICIT NONE
INTEGER, INTENT(IN) :: filter
LOGICAL, INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER :: flag ! "TRUE/FALSE/ERROR from C"
INTERFACE
@@ -129,43 +97,28 @@ CONTAINS
END SUBROUTINE h5zfilter_avail_f
!****s* H5Z/h5zget_filter_info_f
!
! NAME
! h5zget_filter_info_f
!
! PURPOSE
! Queries if filter has its encoder and/or decoder
! available
!
! INPUTS
! filter - Filter; may be one of the following:
! H5Z_FILTER_DEFLATE_F
! H5Z_FILTER_SZIP_F
! H5Z_FILTER_NBIT_F
! H5Z_FILTER_SCALEOFFSET_F
! H5Z_FILTER_SHUFFLE_F
! H5Z_FILTER_FLETCHER32_Ffilter
! OUTPUTS
! config_flags - Flag, indicates if filter has its encoder
! and/or decoder available, possibly containing the
! following values:
! H5Z_FILTER_ENCODE_ENABLED_F
! H5Z_FILTER_DECODE_ENABLED_F
! hdferr: - Error code
! Success: 0
! Failure: -1
!
! AUTHOR
! Nat Furrer and James Laird
! June 16, 2004
! SOURCE
!>
!! \ingroup FH5Z
!!
!! \brief Queries if filter has its encoder and/or decoder available.
!!
!! \param filter Filter; may be one of the following:
!! \li H5Z_FILTER_DEFLATE_F
!! \li H5Z_FILTER_SZIP_F
!! \li H5Z_FILTER_NBIT_F
!! \li H5Z_FILTER_SCALEOFFSET_F
!! \li H5Z_FILTER_SHUFFLE_F
!! \li H5Z_FILTER_FLETCHER32_Ffilter
!! \param config_flags Flag, indicates if filter has its encoder and/or decoder available, possible values:
!! \li H5Z_FILTER_ENCODE_ENABLED_F
!! \li H5Z_FILTER_DECODE_ENABLED_F
!! \param hdferr \fortran_error
!!
SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr)
IMPLICIT NONE
INTEGER, INTENT(IN) :: filter
INTEGER, INTENT(OUT) :: config_flags
INTEGER, INTENT(OUT) :: hdferr
!*****
INTERFACE
INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) BIND(C,NAME='h5zget_filter_info_c')

View File

@@ -1,10 +1,13 @@
!****h* ROBODoc/H5LIB
!
! NAME
! MODULE H5LIB
!
! PURPOSE
! This module provides fortran specific helper functions for the HDF library
!> @defgroup FH5 Fortran Library (H5) Interface
!!
!! @see H5, C-API
!!
!! @see @ref H5_UG, User Guide
!!
!> @ingroup FH5
!!
!! @brief This module provides fortran specific helper functions for the HDF library.
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -32,7 +35,6 @@
! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
#include <H5config_f.inc>
@@ -145,36 +147,18 @@ MODULE H5LIB
PUBLIC :: h5garbage_collect_f, h5check_version_f
CONTAINS
!****s* H5LIB/h5open_f
!
! NAME
! h5open_f
!
! PURPOSE
! Initializes HDF5 Fortran interface.
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! Removed call to h5open_c since this may cause a problem for an
! application that uses HDF5 library outside HDF5 Fortran APIs.
! October 13, 2011
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Initializes HDF5 Fortran interface.
!!
!! \param error \fortran_error
!!
SUBROUTINE h5open_f(error)
USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ
IMPLICIT NONE
INTEGER, INTENT(OUT) :: error
INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ_LOC = 0
!*****
INTERFACE
INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) &
@@ -646,35 +630,17 @@ CONTAINS
END SUBROUTINE h5open_f
!****s* H5LIB/h5close_f
!
! NAME
! h5close_f
!
! PURPOSE
! Closes HDF5 Fortran interface.
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! August 12, 1999
!
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
! port). February 28, 2001
!
! Removed call to h5close_c since this may cause a problem for an
! application that uses HDF5 library outside HDF5 Fortran APIs.
! October 13, 2011
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Closes HDF5 Fortran interface.
!!
!! \param error \fortran_error
!!
SUBROUTINE h5close_f(error)
USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ
IMPLICIT NONE
INTEGER, INTENT(OUT) :: error
!*****
INTERFACE
INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, &
f_types, F_TYPES_LEN, &
@@ -702,29 +668,19 @@ CONTAINS
END SUBROUTINE h5close_f
!****s* H5LIB/h5get_libversion_f
!
! NAME
! h5get_libversion_f
!
! PURPOSE
! Returns the HDF5 LIbrary release number
!
! Outputs:
! majnum - major version of the library
! minnum - minor version of the library
! relnum - release version of the library
! error - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! September 24, 2002
!
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Returns the HDF5 LIbrary release number
!!
!! \param majnum Major version of the library.
!! \param minnum Minor version of the library.
!! \param relnum Release version of the library.
!! \param error \fortran_error
!!
SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error)
IMPLICIT NONE
INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error
!*****
INTERFACE
INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) &
BIND(C,NAME='h5get_libversion_c')
@@ -737,32 +693,20 @@ CONTAINS
END SUBROUTINE h5get_libversion_f
!****s* H5LIB/h5check_version_f
!
! NAME
! h5check_version_f
!
! PURPOSE
! Verifies that library versions are consistent.
!
! Inputs:
! majnum - major version of the library
! minnum - minor version of the library
! relnum - release version of the library
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! September 24, 2002
!
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Verifies that library versions are consistent.
!!
!! \param majnum Major version of the library.
!! \param minnum Minor version of the library.
!! \param relnum Release version of the library.
!! \param error \fortran_error
!!
SUBROUTINE h5check_version_f(majnum, minnum, relnum, error)
IMPLICIT NONE
INTEGER, INTENT(IN) :: majnum, minnum, relnum
INTEGER, INTENT(OUT) :: error
!*****
INTERFACE
INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) &
BIND(C,NAME='h5check_version_c')
@@ -774,58 +718,38 @@ CONTAINS
error = h5check_version_c(majnum, minnum, relnum)
END SUBROUTINE h5check_version_f
!****s* H5LIB/h5garbage_collect_f
!
! NAME
! h5garbage_collect_f
!
! PURPOSE
! Garbage collects on all free-lists of all types.
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! September 24, 2002
!
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Garbage collects on all free-lists of all types.
!!
!! \param error \fortran_error
!!
SUBROUTINE h5garbage_collect_f(error)
IMPLICIT NONE
INTEGER, INTENT(OUT) :: error
!*****
INTERFACE
INTEGER FUNCTION h5garbage_collect_c() &
BIND(C,NAME='h5garbage_collect_c')
INTEGER FUNCTION h5garbage_collect_c() BIND(C,NAME='h5garbage_collect_c')
IMPLICIT NONE
END FUNCTION h5garbage_collect_c
END INTERFACE
error = h5garbage_collect_c()
END SUBROUTINE h5garbage_collect_f
!****s* H5LIB/h5dont_atexit_f
!
! NAME
! h5dont_atexit_f
!
! PURPOSE
! Instructs library not to install atexit cleanup routine.
!
! Outputs:
! error - Returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
! September 24, 2002
!
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Instructs library not to install atexit cleanup routine.
!!
!! \param error \fortran_error
!!
SUBROUTINE h5dont_atexit_f(error)
IMPLICIT NONE
INTEGER, INTENT(OUT) :: error
!*****
INTERFACE
INTEGER FUNCTION h5dont_atexit_c() &
BIND(C,NAME='h5dont_atexit_c')
INTEGER FUNCTION h5dont_atexit_c() BIND(C,NAME='h5dont_atexit_c')
IMPLICIT NONE
END FUNCTION h5dont_atexit_c
END INTERFACE
@@ -833,34 +757,23 @@ CONTAINS
END SUBROUTINE h5dont_atexit_f
!****f* H5LIB/h5kind_to_type
!
! NAME
! h5kind_to_type
!
! PURPOSE
! Converts the KIND to the correct HDF type
!
! Inputs:
! kind - Fortran KIND parameter
! flag - Whether KIND is of type INTEGER or REAL:
! H5_INTEGER_KIND - integer
! H5_REAL_KIND - real
! Outputs:
! h5_type - Returns the type
!
! AUTHOR
! M. Scot Breitenfeld
! August 25, 2008
!
! Fortran90 Interface:
!>
!! \ingroup FH5
!!
!! \brief Converts the KIND to the correct HDF type
!!
!! \param ikind Fortran KIND parameter.
!! \param flag Whether KIND is of type INTEGER or REAL:
!! \li H5_INTEGER_KIND - integer
!! \li H5_REAL_KIND - real
!! \result h5_type Returns the type.
!!
INTEGER(HID_T) FUNCTION h5kind_to_type(ikind, flag) RESULT(h5_type)
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER, INTENT(IN) :: ikind
INTEGER, INTENT(IN) :: flag
INTEGER :: i
!*****
!#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0
! ! (1) The array index assumes INTEGER*16 the last integer in the series, and
@@ -896,34 +809,20 @@ CONTAINS
END FUNCTION h5kind_to_type
!****f* H5LIB_PROVISIONAL/h5offsetof
!
! NAME
! h5offsetof
!
! PURPOSE
! Computes the offset in memory
!
! Inputs:
! start - starting pointer address
! end - ending pointer address
!
! Outputs:
! offset - offset of a member within the derived type
!
! AUTHOR
! M. Scot Breitenfeld
! August 25, 2008
!
! ACKNOWLEDGEMENTS
! Joe Krahn
!
! Fortran2003 Interface:
!>
!! \ingroup FH5
!!
!! \brief Computes the offset in memory
!!
!! \param start Starting pointer address.
!! \param end Ending pointer address.
!!
!! \result offset Offset of a member within the derived type.
!!
FUNCTION h5offsetof(start,end) RESULT(offset)
IMPLICIT NONE
INTEGER(SIZE_T) :: offset
TYPE(C_PTR), VALUE, INTENT(IN) :: start, end
!*****
INTEGER(C_INTPTR_T) :: int_address_start, int_address_end
int_address_start = TRANSFER(start, int_address_start)
int_address_end = TRANSFER(end , int_address_end )
@@ -932,38 +831,26 @@ CONTAINS
END FUNCTION h5offsetof
!****f* H5LIB_PROVISIONAL/h5gmtime
!
! NAME
! h5gmtime
!
! PURPOSE
! Convert time_t structure (C) to Fortran DATE AND TIME storage format.
!
! Inputs:
! stdtime_t - Object of type time_t that contains a time value
!
! Outputs:
! datetime - A date/time array using Fortran conventions:
! datetime(1) = year
! datetime(2) = month
! datetime(3) = day
! datetime(4) = 0 ! time is expressed as UTC (or GMT timezone) */
! datetime(5) = hour
! datetime(6) = minute
! datetime(7) = second
! datetime(8) = millisecond -- not available, assigned - HUGE(0)
!
! AUTHOR
! M. Scot Breitenfeld
! January, 2019
!
! Fortran Interface:
FUNCTION h5gmtime(stdtime_t)
!>
!! \ingroup FH5
!!
!! \brief Convert time_t structure (C) to Fortran DATE AND TIME storage format.
!!
!! \param stdtime_t Object of type time_t that contains a time value.
!! \result datetime A date/time array using Fortran conventions:
!! \li datetime(1) = year
!! \li datetime(2) = month
!! \li datetime(3) = day
!! \li datetime(4) = 0 ! time is expressed as UTC (or GMT timezone)
!! \li datetime(5) = hour
!! \li datetime(6) = minute
!! \li datetime(7) = second
!! \li datetime(8) = millisecond -- not available, assigned - HUGE(0)
!!
FUNCTION h5gmtime(stdtime_t) RESULT(datetime)
IMPLICIT NONE
INTEGER(KIND=TIME_T), INTENT(IN) :: stdtime_t
INTEGER, DIMENSION(1:8) :: h5gmtime
!*****
INTEGER, DIMENSION(1:8) :: datetime
TYPE(C_PTR) :: cptr
INTEGER(C_INT), DIMENSION(:), POINTER :: c_time
@@ -979,14 +866,14 @@ CONTAINS
cptr = gmtime(stdtime_t)
CALL C_F_POINTER(cptr, c_time, [9])
h5gmtime(1) = INT(c_time(6)+1900) ! year starts at 1900
h5gmtime(2) = INT(c_time(5)+1) ! month starts at 0 in C
h5gmtime(3) = INT(c_time(4)) ! day
h5gmtime(4) = 0 ! time is expressed as UTC (or GMT timezone)
h5gmtime(5) = INT(c_time(3)) ! hour
h5gmtime(6) = INT(c_time(2)) ! minute
h5gmtime(7) = INT(c_time(1)) ! second
h5gmtime(8) = -32767 ! millisecond is not available, assign it -HUGE(0)
datetime(1) = INT(c_time(6)+1900) ! year starts at 1900
datetime(2) = INT(c_time(5)+1) ! month starts at 0 in C
datetime(3) = INT(c_time(4)) ! day
datetime(4) = 0 ! time is expressed as UTC (or GMT timezone)
datetime(5) = INT(c_time(3)) ! hour
datetime(6) = INT(c_time(2)) ! minute
datetime(7) = INT(c_time(1)) ! second
datetime(8) = -32767 ! millisecond is not available, assign it -HUGE(0)
END FUNCTION h5gmtime

View File

@@ -1,3 +1,14 @@
!> @defgroup FH5DS Fortran High-level H5DS Interface
!!
!! @see H5DS, C-API
!!
!! @see @ref H5DS_UG, User Guide
!!
!> @ingroup FH5DS
!!
!! @brief This module contains Fortran interfaces for H5DS
!
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by The HDF Group. *
! Copyright by the Board of Trustees of the University of Illinois. *
@@ -10,45 +21,43 @@
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! _____ __ __ _____ ____ _____ _______ _ _ _______
! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __|
! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | ****
! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | ****
! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | ****
! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_|
!
!
! This file contains FORTRAN90 interfaces for H5DS functions
! If you add a new function here then you MUST add the function name to the
! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory.
! This is needed for Windows based operating systems.
!
MODULE h5ds
MODULE H5DS
USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_CHAR
USE h5fortran_types
USE hdf5
CONTAINS
!-------------------------------------------------------------------------
! Function: H5DSset_scale_f
!
! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 17, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Convert dataset \p dsid to a dimension scale, with optional name, \p dimname.
!!
!! \param dsid The dataset to be made a Dimemsion Scale.
!! \param errcode \fortran_error
!! \param dimname The dimension name.
!!
SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale
CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name
INTEGER :: errcode ! Error code
INTEGER(hid_t), INTENT(in) :: dsid
CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname
INTEGER :: errcode
INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present)
INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present)
INTERFACE
INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len) &
@@ -56,8 +65,8 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname ! The dimension name
INTEGER(hid_t), INTENT(in) :: dsid
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname
INTEGER(SIZE_T), INTENT(in) :: dimname_len
END FUNCTION H5DSset_scale_c
END INTERFACE
@@ -71,31 +80,24 @@ CONTAINS
END SUBROUTINE H5DSset_scale_f
!-------------------------------------------------------------------------
! Function: H5DSattach_scale_f
!
! Purpose: Attach dimension scale dsid to dimension idx of dataset did.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 17, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Attach dimension scale dsid to dimension \p idx of dataset \p did.
!!
!! \param did The dataset.
!! \param dsid The scale to be attached.
!! \param idx The dimension of \p did that \p dsid is associated with.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached
INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with.
INTEGER :: errcode ! error code
INTEGER(hid_t), INTENT(in) :: did
INTEGER(hid_t), INTENT(in) :: dsid
INTEGER , INTENT(in) :: idx
INTEGER :: errcode
INTEGER :: c_idx
INTERFACE
@@ -103,9 +105,9 @@ CONTAINS
BIND(C,NAME='h5dsattach_scale_c')
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached
INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with.
INTEGER(hid_t), INTENT(in) :: did
INTEGER(hid_t), INTENT(in) :: dsid
INTEGER , INTENT(in) :: idx
END FUNCTION H5DSattach_scale_c
END INTERFACE
@@ -115,31 +117,25 @@ CONTAINS
END SUBROUTINE H5DSattach_scale_f
!-------------------------------------------------------------------------
! Function: H5DSdetach_scale_f
!
! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 17, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Detach dimension scale dsid from the dimension idx of dataset \p did.
!!
!! \param did The dataset.
!! \param dsid The scale to be detached.
!! \param idx The dimension of \p did to detach.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached
INTEGER , INTENT(in) :: idx ! the dimension of did to detach
INTEGER :: errcode ! error code
INTEGER(hid_t), INTENT(in) :: did
INTEGER(hid_t), INTENT(in) :: dsid
INTEGER , INTENT(in) :: idx
INTEGER :: errcode
INTEGER :: c_idx
INTERFACE
@@ -147,9 +143,9 @@ CONTAINS
BIND(C,NAME='h5dsdetach_scale_c')
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached
INTEGER , INTENT(in) :: idx ! the dimension of did to detach
INTEGER(hid_t), INTENT(in) :: did
INTEGER(hid_t), INTENT(in) :: dsid
INTEGER , INTENT(in) :: idx
END FUNCTION H5DSdetach_scale_c
END INTERFACE
@@ -159,34 +155,26 @@ CONTAINS
END SUBROUTINE H5DSdetach_scale_f
!-------------------------------------------------------------------------
! Function: H5DSis_attached_f
!
! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 17, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Report if dimension scale dsid is currently attached to dimension idx of dataset did.
!!
!! \param did The dataset.
!! \param dsid The scale to be attached.
!! \param idx The dimension of \p did that \p dsid is associated with.
!! \param is_attached If dimension scale \p dsid is currently attached to dimension \p idx of dataset \p did.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached
INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with
LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to
! dimension idx of dataset did
INTEGER :: errcode ! error code
INTEGER(hid_t), INTENT(in) :: did
INTEGER(hid_t), INTENT(in) :: dsid
INTEGER , INTENT(in) :: idx
LOGICAL , INTENT(out) :: is_attached
INTEGER :: errcode
INTEGER :: c_is_attached
INTEGER :: c_idx
@@ -195,10 +183,10 @@ CONTAINS
BIND(C,NAME='h5dsis_attached_c')
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached
INTEGER , INTENT(in) :: idx ! the dimension of did to detach
INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to
INTEGER(hid_t), INTENT(in) :: did
INTEGER(hid_t), INTENT(in) :: dsid
INTEGER , INTENT(in) :: idx
INTEGER , INTENT(out) :: c_is_attached
END FUNCTION H5DSis_attached_c
END INTERFACE
@@ -218,32 +206,22 @@ CONTAINS
!
! H5DSiterate_scales: Implement in F2003
!
!-------------------------------------------------------------------------
! Function: H5DSis_scale_f
!
! Purpose: Determines whether dset is a Dimension Scale.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 18, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Determines whether \p did is a Dimension Scale.
!!
!! \param did The data set to query.
!! \param is_scale If is a Dimension Scale.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSis_scale_f( did, is_scale, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the data set to query
LOGICAL , INTENT(out) :: is_scale ! logical:
! .TRUE. if did is a Dimension Scale
INTEGER :: errcode ! error code
INTEGER(hid_t), INTENT(in) :: did
LOGICAL , INTENT(out) :: is_scale
INTEGER , INTENT(out) :: errcode
INTEGER :: c_is_scale
INTERFACE
@@ -267,30 +245,23 @@ CONTAINS
END SUBROUTINE H5DSis_scale_f
!-------------------------------------------------------------------------
! Function: H5DSset_label_f
!
! Purpose: Set label for the dimension idx of did to the value label
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 18, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Set label for the dimension \p idx of \p did to the value \p label.
!!
!! \param did The data set.
!! \param idx The dimension.
!! \param label The label.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSset_label_f( did, idx, label, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! The dataset
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(LEN=*), INTENT(in) :: label ! The label
INTEGER(hid_t), INTENT(in) :: did
INTEGER , INTENT(in) :: idx
CHARACTER(LEN=*), INTENT(in) :: label
INTEGER :: errcode ! Error code
INTEGER(SIZE_T) :: label_len ! Length of label
@@ -302,10 +273,10 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! The dataset
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label
INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label
INTEGER(hid_t), INTENT(in) :: did
INTEGER , INTENT(in) :: idx
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label
INTEGER(SIZE_T), INTENT(in) :: label_len
END FUNCTION H5DSset_label_c
END INTERFACE
@@ -316,32 +287,26 @@ CONTAINS
END SUBROUTINE H5DSset_label_f
!-------------------------------------------------------------------------
! Function: H5DSget_label_f
!
! Purpose: Read the label for dimension idx of did into buffer label.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 18, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Read the \p label for dimension \p idx of \p did into buffer \p label.
!!
!! \param did The dataset.
!! \param idx The dimension.
!! \param label The label.
!! \param size The length of the \p label buffer.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! The dataget
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(LEN=*), INTENT(INOUT) :: label ! The label
INTEGER(size_t) , INTENT(INOUT) :: size ! The length of the label buffer
INTEGER :: errcode ! Error code
INTEGER(hid_t), INTENT(in) :: did
INTEGER , INTENT(in) :: idx
CHARACTER(LEN=*), INTENT(INOUT) :: label
INTEGER(size_t) , INTENT(INOUT) :: size
INTEGER :: errcode
INTEGER :: c_idx
INTERFACE
@@ -350,10 +315,10 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! The dataget
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: label ! The label
INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label
INTEGER(hid_t), INTENT(in) :: did
INTEGER , INTENT(in) :: idx
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: label
INTEGER(SIZE_T), INTENT(inout) :: size
END FUNCTION H5DSget_label_c
END INTERFACE
@@ -363,32 +328,24 @@ CONTAINS
END SUBROUTINE H5DSget_label_f
!-------------------------------------------------------------------------
! Function: H5DSget_scale_name_f
!
! Purpose: Read the name of scale did into buffer name.
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 18, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Read the name of scale \p did into buffer name.
!!
!! \param did Dimension scale identifier.
!! \param name Buffer to contain the returned name.
!! \param size Size in bytes, of the name buffer.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! The dataget
CHARACTER(LEN=*), INTENT(INOUT) :: name ! The name
INTEGER(size_t) , INTENT(INOUT) :: size ! The length of the name buffer
INTEGER :: errcode ! Error code
INTEGER(hid_t), INTENT(in) :: did
CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER(size_t) , INTENT(INOUT) :: size
INTEGER :: errcode
INTERFACE
INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) &
@@ -396,9 +353,9 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! The dataget
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name ! The name
INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name
INTEGER(hid_t), INTENT(in) :: did
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name
INTEGER(SIZE_T), INTENT(inout) :: size
END FUNCTION H5DSget_scale_name_c
END INTERFACE
@@ -406,30 +363,23 @@ CONTAINS
END SUBROUTINE H5DSget_scale_name_f
!-------------------------------------------------------------------------
! Function: H5DSget_num_scales_f
!
! Purpose: Determines how many Dimension Scales are attached to dimension idx of did
!
! Return: Success: 0, Failure: -1
!
! Programmer: M. Scot Breitenfeld
!
! Date: April 18, 2011
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5DS
!!
!! \brief Determines how many Dimension Scales are attached to dimension idx of \p did.
!!
!! \param did The dataset to query.
!! \param idx The dimension of \p did to query.
!! \param num_scales Number of Dimension Scales associated with \p did.
!! \param errcode \fortran_error
!!
SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER , INTENT(in) :: idx ! the dimension of did to query
INTEGER , INTENT(INOUT) :: num_scales ! the number of Dimension Scales associated with did
INTEGER :: errcode ! error code
INTEGER(hid_t), INTENT(in) :: did
INTEGER , INTENT(in) :: idx
INTEGER , INTENT(INOUT) :: num_scales
INTEGER :: errcode
INTEGER :: c_idx
INTERFACE
@@ -437,9 +387,9 @@ CONTAINS
BIND(C,NAME='h5dsget_num_scales_c')
IMPORT :: HID_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER , INTENT(in) :: idx ! the dimension of did to query
INTEGER , INTENT(INOUT) :: num_scales ! the number of Dimension Scales associated with did
INTEGER(hid_t), INTENT(in) :: did
INTEGER , INTENT(in) :: idx
INTEGER , INTENT(INOUT) :: num_scales
END FUNCTION H5DSget_num_scales_c
END INTERFACE

View File

@@ -1,3 +1,14 @@
!> @defgroup FH5IM Fortran High-level H5IM Interface
!!
!! @see H5IM, C-API
!!
!! @see @ref H5IM_UG, User Guide
!!
!> @ingroup FH5IM
!!
!! @brief This module contains Fortran interfaces for H5IM.
!
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by The HDF Group. *
! Copyright by the Board of Trustees of the University of Illinois. *
@@ -10,12 +21,6 @@
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
!
! This file contains FORTRAN interfaces for H5IM functions
!
! NOTES
!
! _____ __ __ _____ ____ _____ _______ _ _ _______
! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __|
! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | ****
@@ -28,29 +33,24 @@
! This is needed for Windows based operating systems.
!
MODULE h5im
MODULE H5IM
USE, INTRINSIC :: ISO_C_BINDING
USE h5fortran_types
USE hdf5
CONTAINS
!-------------------------------------------------------------------------
! Function: h5immake_image_8bit_f
!
! Purpose: Creates and writes an image an 8 bit image
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 05, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Creates and writes an image an 8 bit image.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param dset_name The name of the dataset to create.
!! \param width The width of the image.
!! \param height The height of the image.
!! \param buf Buffer with data to be written to the dataset.
!! \param errcode \fortran_error
!!
SUBROUTINE h5immake_image_8bit_f(loc_id,&
dset_name,&
width,&
@@ -60,13 +60,13 @@ CONTAINS
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(in) :: width ! width of image
INTEGER(hsize_t), INTENT(in) :: height ! height of image
INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: dset_name
INTEGER(hsize_t), INTENT(in) :: width
INTEGER(hsize_t), INTENT(in) :: height
INTEGER, INTENT(in), DIMENSION(*) :: buf
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) &
@@ -74,12 +74,12 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T, HSIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
INTEGER(size_t) :: namelen ! length of name buffer
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(in) :: width ! width of image
INTEGER(hsize_t), INTENT(in) :: height ! height of image
INTEGER , INTENT(in), DIMENSION(*) :: buf ! buffer
INTEGER(hid_t), INTENT(in) :: loc_id
INTEGER(size_t) :: namelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name
INTEGER(hsize_t), INTENT(in) :: width
INTEGER(hsize_t), INTENT(in) :: height
INTEGER , INTENT(in), DIMENSION(*) :: buf
END FUNCTION h5immake_image_8bit_c
END INTERFACE
@@ -88,22 +88,16 @@ CONTAINS
END SUBROUTINE h5immake_image_8bit_f
!-------------------------------------------------------------------------
! Function: h5imread_image_f
!
! Purpose: Reads image data from disk.
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 05, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Reads image data from disk.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param dset_name The name of the dataset to create.
!! \param buf Buffer with data to store the image.
!! \param errcode \fortran_error
!!
SUBROUTINE h5imread_image_f(loc_id,&
dset_name,&
buf,&
@@ -111,11 +105,11 @@ CONTAINS
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: dset_name
INTEGER, INTENT(inout), DIMENSION(*) :: buf
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5imread_image_c(loc_id,namelen,dset_name,buf) &
@@ -123,10 +117,10 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
INTEGER(size_t) :: namelen ! length of name buffer
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer
INTEGER(hid_t), INTENT(in) :: loc_id
INTEGER(size_t) :: namelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name
INTEGER, INTENT(inout), DIMENSION(*) :: buf
END FUNCTION h5imread_image_c
END INTERFACE
@@ -135,42 +129,32 @@ CONTAINS
END SUBROUTINE h5imread_image_f
!-------------------------------------------------------------------------
! Function: h5immake_image_24bit_f
!
! Purpose: Creates and writes an image a 24 bit image
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 05, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
SUBROUTINE h5immake_image_24bit_f(loc_id,&
dset_name,&
width,&
height,&
il,&
buf,&
errcode )
!>
!! \ingroup FH5IM
!!
!! \brief Creates and writes an image a 24 bit image.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param dset_name The name of the dataset to create.
!! \param width The width of the image.
!! \param height The height of the image.
!! \param il String defining the interlace mode.
!! \param buf Buffer with data to be written to the dataset.
!! \param errcode \fortran_error
!!
SUBROUTINE h5immake_image_24bit_f(loc_id, dset_name, width, height, il, buf, errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(in) :: width ! width of image
INTEGER(hsize_t), INTENT(in) :: height ! height of image
CHARACTER(len=*), INTENT(in) :: il ! interlace
INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: dset_name
INTEGER(hsize_t), INTENT(in) :: width
INTEGER(hsize_t), INTENT(in) :: height
CHARACTER(len=*), INTENT(in) :: il
INTEGER, INTENT(in), DIMENSION(*) :: buf
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTERFACE
INTEGER FUNCTION h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) &
@@ -178,14 +162,14 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T, HSIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(in) :: width ! width of image
INTEGER(hsize_t), INTENT(in) :: height ! height of image
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il ! interlace
INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer
INTEGER(size_t) :: namelen ! length of name buffer
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name
INTEGER(hsize_t), INTENT(in) :: width
INTEGER(hsize_t), INTENT(in) :: height
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il
INTEGER, INTENT(in), DIMENSION(*) :: buf
INTEGER(size_t) :: namelen
INTEGER(size_t) :: ILEN
END FUNCTION h5immake_image_24bit_c
END INTERFACE
@@ -196,24 +180,20 @@ CONTAINS
END SUBROUTINE h5immake_image_24bit_f
!-------------------------------------------------------------------------
! Function: h5imget_image_info_f
!
! Purpose: Gets information about an image dataset (dimensions, interlace mode
! and number of associated palettes).
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 05, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Gets information about an image dataset (dimensions, interlace mode and number of associated palettes).
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param dset_name The name of the dataset.
!! \param width The width of the image.
!! \param height The height of the image.
!! \param planes The number of color planes of the image.
!! \param interlace The interlace mode of the image.
!! \param npals The number of palettes associated to the image.
!! \param errcode \fortran_error
!!
SUBROUTINE h5imget_image_info_f(loc_id,&
dset_name,&
width,&
@@ -225,16 +205,16 @@ CONTAINS
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(inout) :: width ! width of image
INTEGER(hsize_t), INTENT(inout) :: height ! height of image
INTEGER(hsize_t), INTENT(inout) :: planes ! color planes
INTEGER(hsize_t), INTENT(inout) :: npals ! palettes
CHARACTER(len=*), INTENT(inout) :: interlace ! interlace
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: dset_name
INTEGER(hsize_t), INTENT(inout) :: width
INTEGER(hsize_t), INTENT(inout) :: height
INTEGER(hsize_t), INTENT(inout) :: planes
INTEGER(hsize_t), INTENT(inout) :: npals
CHARACTER(len=*), INTENT(inout) :: interlace
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTERFACE
INTEGER FUNCTION h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) &
@@ -242,15 +222,15 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T, HSIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(inout) :: width ! width of image
INTEGER(hsize_t), INTENT(inout) :: height ! height of image
INTEGER(hsize_t), INTENT(inout) :: planes ! color planes
INTEGER(hsize_t), INTENT(inout) :: npals ! palettes
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace ! interlace
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name
INTEGER(hsize_t), INTENT(inout) :: width
INTEGER(hsize_t), INTENT(inout) :: height
INTEGER(hsize_t), INTENT(inout) :: planes
INTEGER(hsize_t), INTENT(inout) :: npals
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace
INTEGER(size_t) :: namelen
INTEGER(size_t) :: ILEN
END FUNCTION h5imget_image_info_c
END INTERFACE
@@ -260,32 +240,22 @@ CONTAINS
END SUBROUTINE h5imget_image_info_f
!-------------------------------------------------------------------------
! Function: h5imis_image_f
!
! Purpose: Inquires if a dataset is an image
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 05, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
INTEGER FUNCTION h5imis_image_f(loc_id,&
dset_name)
!>
!! \ingroup FH5IM
!!
!! \brief Inquires if a dataset is an image.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param dset_name The name of the dataset.
!!
INTEGER FUNCTION h5imis_image_f(loc_id, dset_name)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: dset_name
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5imis_image_c(loc_id,namelen,dset_name) &
@@ -293,9 +263,9 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
INTEGER(size_t) :: namelen ! length of name buffer
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hid_t), INTENT(in) :: loc_id
INTEGER(size_t) :: namelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name
END FUNCTION h5imis_image_c
END INTERFACE
@@ -305,339 +275,285 @@ CONTAINS
END FUNCTION h5imis_image_f
!-------------------------------------------------------------------------
! Function: h5immake_palette_f
!
! Purpose: Creates and writes a palette
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 06, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Creates and writes a palette
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param pal_name The name of the palette.
!! \param pal_dims An array of the size of the palette dimensions.
!! \param pal_data Buffer with data to be written to the dataset.
!! \param errcode \fortran_error
!!
SUBROUTINE h5immake_palette_f(loc_id,&
dset_name,&
pal_name,&
pal_dims,&
buf,&
pal_data,&
errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions
INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: pal_name
INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims
INTEGER, INTENT(in), DIMENSION(*) :: pal_data
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) &
INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,pal_name,pal_dims,pal_data) &
BIND(C,NAME='h5immake_palette_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T, HSIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
INTEGER(size_t) :: namelen ! length of name buffer
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions
INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer
INTEGER(hid_t), INTENT(in) :: loc_id
INTEGER(size_t) :: namelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name
INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims
INTEGER, INTENT(in), DIMENSION(*) :: pal_data
END FUNCTION h5immake_palette_c
END INTERFACE
namelen = LEN(dset_name)
errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf)
namelen = LEN(pal_name)
errcode = h5immake_palette_c(loc_id,namelen,pal_name,pal_dims,pal_data)
END SUBROUTINE h5immake_palette_f
!-------------------------------------------------------------------------
! Function: h5imlink_palette_f
!
! Purpose: This function attaches a palette to an existing image dataset
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 06, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief This function attaches a palette to an existing image dataset.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param image_name The name of the dataset to attach the palette to.
!! \param pal_name The name of the palette.
!! \param errcode \fortran_error
!!
SUBROUTINE h5imlink_palette_f(loc_id,&
dset_name,&
image_name,&
pal_name,&
errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
CHARACTER(len=*), INTENT(in) :: pal_name ! palette name
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: image_name
CHARACTER(len=*), INTENT(in) :: pal_name
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTERFACE
INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) &
INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name) &
BIND(C,NAME='h5imlink_palette_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name
INTEGER(size_t) :: namelen
INTEGER(size_t) :: ILEN
END FUNCTION h5imlink_palette_c
END INTERFACE
namelen = LEN(dset_name)
namelen = LEN(image_name)
ILEN = LEN(pal_name)
errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name)
errcode = h5imlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name)
END SUBROUTINE h5imlink_palette_f
!-------------------------------------------------------------------------
! Function: h5imunlink_palette_f
!
! Purpose: This function dettaches a palette to an existing image dataset
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 06, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief This function dettaches a palette to an existing image dataset.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param image_name The name of the image dataset.
!! \param pal_name The name of the palette.
!! \param errcode \fortran_error
SUBROUTINE h5imunlink_palette_f(loc_id,&
dset_name,&
image_name,&
pal_name,&
errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
CHARACTER(len=*), INTENT(in) :: pal_name ! palette name
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: image_name
CHARACTER(len=*), INTENT(in) :: pal_name
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTERFACE
INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) &
INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name) &
BIND(C,NAME='h5imunlink_palette_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: ILEN ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name
INTEGER(size_t) :: namelen
INTEGER(size_t) :: ILEN
END FUNCTION h5imunlink_palette_c
END INTERFACE
namelen = LEN(dset_name)
namelen = LEN(image_name)
ILEN = LEN(pal_name)
errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name)
errcode = h5imunlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name)
END SUBROUTINE h5imunlink_palette_f
!-------------------------------------------------------------------------
! Function: h5imget_npalettes_f
!
! Purpose: Gets the number of palettes associated to an image
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 05, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Gets the number of palettes associated to an image.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param image_name The name of the image dataset.
!! \param npals The number of palettes.
!! \param errcode \fortran_error
!!
SUBROUTINE h5imget_npalettes_f(loc_id,&
dset_name,&
image_name,&
npals,&
errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(inout) :: npals ! palettes
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: image_name
INTEGER(hsize_t), INTENT(inout) :: npals
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,dset_name,npals) &
INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,image_name,npals) &
BIND(C,NAME='h5imget_npalettes_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T, HSIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(inout) :: npals ! palettes
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name
INTEGER(hsize_t), INTENT(inout) :: npals
INTEGER(size_t) :: namelen
END FUNCTION h5imget_npalettes_c
END INTERFACE
namelen = LEN(dset_name)
errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals)
namelen = LEN(image_name)
errcode = h5imget_npalettes_c(loc_id,namelen,image_name,npals)
END SUBROUTINE h5imget_npalettes_f
!-------------------------------------------------------------------------
! Function: h5imget_palette_info_f
!
! Purpose: Get palette information
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 06, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Gets information about a palette dataset (dimensions).
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param image_name The name of the image dataset.
!! \param pal_number The zero based index that identifies the palette.
!! \param pal_dims The dimensions of the palette dataset.
!! \param errcode \fortran_error
!!
SUBROUTINE h5imget_palette_info_f(loc_id,&
dset_name,&
image_name,&
pal_number,&
dims,&
pal_dims,&
errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER, INTENT(in) :: pal_number ! palette number
INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: image_name
INTEGER, INTENT(in) :: pal_number
INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: pal_dims
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) &
INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,image_name,pal_number,pal_dims) &
BIND(C,NAME='h5imget_palette_info_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T, HSIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER, INTENT(in) :: pal_number ! palette number
INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name
INTEGER, INTENT(in) :: pal_number
INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: pal_dims
INTEGER(size_t) :: namelen
END FUNCTION h5imget_palette_info_c
END INTERFACE
namelen = LEN(dset_name)
errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims)
namelen = LEN(image_name)
errcode = h5imget_palette_info_c(loc_id,namelen,image_name,pal_number,pal_dims)
END SUBROUTINE h5imget_palette_info_f
!-------------------------------------------------------------------------
! Function: h5imget_palette_f
!
! Purpose: Reads palette
!
! Return: Success: 0, Failure: -1
!
! Programmer: Pedro Vicente
!
! Date: October 06, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
!>
!! \ingroup FH5IM
!!
!! \brief Gets the palette dataset
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param image_name The name of the image dataset.
!! \param pal_number The zero based index that identifies the palette.
!! \param pal_data The palette dataset.
!! \param errcode \fortran_error
!!
SUBROUTINE h5imget_palette_f(loc_id,&
dset_name,&
image_name,&
pal_number,&
buf,&
pal_data,&
errcode )
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER, INTENT(in) :: pal_number ! palette number
INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: image_name
INTEGER, INTENT(in) :: pal_number
INTEGER, INTENT(inout), DIMENSION(*) :: pal_data
INTEGER :: errcode
INTEGER(size_t) :: namelen ! length of name buffer
INTERFACE
INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) &
INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,image_name,pal_number,pal_data) &
BIND(C,NAME='h5imget_palette_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
INTEGER(size_t) :: namelen ! length of name buffer
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER, INTENT(in) :: pal_number ! palette number
INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer
INTEGER(hid_t), INTENT(in) :: loc_id
INTEGER(size_t) :: namelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name
INTEGER, INTENT(in) :: pal_number
INTEGER, INTENT(inout), DIMENSION(*) :: pal_data
END FUNCTION h5imget_palette_c
END INTERFACE
namelen = LEN(dset_name)
errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf)
namelen = LEN(image_name)
errcode = h5imget_palette_c(loc_id,namelen,image_name,pal_number,pal_data)
END SUBROUTINE h5imget_palette_f
!-------------------------------------------------------------------------
! Function: h5imis_palette_f
!
! Purpose: Inquires if a dataset is a palette
!
! Return: true, false, fail
!
! Programmer: Pedro Vicente
!
! Date: October 06, 2004
!
! Comments:
!
! Modifications:
!
!-------------------------------------------------------------------------
INTEGER FUNCTION h5imis_palette_f(loc_id,&
dset_name)
!>
!! \ingroup FH5IM
!!
!! \brief Inquires if a dataset is a palette. Returns zero (false), a positive (true) or a negative (failure) value.
!!
!! \param loc_id Location identifier. The identifier may be that of a file or group.
!! \param dset_name The name of the dataset.
!!
INTEGER FUNCTION h5imis_palette_f(loc_id, dset_name)
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER :: errcode ! error code
INTEGER(size_t) :: namelen ! name length
INTEGER(hid_t), INTENT(in) :: loc_id
CHARACTER(len=*), INTENT(in) :: dset_name
INTEGER :: errcode
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5imis_palette_c(loc_id,namelen,dset_name) &
@@ -645,9 +561,9 @@ CONTAINS
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
INTEGER(size_t) :: namelen ! length of name buffer
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hid_t), INTENT(in) :: loc_id
INTEGER(size_t) :: namelen
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name
END FUNCTION h5imis_palette_c
END INTERFACE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff