Return a pointer to a node's content.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary), | intent(in) | :: | self | The dictionary. |
||
class(*), | intent(in) | :: | key | The key. |
Content pointer of the queried node.
function get_pointer(self, key) result(content)
!---------------------------------------------------------------------------------------------------------------------------------
!< Return a pointer to a node's content.
!---------------------------------------------------------------------------------------------------------------------------------
class(dictionary), intent(in) :: self !< The dictionary.
class(*), intent(in) :: key !< The key.
class(*), pointer :: content !< Content pointer of the queried node.
type(dictionary_node), pointer :: p !< Pointer to scan the dictionary.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
content => null()
p => self%node(key=key)
if (associated(p)) content => p%get_pointer()
!---------------------------------------------------------------------------------------------------------------------------------
endfunction get_pointer