MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
ptrhashtablemodule::ptrhashtabletype Type Reference

HashTable that stores void pointer items. More...

Collaboration diagram for ptrhashtablemodule::ptrhashtabletype:
Collaboration graph

Public Member Functions

procedure iterator (this)
 An iterator used to iterate through the HashTable.
procedure add (this, key, val)
 Add a void pointer to the HashTable.
procedure get (this, key)
 Get a void pointer from the HashTable using a key.
procedure contains (this, key)
 Boolean indicating if an item exists in the hashtable.
procedure count (this)
 The nummer of items in the HashTable.
procedure clear (this)
 Clears the HashTable.

Public Attributes

integer(i4b) cnt = 0
 the number of items in the HashTable

Private Attributes

type(keyvaluelisttype), dimension(bucket_size) buckets
 the HashTable buckets

Detailed Description

Definition at line 20 of file PtrHashTable.f90.

Member Function/Subroutine Documentation

◆ add()

procedure ptrhashtablemodule::ptrhashtabletype::add ( class(ptrhashtabletype), target this,
character(len=*), intent(in) key,
class(*), intent(in), pointer val )
Parameters
[in]keykey of the item to be added
[in]valvalue to be added

Definition at line 26 of file PtrHashTable.f90.

◆ clear()

procedure ptrhashtablemodule::ptrhashtabletype::clear ( class(ptrhashtabletype), target this)

Loops over all the buckets and clears them.

Definition at line 30 of file PtrHashTable.f90.

◆ contains()

procedure ptrhashtablemodule::ptrhashtabletype::contains ( class(ptrhashtabletype), target this,
character(len=*), intent(in) key )
Parameters
[in]keykey of the item to retrieve
Returns
item found

Definition at line 28 of file PtrHashTable.f90.

◆ count()

procedure ptrhashtablemodule::ptrhashtabletype::count ( class(ptrhashtabletype) this)

Definition at line 29 of file PtrHashTable.f90.

◆ get()

procedure ptrhashtablemodule::ptrhashtabletype::get ( class(ptrhashtabletype), target this,
character(len=*), intent(in) key )
Parameters
[in]keykey of the item to retrieve
Returns
item associated with the key

Definition at line 27 of file PtrHashTable.f90.

◆ iterator()

procedure ptrhashtablemodule::ptrhashtabletype::iterator ( class(ptrhashtabletype), target this)

Definition at line 25 of file PtrHashTable.f90.

Member Data Documentation

◆ buckets

type(keyvaluelisttype), dimension(bucket_size) ptrhashtablemodule::ptrhashtabletype::buckets
private

Definition at line 22 of file PtrHashTable.f90.

22 type(KeyValueListType) :: buckets(BUCKET_SIZE) !< the HashTable buckets

◆ cnt

integer(i4b) ptrhashtablemodule::ptrhashtabletype::cnt = 0

Definition at line 23 of file PtrHashTable.f90.


The documentation for this type was generated from the following file: