CoordinateVariable_deserialize Subroutine

public subroutine CoordinateVariable_deserialize(buffer, cv, rc)

Arguments

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

Calls

proc~~coordinatevariable_deserialize~~CallsGraph proc~coordinatevariable_deserialize CoordinateVariable_deserialize interface~deserialize_intrinsic deserialize_intrinsic proc~coordinatevariable_deserialize->interface~deserialize_intrinsic interface~mapl_assert MAPL_Assert proc~coordinatevariable_deserialize->interface~mapl_assert interface~serialize_buffer_length serialize_buffer_length proc~coordinatevariable_deserialize->interface~serialize_buffer_length proc~mapl_return MAPL_Return proc~coordinatevariable_deserialize->proc~mapl_return proc~mapl_verify MAPL_Verify proc~coordinatevariable_deserialize->proc~mapl_verify proc~variable_deserialize Variable_deserialize proc~coordinatevariable_deserialize->proc~variable_deserialize 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 proc~variable_deserialize->interface~deserialize_intrinsic proc~variable_deserialize->interface~mapl_assert proc~variable_deserialize->interface~serialize_buffer_length proc~variable_deserialize->proc~mapl_return proc~variable_deserialize->proc~mapl_verify proc~stringattributemap_deserialize StringAttributeMap_deserialize proc~variable_deserialize->proc~stringattributemap_deserialize proc~stringvector_deserialize StringVector_deserialize proc~variable_deserialize->proc~stringvector_deserialize proc~unlimitedentity_deserialize UnlimitedEntity_deserialize proc~variable_deserialize->proc~unlimitedentity_deserialize proc~stringattributemap_deserialize->interface~deserialize_intrinsic proc~stringattributemap_deserialize->interface~mapl_assert proc~stringattributemap_deserialize->interface~serialize_buffer_length proc~stringattributemap_deserialize->proc~mapl_return proc~stringattributemap_deserialize->proc~mapl_verify none~insert~170 StringAttributeMap%insert proc~stringattributemap_deserialize->none~insert~170 proc~attribute_deserialize Attribute_deserialize proc~stringattributemap_deserialize->proc~attribute_deserialize proc~stringvector_deserialize->interface~deserialize_intrinsic proc~stringvector_deserialize->interface~serialize_buffer_length proc~stringvector_deserialize->proc~mapl_return push_back push_back proc~stringvector_deserialize->push_back stringvector stringvector proc~stringvector_deserialize->stringvector proc~unlimitedentity_deserialize->interface~deserialize_intrinsic proc~unlimitedentity_deserialize->interface~mapl_assert proc~unlimitedentity_deserialize->interface~serialize_buffer_length proc~unlimitedentity_deserialize->proc~mapl_return proc~unlimitedentity_deserialize->proc~mapl_verify none~get_rank UnlimitedEntity%get_rank proc~unlimitedentity_deserialize->none~get_rank none~set~93 UnlimitedEntity%set proc~unlimitedentity_deserialize->none~set~93 none~get_rank->proc~mapl_return none~get_shape UnlimitedEntity%get_shape none~get_rank->none~get_shape none~insert_pair~18 StringAttributeMap%insert_pair none~insert~170->none~insert_pair~18 none~set~93->proc~mapl_return proc~attribute_deserialize->proc~mapl_return proc~attribute_deserialize->proc~mapl_verify proc~attribute_deserialize->proc~unlimitedentity_deserialize

Called by

proc~~coordinatevariable_deserialize~~CalledByGraph proc~coordinatevariable_deserialize CoordinateVariable_deserialize proc~stringvariablemap_deserialize StringVariableMap_deserialize proc~stringvariablemap_deserialize->proc~coordinatevariable_deserialize proc~test_serialize~6 test_serialize proc~test_serialize~6->proc~coordinatevariable_deserialize proc~filemetadata_deserialize FileMetadata_deserialize proc~filemetadata_deserialize->proc~stringvariablemap_deserialize proc~historycollectionvector_deserialize HistoryCollectionVector_deserialize proc~historycollectionvector_deserialize->proc~filemetadata_deserialize proc~test_serialize~4 test_serialize proc~test_serialize~4->proc~filemetadata_deserialize

Source Code

   subroutine CoordinateVariable_deserialize(buffer, cv, rc)
      integer, intent(in) :: buffer(:)
      type (CoordinateVariable), intent(inout) :: cv
      integer, optional, intent(out) :: rc
      integer :: status

      call deserialize(cv, buffer, rc=status)
      _VERIFY(status)
      _RETURN(_SUCCESS)

   contains  
      
      subroutine deserialize(this, buffer, rc)
         class (CoordinateVariable), intent(inout) :: this
         integer,intent(in) :: buffer(:)
         integer, optional, intent(out) :: rc

         integer :: n,length,type_kind, v_type
         integer :: status

         integer(KIND=INT32), allocatable :: values_int32(:)
         real(KIND=REAL32),   allocatable :: values_real32(:)
         integer(KIND=INT64), allocatable :: values_int64(:)
         real(KIND=REAL64),   allocatable :: values_real64(:)


         n = 1
         call deserialize_intrinsic(buffer(n:),length)
         _ASSERT(length == size(buffer), "size not match")

         length = serialize_buffer_length(length)
         n = n + length
         call deserialize_intrinsic(buffer(n:),v_type)
         length = serialize_buffer_length(v_type)
         n = n+length
         call deserialize_intrinsic(buffer(n:),length)
         call Variable_deserialize(buffer(n:n+length-1),this%variable, status)
         _VERIFY(status)
         n = n + length
         call deserialize_intrinsic(buffer(n:),type_kind)
         length = serialize_buffer_length(type_kind)
         n = n + length
         if(allocated(this%coordinate_data)) deallocate(this%coordinate_data)
         select case (type_kind)
         case (pFIO_INT32)
            call deserialize_intrinsic(buffer(n:),values_int32)
            allocate(this%coordinate_data, source = values_int32) 
         case (pFIO_INT64)
            call deserialize_intrinsic(buffer(n:),values_int64)
            allocate(this%coordinate_data, source = values_int64) 
         case (pFIO_REAL32)
            call deserialize_intrinsic(buffer(n:),values_REAL32)
            allocate(this%coordinate_data, source = values_real32) 
         case (pFIO_REAL64)
            call deserialize_intrinsic(buffer(n:),values_REAL64)
            allocate(this%coordinate_data, source = values_real64)
         case default
            _FAIL( "not supportted type")
         end select
         _RETURN(_SUCCESS)
      end subroutine deserialize
   end subroutine CoordinateVariable_deserialize