Skip to content

Commit 5871049

Browse files
committed
added deferred procedure & abstract interface
1 parent df1e2f0 commit 5871049

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/stdlib_hashmaps.f90

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ module stdlib_hashmaps
9494
procedure, non_overridable, pass(map) :: map_probes
9595
procedure, non_overridable, pass(map) :: num_slots
9696
procedure, non_overridable, pass(map) :: slots_bits
97+
procedure(get_all_keys), deferred, pass(map) :: get_all_keys
9798
procedure(get_other), deferred, pass(map) :: get_other_data
9899
procedure(init_map), deferred, pass(map) :: init
99100
procedure(key_test), deferred, pass(map) :: key_test
@@ -109,6 +110,21 @@ module stdlib_hashmaps
109110

110111
abstract interface
111112

113+
subroutine get_all_keys(map, all_keys)
114+
!! Version: Experimental
115+
!!
116+
!! Returns the all keys presented in a hash map
117+
!! ([Specifications](../page/specs/stdlib_hashmaps.html#get_all_keys-returns-all-the-keys-presented-in-a-map))
118+
!!
119+
!! Arguments:
120+
!! map - a hash map
121+
!! all_keys - all the keys presented in a hash map
122+
!
123+
import hashmap_type, key_type
124+
class(hashmap_type), intent(in) :: map
125+
type(key_type), allocatable, intent(out) :: all_keys(:)
126+
end subroutine get_all_keys
127+
112128
subroutine get_other( map, key, other, exists )
113129
!! Version: Experimental
114130
!!

0 commit comments

Comments
 (0)