Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_VMId), | intent(in) | :: | vmId1 | |||
type(ESMF_VMId), | intent(in) | :: | vmId2 | |||
logical, | intent(in), | optional | :: | keyOnly | ||
logical, | intent(in), | optional | :: | keySuper | ||
integer, | intent(out), | optional | :: | rc |
function ESMF_VMIdCompare(vmId1, vmId2, keyOnly, keySuper, rc) ! ! !RETURN VALUE: logical :: ESMF_VMIdCompare ! ! !ARGUMENTS: type(ESMF_VMId), intent(in) :: vmId1 type(ESMF_VMId), intent(in) :: vmId2 logical, intent(in), optional :: keyOnly logical, intent(in), optional :: keySuper integer, intent(out), optional :: rc ! ! !DESCRIPTION: ! Compare two ESMF_VMId objects. ! ! The arguments are: ! \begin{description} ! \item[vmId1] ! ESMF_VMId object 1 ! \item[vmId2] ! ESMF_VMId object 2 ! \item[{[keyOnly]}] ! For {\tt .true.} only compare the vmKey parts. Default is ! {\tt .false.}. ! \item[{[keySuper]}] ! Only considered when {\tt keyOnly=.true.}!!! ! For {\tt .true.} return {\tt .true.} for {\tt vmId1} keys whose active ! bits are a superset (not necessarily strict) of bits active in ! {\tt vmId2}. Return {\tt .false.} otherwise. ! Default is {\tt .false.}, i.e. an exact key match is needed to return ! {\tt .true.}. ! \item[{[rc]}] ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors. ! \end{description} ! !EOPI !------------------------------------------------------------------------------ integer :: localrc ! local return code type(ESMF_Logical) :: tf, keyOnlyOpt, keySuperOpt ! initialize return code; assume routine not implemented localrc = ESMF_RC_NOT_IMPL if (present(rc)) rc = ESMF_RC_NOT_IMPL keyOnlyOpt = ESMF_FALSE if (present(keyOnly)) then if (keyOnly) keyOnlyOpt = ESMF_TRUE endif keySuperOpt = ESMF_FALSE if (present(keySuper)) then if (keySuper) keySuperOpt = ESMF_TRUE endif ! Call into the C++ interface call c_ESMC_VMIdCompare(vmId1, vmId2, keyOnlyOpt, keySuperOpt, tf, localrc) ESMF_VMIdCompare = tf == ESMF_TRUE if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & ESMF_CONTEXT, rcToReturn=rc)) return ! return successfully if (present(rc)) rc = ESMF_SUCCESS end function ESMF_VMIdCompare