Return a node's content in the hash table by cloning.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hash_table), | intent(in) | :: | self | The hash table. |
||
class(*), | intent(in) | :: | key | The key. |
||
class(*), | intent(out), | allocatable | :: | content | Content of the queried node. |
subroutine get_clone(self, key, content)
!---------------------------------------------------------------------------------------------------------------------------------
!< Return a node's content in the hash table by cloning.
!---------------------------------------------------------------------------------------------------------------------------------
class(hash_table), intent(in) :: self !< The hash table.
class(*), intent(in) :: key !< The key.
class(*), allocatable, intent(out) :: content !< Content of the queried node.
integer(I4P) :: b !< Bucket index.
integer(I4P) :: i !< Image index.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
if (self%is_initialized_) then
call self%get_bucket_image_indexes(key=key, bucket=b, image=i)
if (b>0) then
#ifdef CAF
call dictionary_get_clone(self%bucket(b)[i], key=key, content=content)
! call self%bucket(b)[i]%get_clone(key=key, content=content)
#else
call self%bucket(b)%get_clone(key=key, content=content)
#endif
endif
endif
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine get_clone