base_util_reset_storage Subroutine

public subroutine base_util_reset_storage(self)

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 Bound

base_storage

Arguments

Type IntentOptional Attributes Name
class(base_storage), intent(inout) :: self

Called by

proc~~base_util_reset_storage~~CalledByGraph proc~base_util_reset_storage base_storage%base_util_reset_storage proc~base_util_dealloc_storage base_storage%base_util_dealloc_storage proc~base_util_dealloc_storage->proc~base_util_reset_storage proc~base_final_storage base_final_storage proc~base_final_storage->proc~base_util_dealloc_storage

Source Code

      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