ESMF_BaseDeserializeWoGarbage Function

public function ESMF_BaseDeserializeWoGarbage(buffer, offset, attreconflag, rc)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: buffer(:)
integer, intent(inout) :: offset
type(ESMF_AttReconcileFlag), intent(in) :: attreconflag
integer, intent(out), optional :: rc

Return Value type(ESMF_Base)


Source Code

  function ESMF_BaseDeserializeWoGarbage (buffer, offset, attreconflag, rc) 
!
! !RETURN VALUE:
    type(ESMF_Base) :: ESMF_BaseDeserializeWoGarbage
!
! !ARGUMENTS:
    character,       intent(in)    :: buffer(:)
    integer,         intent(inout) :: offset
    type(ESMF_AttReconcileFlag), intent(in) :: attreconflag
    integer,         intent(out), optional  :: rc
!
! !DESCRIPTION:
!      Recreates a {\tt ESMF\_Base} object from a serialized byte stream.
!      Expected to be used by {\tt ESMF\_StateReconcile()}.
!
!     The arguments are:
!     \begin{description}
!     \item [buffer]
!           Data buffer of serialized information.
!     \item [offset]
!           Current read offset in the current buffer.  This will be
!           updated by this routine and return pointing to the next
!           available byte in the buffer.
!     \item[attreconflag]
!           Flag to tell if Attribute deserialization is to be done
!     \item [rc]
!           Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
    integer :: localrc

    ! Initialize
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    call c_ESMC_BaseDeserializeWoGarbage(ESMF_BaseDeserializeWoGarbage,  &
        buffer, offset, &
        attreconflag, localrc)
    if (ESMF_LogFoundError(localrc, &
        msg="Top level Base Deserialize", &
        ESMF_CONTEXT,  &
        rcToReturn=rc)) return

    ! Return successfully
    if (present (rc)) rc = ESMF_SUCCESS

  end function ESMF_BaseDeserializeWoGarbage