Page tree

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

 

JAVA

FORTRAN

C++

C

 

Link

H5O_TOKEN_CMP

Compares two VOL connector object tokens

Procedure:

H5O_TOKEN_CMP ( loc_id, token1, token2, cmp_value )

Signature:

herr_t H5Otoken_cmp ( hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2, int *cmp_value )

  SUBROUTINE h5otoken_cmp_f(loc_id, token1, token2, cmp_value, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T)  , INTENT(IN)  :: loc_id
    TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 ! First token
    TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 ! First token
    INTEGER         , INTENT(OUT) :: cmp_value
    INTEGER         , INTENT(OUT) :: hdferr

Parameters:
hid_t loc_idIN: Location identifier of object
const H5O_token_t *token1IN: First object token
const H5O_token_t *token2IN: Second object token
int *cmp_valueOUT: Comparison value

Description:

H5O_TOKEN_CMP compares two VOL connector object tokens, token1 and token2 for the file or group identifier specified by loc_id.  Both object tokens must be from the same VOL connector class.

H5O_token_t is defined in H5public.h as follows:

src / H5public.h [337:341]  hdf5_1_12  HDFFV/hdf5
/* Type for object tokens */
/* (Hoisted here, since it's used by both the H5Lpublic.h and H5Opublic.h headers) */
typedef struct H5O_token_t {
    uint8_t __data[H5O_MAX_TOKEN_SIZE];
} H5O_token_t;

A comparison value, cmp_value, is returned, which indicates the result of the comparison:

cmp_valueResult
> 0token1 > token2
< 0

token1 < token2

0

token1 = token2

Returns:

On success, it returns a non-negative.

On failure it returns a negative.

Example:

test / links.c [631:639]  hdf5_1_12  HDFFV/hdf5
    /* Hard link */
    if(H5Oget_info_by_name3(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
    if(H5Oget_info_by_name3(file, "grp1/hard", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
    if(H5O_TYPE_DATASET != oinfo2.type) {
        H5_FAILED();
        HDprintf("    %d: Unexpected object type should have been a dataset\n", __LINE__);
        TEST_ERROR
    } /* end if */
    if(H5Otoken_cmp(file, &oinfo1.token, &oinfo2.token, &token_cmp) < 0) FAIL_STACK_ERROR

fortran / test / tH5O_F03.F90 [91:91]  1.12/master  HDFFV/hdf5
       CALL H5Otoken_cmp_f(loc_id, oinfo_f%token, token_c, cmp_value, ierr);

History:
ReleaseChange
1.12.0Function introduced in this release.

--- Last Modified: March 17, 2020 | 12:47 PM