Skip to content

Commit 4ce674e

Browse files
committed
added interface of get_all_open_keys
1 parent e911a70 commit 4ce674e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/stdlib_hashmaps.f90

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ end function total_chaining_depth
586586
integer(int_index), allocatable :: slots(:)
587587
!! Array of indices to the inverse Note # slots=size(slots)
588588
contains
589+
procedure :: get_all_keys => get_all_open_keys
589590
procedure :: get_other_data => get_other_open_data
590591
procedure :: init => init_open_map
591592
procedure :: loading => open_loading
@@ -611,6 +612,19 @@ module subroutine free_open_map( map )
611612
end subroutine free_open_map
612613

613614

615+
module subroutine get_all_open_keys(map, all_keys)
616+
!! Version: Experimental
617+
!!
618+
!! Returns all the keys presented in a hashmap
619+
!! Arguments:
620+
!! map - an open hash map
621+
!! all_keys - all the keys presented in a hash map
622+
!
623+
class(open_hashmap_type), intent(in) :: map
624+
type(key_type), allocatable, intent(out) :: all_keys(:)
625+
end subroutine get_all_open_keys
626+
627+
614628
module subroutine get_other_open_data( map, key, other, exists )
615629
!! Version: Experimental
616630
!!

0 commit comments

Comments
 (0)