dm_hash_table_get Interface

public interface dm_hash_table_get

Generic interface to hash table get functions.

Called by

interface~~dm_hash_table_get~~CalledByGraph interface~dm_hash_table_get dm_hash_table_get proc~dm_cgi_router_get dm_cgi_router_get proc~dm_cgi_router_get->interface~dm_hash_table_get proc~dm_cgi_router_dispatch dm_cgi_router_dispatch proc~dm_cgi_router_dispatch->proc~dm_cgi_router_get

Module Procedures

private function hash_table_get_index(hash_table, loc, value) result(rc)

Returns pointer to element in hash table by index loc. On error, value will point to null.

The function returns the following error codes:

  • E_BOUNDS if the index is outside the array bounds.
  • E_NULL if the hash table value pointer is not associated.

Arguments

Type IntentOptional Attributes Name
type(hash_table_type), intent(inout) :: hash_table

Hash table type.

integer, intent(in) :: loc

Hash value index.

class(*), intent(out), pointer :: value

Associated value.

Return Value integer

private function hash_table_get_key(hash_table, key, value) result(rc)

Returns pointer to element in hash table by key. On error, value will point to null. The intrinsic findloc() should be sufficient for a small number of elements. For larger hash tables, buckets have to be added.

The function returns the following error codes:

  • E_NOT_FOUND if the key was not found.
  • E_NULL if the hash table value pointer is not associated.

Arguments

Type IntentOptional Attributes Name
type(hash_table_type), intent(inout) :: hash_table

Hash table type.

character(len=*), intent(in) :: key

Hash table key.

class(*), intent(out), pointer :: value

Associated value.

Return Value integer