Skip to content

Commit 931cad8

Browse files
committed
added a is_hash_enabled function
1 parent 7ae16d8 commit 931cad8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/json_file_module.F90

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ module json_file_module
254254
! hash table functions:
255255
procedure,public :: initialize_hash
256256
procedure,public :: destroy_hash
257+
procedure,public :: is_hash_enabled
257258

258259
! ***************************************************
259260
! operators
@@ -3291,6 +3292,20 @@ subroutine initialize_hash(me, status_ok, initial_capacity)
32913292
end subroutine initialize_hash
32923293
!*****************************************************************************************
32933294

3295+
!*****************************************************************************************
3296+
!>
3297+
! Check if the hash table is enabled.
3298+
3299+
pure function is_hash_enabled(me) result(enabled)
3300+
3301+
class(json_file),intent(in) :: me
3302+
logical(LK) :: enabled
3303+
3304+
enabled = me%hash_enabled
3305+
3306+
end function is_hash_enabled
3307+
!*****************************************************************************************
3308+
32943309
!*****************************************************************************************
32953310
!>
32963311
! Destroy the hash table if it exists.

0 commit comments

Comments
 (0)