Skip to content

Commit 7396f0f

Browse files
committed
added interface of get_all_chaining_keys
1 parent 5871049 commit 7396f0f

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
@@ -335,6 +335,7 @@ end function total_depth
335335
type(chaining_map_entry_ptr), allocatable :: slots(:)
336336
!! Array of bucket lists Note # slots=size(slots)
337337
contains
338+
procedure :: get_all_keys => get_all_chaining_keys
338339
procedure :: get_other_data => get_other_chaining_data
339340
procedure :: init => init_chaining_map
340341
procedure :: loading => chaining_loading
@@ -361,6 +362,19 @@ module subroutine free_chaining_map( map )
361362
end subroutine free_chaining_map
362363

363364

365+
module subroutine get_all_chaining_keys(map, all_keys)
366+
!! Version: Experimental
367+
!!
368+
!! Returns all the keys presented in a hashmap
369+
!! Arguments:
370+
!! map - an chaining hash map
371+
!! all_keys - all the keys presented in a hash map
372+
!
373+
class(chaining_hashmap_type), intent(in) :: map
374+
type(key_type), allocatable, intent(out) :: all_keys(:)
375+
end subroutine get_all_chaining_keys
376+
377+
364378
module subroutine get_other_chaining_data( map, key, other, exists )
365379
!! Version: Experimental
366380
!!

0 commit comments

Comments
 (0)