UnlimitedEntity_deserialize Subroutine

public subroutine UnlimitedEntity_deserialize(buffer, this, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: buffer(:)
type(UnlimitedEntity), intent(inout) :: this
integer, intent(out), optional :: rc

Calls

proc~~unlimitedentity_deserialize~~CallsGraph proc~unlimitedentity_deserialize UnlimitedEntity_deserialize interface~deserialize_intrinsic deserialize_intrinsic proc~unlimitedentity_deserialize->interface~deserialize_intrinsic interface~mapl_assert MAPL_Assert proc~unlimitedentity_deserialize->interface~mapl_assert interface~serialize_buffer_length serialize_buffer_length proc~unlimitedentity_deserialize->interface~serialize_buffer_length none~get_rank UnlimitedEntity%get_rank proc~unlimitedentity_deserialize->none~get_rank none~set~63 UnlimitedEntity%set proc~unlimitedentity_deserialize->none~set~63 proc~mapl_return MAPL_Return proc~unlimitedentity_deserialize->proc~mapl_return proc~mapl_verify MAPL_Verify proc~unlimitedentity_deserialize->proc~mapl_verify none~get_rank->proc~mapl_return none~get_shape UnlimitedEntity%get_shape none~get_rank->none~get_shape none~set~63->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception none~get_shape->proc~mapl_return

Called by

proc~~unlimitedentity_deserialize~~CalledByGraph proc~unlimitedentity_deserialize UnlimitedEntity_deserialize proc~attribute_deserialize Attribute_deserialize proc~attribute_deserialize->proc~unlimitedentity_deserialize proc~stringunlimitedentitymap_deserialize StringUnlimitedEntityMap_deserialize proc~stringunlimitedentitymap_deserialize->proc~unlimitedentity_deserialize proc~test_serialize~6 test_serialize proc~test_serialize~6->proc~unlimitedentity_deserialize proc~variable_deserialize Variable_deserialize proc~variable_deserialize->proc~unlimitedentity_deserialize proc~stringattributemap_deserialize StringAttributeMap_deserialize proc~variable_deserialize->proc~stringattributemap_deserialize proc~coordinatevariable_deserialize CoordinateVariable_deserialize proc~coordinatevariable_deserialize->proc~variable_deserialize proc~filemetadata_deserialize FileMetadata_deserialize proc~filemetadata_deserialize->proc~variable_deserialize proc~stringvariablemap_deserialize StringVariableMap_deserialize proc~filemetadata_deserialize->proc~stringvariablemap_deserialize proc~stringattributemap_deserialize->proc~attribute_deserialize proc~stringvariablemap_deserialize->proc~variable_deserialize proc~stringvariablemap_deserialize->proc~coordinatevariable_deserialize proc~test_serialize test_serialize proc~test_serialize->proc~variable_deserialize proc~test_serialize~4 test_serialize proc~test_serialize~4->proc~attribute_deserialize proc~historycollectionvector_deserialize HistoryCollectionVector_deserialize proc~historycollectionvector_deserialize->proc~filemetadata_deserialize proc~test_serialize~2 test_serialize proc~test_serialize~2->proc~coordinatevariable_deserialize proc~test_serialize~5 test_serialize proc~test_serialize~5->proc~filemetadata_deserialize program~main~16 main program~main~16->proc~stringattributemap_deserialize

Source Code

   subroutine UnlimitedEntity_deserialize( buffer,this, rc)
      integer, intent(in) :: buffer(:)
      type (UnlimitedEntity),intent(inout) :: this
      integer, optional, intent(out) :: rc
      integer :: status
      this = UnlimitedEntity() 
      call deserialize(this, buffer, rc=status)
      _VERIFY(status)
      _RETURN(_SUCCESS)
   contains

      subroutine deserialize( this, buffer, rc)
         class (UnlimitedEntity), target,intent(inout) :: this
         integer, intent(in) :: buffer(:)
         integer, optional, intent(out) :: rc
   
         integer :: n,type_kind,length
   
         integer(KIND=INT32) :: value_int32
         integer(KIND=INT64) :: value_int64
         real(KIND=REAL32)   :: value_real32
         real(KIND=REAL64)   :: value_real64
         logical :: value_logical
   
         integer(KIND=INT32), allocatable :: values_int32(:)
         integer(KIND=INT64), allocatable :: values_int64(:)
         real(KIND=REAL32), allocatable :: values_real32(:)
         real(KIND=REAL64), allocatable :: values_real64(:)
         logical, allocatable :: values_logical(:)
   
         character(len=:), allocatable :: value_char
         integer :: rank
   
         n = 1
         call deserialize_intrinsic(buffer(n:),length)
         _ASSERT(length == size(buffer),'length does not match')
   
         n = n + serialize_buffer_length(length)
         call deserialize_intrinsic(buffer(n:),this%shape)
         n = n + serialize_buffer_length(this%shape)
         call deserialize_intrinsic(buffer(n:),type_kind)
         n = n + serialize_buffer_length(type_kind)
   
         rank = this%get_rank()
         select case (rank)
         case (0)
            select case (type_kind)
            case (pFIO_INT32)
                call deserialize_intrinsic(buffer(n:),value_int32)
                call this%set(value_int32)
            case (pFIO_INT64)
                call deserialize_intrinsic(buffer(n:),value_int64)
                call this%set(value_int64)
            case (pFIO_REAL32)
                call deserialize_intrinsic(buffer(n:),value_real32)
                call this%set(value_real32)
            case (pFIO_REAL64)
                call deserialize_intrinsic(buffer(n:),value_real64)
                call this%set(value_real64)
            case (pFIO_LOGICAL)
                call deserialize_intrinsic(buffer(n:),value_logical)
                call this%set(value_logical)
            case (pFIO_STRING)
                call deserialize_intrinsic(buffer(n:),value_char)
                call this%set(value_char)
            case (pFIO_UNSUPPORTED_TYPE)
                ! this is uninitialized case, make sure shape is not allocated even it is empty
                 if (allocated(this%shape))deallocate(this%shape)
            case default
              _FAIL( "UnlimitedEntity deserialize not support")
            end select
         case (1:)
            select case (type_kind)
            case (pFIO_INT32)
                call deserialize_intrinsic(buffer(n:),values_int32)
                allocate(this%values, source =values_int32)
            case (pFIO_INT64)
                call deserialize_intrinsic(buffer(n:),values_int64)
                allocate(this%values, source =values_int64)
            case (pFIO_REAL32)
                call deserialize_intrinsic(buffer(n:),values_real32)
                allocate(this%values, source =values_real32)
            case (pFIO_REAL64)
                call deserialize_intrinsic(buffer(n:),values_real64)
                allocate(this%values, source =values_real64)
            case (pFIO_LOGICAL)
                call deserialize_intrinsic(buffer(n:),values_logical)
                allocate(this%values, source =values_logical)
            case default
              _FAIL( "UnlimitedEntity deserialize not support")
            end select
   
         end select
         _RETURN(_SUCCESS)
      end subroutine deserialize
   end subroutine UnlimitedEntity_deserialize