ESMF_DELayoutDeserialize Function

public function ESMF_DELayoutDeserialize(buffer, offset, rc)

Arguments

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

Return Value type(ESMF_DELayout)


Source Code

  function ESMF_DELayoutDeserialize(buffer, offset, rc) 
!
! !RETURN VALUE:
    type(ESMF_DELayout) :: ESMF_DELayoutDeserialize   
!
! !ARGUMENTS:
    character, pointer               :: buffer(:)
    integer,   intent(inout)         :: offset
    integer,   intent(out), optional :: rc 
!
! !DESCRIPTION:
!      Takes a byte-stream buffer and reads the information needed to
!      recreate a DELayout object.  Recursively calls the deserialize routines
!      needed to recreate the subobjects.
!      Expected to be used by {\tt ESMF\_StateReconcile()} and
!      by {\tt ESMF\_DELayoutWrite()} and {\tt ESMF\_DELayoutRead()}.
!
!     The arguments are:
!     \begin{description}
!     \item [buffer]
!           Data buffer which holds the serialized information.
!     \item [offset]
!           Current read offset in the current buffer.  This will be
!           updated by this routine and return pointing to the next
!           unread byte in the buffer.
!     \item [{[rc]}]
!           Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Call into the C++ interface.
    call c_ESMC_DELayoutDeserialize(ESMF_DELayoutDeserialize%this, buffer, &
      offset, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
      
    ! Set init code
    ESMF_INIT_SET_CREATED(ESMF_DELayoutDeserialize)

    ! Return success
    if (present(rc)) rc = ESMF_SUCCESS
    
  end function ESMF_DELayoutDeserialize