Dictionary node class to storage any contents by means of generic key/content pairs.
The next/previous
members of this class are public because they can be safely handled by the dictionary class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(key_base), | public, | allocatable | :: | key | The key. |
||
class(*), | private, | pointer | :: | content_ | => | null() | The generic content. |
type(dictionary_node), | public, | pointer | :: | next | => | null() | The next node in the dictionary. |
type(dictionary_node), | public, | pointer | :: | previous | => | null() | The previous node in the dictionary. |
Finalize the node.
Finalize the dictionary node.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dictionary_node), | intent(inout) | :: | self | The node. |
Destroy the node (key & content).
Destroy the node (key & content).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(inout) | :: | self | The node. |
Return a pointer to node's content.
Return a pointer to node's content.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(in) | :: | self | The node. |
Content pointer of the node.
Return .true. if the node has a key (or id) set-up.
Return .true. if the node has a key (or id) set-up.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(in) | :: | self | The node. |
Return storage status.
Return storage status.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(in) | :: | self | The node. |
Set the node pointer-associating content.
Set the node pointer-associating content.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(inout) | :: | self | The node. |
||
class(*), | intent(in) | :: | key | The key. |
||
class(*), | intent(in), | pointer | :: | content | The content. |
|
integer(kind=I4P), | intent(in), | optional | :: | buckets_number | Buckets number. |
Set the node cloning content.
Set the node cloning content.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(inout) | :: | self | The node. |
||
class(*), | intent(in) | :: | key | The key. |
||
class(*), | intent(in) | :: | content | The content. |
||
integer(kind=I4P), | intent(in), | optional | :: | buckets_number | Buckets number. |
Destroy the node key.
Destroy the node key.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(inout) | :: | self | The node. |
Destroy the node content.
Destroy the node content.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dictionary_node), | intent(inout) | :: | self | The node. |
type :: dictionary_node
!< **Dictionary node** class to storage any contents by means of generic key/content pairs.
!<
!< @note The `next/previous` members of this class are public because they can be safely handled by the [[dictionary]] class.
type(key_base), allocatable, public :: key !< The key.
class(*), pointer, private :: content_=>null() !< The generic content.
type(dictionary_node), pointer, public :: next=>null() !< The next node in the dictionary.
type(dictionary_node), pointer, public :: previous=>null() !< The previous node in the dictionary.
contains
! public methods
procedure, pass(self) :: destroy !< Destroy the node (key & content).
procedure, pass(self) :: get_pointer !< Return a pointer to node's content.
procedure, pass(self) :: has_key !< Return .true. if the node has a key (or id) set-up.
procedure, pass(self) :: is_filled !< Return storage status.
procedure, pass(self) :: set_pointer !< Set the node pointer-associating content.
procedure, pass(self) :: set_clone !< Set the node cloning content.
! private methods
procedure, pass(self), private :: destroy_key !< Destroy the node key.
procedure, pass(self), private :: destroy_content !< Destroy the node content.
! finalizer
final :: finalize !< Finalize the node.
endtype dictionary_node