An abstract type for the standard map data structures. These are data structures which consist of key-value pairs, with only one value per key. It has similar functionality to the dictionary type in Python.
Returns the value associated with the specified key.
Adds any key-value pairs in the second map not already present. Updates the value for all keys in this dictionary also present in the second dictionary.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(map), | intent(inout) | :: | this | |||
class(map), | intent(in) | :: | other | A map whose key-value pairs will be added to this one, overwriting as necessary. |
type, public, extends(dictionary), abstract :: map
!* Author: Chris MacMackin
! Date: March 2016
!
! An abstract type for the standard map data structures. These are
! data structures which consist of key-value pairs, with only one
! value per key. It has similar functionality to the
! [dictionary](https://docs.python.org/2/library/stdtypes.html#mapping-types-dict)
! type in Python.
!
contains
procedure(get_func), deferred :: get
!! Returns the value associated with the specified key.
procedure(update_sub), deferred :: update
!! Adds any key-value pairs in the second map not already present.
!! Updates the value for all keys in this dictionary also present
!! in the second dictionary.
end type map