attpack_getPayload Function

private function attpack_getPayload(self, rc) result(payload)

Type Bound

ESMF_AttPack

Arguments

Type IntentOptional Attributes Name
class(ESMF_AttPack), intent(in) :: self
integer, intent(out), optional :: rc

Return Value type(ESMF_Info)


Source Code

function attpack_getPayload(self, rc) result(payload)
  ! Get a handle to the Info object associated with this attribute package
  class(ESMF_AttPack), intent(in) :: self
  integer, intent(out), optional :: rc
  type(ESMF_Info) :: payload
  integer :: localrc

  if (present(rc)) rc = ESMF_RC_NOT_IMPL
  localrc = ESMF_FAILURE
  if (.not. c_associated(self%info)) then
    if (ESMF_LogFoundError(ESMF_RC_ARG_BAD, msg="ptr may not be null", ESMF_CONTEXT, rcToReturn=rc)) return
  end if
  payload%ptr = self%info
  if (present(rc)) rc = ESMF_SUCCESS
end function attpack_getPayload