Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_Info), | intent(in) | :: | info | |||
character(len=*), | intent(in) | :: | key | |||
type(ESMF_KeywordEnforcer), | optional | :: | keywordEnforcer | |||
type(ESMF_AttNest_Flag), | intent(in), | optional | :: | attnestflag | ||
integer, | intent(out), | optional | :: | rc |
function ESMF_InfoGetTK(info, key, keywordEnforcer, attnestflag, rc) result(typekind) ! !ARGUMENTS: type(ESMF_Info), intent(in) :: info character(len=*), intent(in) :: key type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below type(ESMF_AttNest_Flag), intent(in), optional :: attnestflag integer, intent(out), optional :: rc ! !RETURN VALUE: type(ESMF_TypeKind_Flag) :: typekind ! ! !DESCRIPTION: ! Return the ESMF TypeKind of the value associated with \textit{key}. ! See section \ref{const:typekind} for valid return values. ! ! The arguments are: ! \begin{description} ! \item [info] ! Target \texttt{ESMF\_Info} object. ! \item [key] ! String key to access in \texttt{ESMF\_Info} storage. See section \ref{info_key_format} ! for an overview of the key format. ! \item [{[attnestflag]}] ! Setting to \texttt{ESMF\_ATTNEST\_ON} triggers a recursive search for ! \textit{keyParent}. The first instance of the key will be found in the ! hierarchy. Default is \texttt{ESMF\_ATTNEST\_OFF}. ! \item [{[rc]}] ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors. ! \end{description} !EOP integer :: localrc integer(C_INT) :: local_typekind integer(C_INT) :: recursive localrc = ESMF_FAILURE if (present(rc)) rc = ESMF_FAILURE recursive = 0 !false local_typekind = 0 if (present(attnestflag)) then if (attnestflag%value==ESMF_ATTNEST_ON%value) recursive = 1 !true end if call c_info_get_tk(info%ptr, trim(key)//C_NULL_CHAR, local_typekind, & localrc, recursive) if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=rc)) return typekind = ESMF_TypeKind_Flag(local_typekind) if (present(rc)) rc = ESMF_SUCCESS end function ESMF_InfoGetTK