StringVector_serialize Subroutine

public subroutine StringVector_serialize(strVec, buffer)

Arguments

Type IntentOptional Attributes Name
type(StringVector), intent(in) :: strVec
integer, intent(inout), allocatable :: buffer(:)

Calls

proc~~stringvector_serialize~~CallsGraph proc~stringvector_serialize pFIO_StringVectorUtilMod::StringVector_serialize begin begin proc~stringvector_serialize->begin get get proc~stringvector_serialize->get interface~serialize_buffer_length pFIO_UtilitiesMod::serialize_buffer_length proc~stringvector_serialize->interface~serialize_buffer_length interface~serialize_intrinsic pFIO_UtilitiesMod::serialize_intrinsic proc~stringvector_serialize->interface~serialize_intrinsic next next proc~stringvector_serialize->next

Called by

proc~~stringvector_serialize~~CalledByGraph proc~stringvector_serialize pFIO_StringVectorUtilMod::StringVector_serialize none~serialize~2 pFIO_FileMetadataMod::FileMetadata%serialize none~serialize~2->proc~stringvector_serialize none~serialize~3 pFIO_VariableMod::Variable%serialize none~serialize~2->none~serialize~3 proc~stringvariablemap_serialize pFIO_StringVariableMapUtilMod::StringVariableMap_serialize none~serialize~2->proc~stringvariablemap_serialize none~serialize~3->proc~stringvector_serialize none~serialize~5 pFIO_CoordinateVariableMod::CoordinateVariable%serialize none~serialize~5->none~serialize~3 proc~historycollectionvector_serialize pFIO_HistoryCollectionVectorUtilMod::HistoryCollectionVector_serialize proc~historycollectionvector_serialize->none~serialize~2 proc~stringvariablemap_serialize->none~serialize~3 proc~test_serialize~2 Test_Variable::test_serialize proc~test_serialize~2->none~serialize~3 proc~test_serialize~5 Test_FileMetadata::test_serialize proc~test_serialize~5->none~serialize~2 proc~stringvariablemap_get_length pFIO_StringVariableMapUtilMod::StringVariableMap_get_length proc~stringvariablemap_get_length->proc~stringvariablemap_serialize proc~test_serialize~4 Test_CoordinateVariable::test_serialize proc~test_serialize~4->none~serialize~5

Source Code

   subroutine StringVector_serialize(strVec,buffer)
       type (StringVector) ,intent(in):: strVec
       integer, allocatable,intent(inout) :: buffer(:)
       type (StringVectorIterator) :: iter
       character(len=:),pointer :: str
       integer :: length
      
       if (allocated(buffer)) deallocate(buffer)
       allocate(buffer(0))
       iter = strVec%begin()
       do while (iter /= strVec%end())
          str => iter%get()
          buffer=[buffer,serialize_intrinsic(str)]
          call iter%next()
       enddo
       length = serialize_buffer_length(length) + size(buffer)
       buffer = [serialize_intrinsic(length),buffer]
    end subroutine StringVector_serialize