(git:3add494)
routine_map Module Reference

Functions/Subroutines

subroutine, public routine_map_init (hash_map, initial_capacity)
 Allocates the internal data-structures of the given hash map. More...
 
subroutine, public routine_map_destroy (hash_map)
 Deallocated the internal data-structures if the given hash map. Caution: If the stored keys or values are pointers, their targets will not get deallocated by this routine. More...
 
subroutine, public routine_map_set (hash_map, key, value)
 Stores, and possibly overwrites, a given value under a given key. More...
 
integer(kind=int_4) function, public routine_map_get (hash_map, key, default_value)
 Gets a value for a given key from the hash map. If the key is not found the default_value will be returned. If the key is not found and default_value was not provided the program stops. More...
 
integer function, public routine_map_size (hash_map)
 Returns the number of key/value-items currently stored in the hash map. More...
 
logical function, public routine_map_haskey (hash_map, key)
 Checks whether a given key is currently stored in the hash_map. More...
 
type(routine_map_item_type) function, dimension(:), pointer, public routine_map_items (hash_map)
 Returns a pointer to an array of all key/value-items stored in the hash map. Caution: The caller is responsible for deallocating targeted array after usage. More...
 

Function/Subroutine Documentation

◆ routine_map_init()

subroutine, public routine_map::routine_map_init ( type(routine_map_type), intent(inout)  hash_map,
integer, intent(in), optional  initial_capacity 
)

Allocates the internal data-structures of the given hash map.

Parameters
hash_map...
initial_capacityThe initial size of the internal array (default=11).
Author
Ole Schuett

Definition at line 76 of file routine_map.F.

Here is the caller graph for this function:

◆ routine_map_destroy()

subroutine, public routine_map::routine_map_destroy ( type(routine_map_type), intent(inout)  hash_map)

Deallocated the internal data-structures if the given hash map. Caution: If the stored keys or values are pointers, their targets will not get deallocated by this routine.

Parameters
hash_map...
Author
Ole Schuett

Definition at line 118 of file routine_map.F.

Here is the caller graph for this function:

◆ routine_map_set()

subroutine, public routine_map::routine_map_set ( type(routine_map_type), intent(inout)  hash_map,
character(len=default_string_length), intent(in)  key,
integer(kind=int_4), intent(in)  value 
)

Stores, and possibly overwrites, a given value under a given key.

Parameters
hash_map...
key...
value...
Author
Ole Schuett

Definition at line 145 of file routine_map.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ routine_map_get()

integer(kind=int_4) function, public routine_map::routine_map_get ( type(routine_map_type), intent(in)  hash_map,
character(len=default_string_length), intent(in)  key,
integer(kind=int_4), intent(in), optional  default_value 
)

Gets a value for a given key from the hash map. If the key is not found the default_value will be returned. If the key is not found and default_value was not provided the program stops.

Parameters
hash_map...
key...
default_value...
Returns
...
Author
Ole Schuett

Definition at line 253 of file routine_map.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ routine_map_size()

integer function, public routine_map::routine_map_size ( type(routine_map_type), intent(in)  hash_map)

Returns the number of key/value-items currently stored in the hash map.

Parameters
hash_map...
Returns
...
Author
Ole Schuett

Definition at line 331 of file routine_map.F.

Here is the caller graph for this function:

◆ routine_map_haskey()

logical function, public routine_map::routine_map_haskey ( type(routine_map_type), intent(in)  hash_map,
character(len=default_string_length), intent(in)  key 
)

Checks whether a given key is currently stored in the hash_map.

Parameters
hash_map...
key...
Returns
...
Author
Ole Schuett

Definition at line 346 of file routine_map.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ routine_map_items()

type(routine_map_item_type) function, dimension(:), pointer, public routine_map::routine_map_items ( type(routine_map_type), intent(in)  hash_map)

Returns a pointer to an array of all key/value-items stored in the hash map. Caution: The caller is responsible for deallocating targeted array after usage.

Parameters
hash_map...
Returns
...
Author
Ole Schuett

Definition at line 381 of file routine_map.F.

Here is the call graph for this function: