Resets the storage object back to its original state by removing all of the saved items from the storage frames, but
does not deallocate the frames
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_storage), | intent(inout) | :: | self |
subroutine base_util_reset_storage(self)
!! author: David A. Minton
!!
!! Resets the storage object back to its original state by removing all of the saved items from the storage frames, but
!! does not deallocate the frames
implicit none
! Arguments
class(base_storage), intent(inout) :: self
! Internals
integer(I4B) :: i
if (allocated(self%frame)) then
do i = 1, self%nframes
if (allocated(self%frame(i)%item)) deallocate(self%frame(i)%item)
end do
end if
if (allocated(self%idmap)) deallocate(self%idmap)
if (allocated(self%idvals)) deallocate(self%idvals)
if (allocated(self%tmap)) deallocate(self%tmap)
if (allocated(self%tvals)) deallocate(self%tvals)
self%nid = 0
self%nt = 0
self%iframe = 0
return
end subroutine base_util_reset_storage