|
Lolly 1.4.28
|
#include <hashmap.hpp>


Public Member Functions | |
| hashmap_rep (U init2, int n2=1, int max2=1) | |
| Constructor for the hashmap_rep class. | |
| ~hashmap_rep () | |
| Destructor for the hashmap_rep class. | |
| void | resize (int n) |
| Resizes the hashmap and rehashes all existing keys. | |
| void | reset (T x) |
| Remove a specific key from the hashmap, if it exists. | |
| void | generate (void(*routine)(T)) |
| Applies a given routine to each key in the hashmap. | |
| bool | contains (T x) |
| bool | empty () |
| U | bracket_ro (T x) |
| U & | bracket_rw (T x) |
| U & | bracket_rw_debug (T x) |
| void | join (hashmap< T, U > H) |
| Joins another hashmap into the current hashmap. | |
| void | write_back (T x, hashmap< T, U > base) |
| Writes back a key-value pair into the current hashmap using a base hashmap as a reference. | |
| void | pre_patch (hashmap< T, U > patch, hashmap< T, U > base) |
| Applies a patch to the current hashmap using another hashmap as a base reference. | |
| void | post_patch (hashmap< T, U > patch, hashmap< T, U > base) |
| Applies a post-patch to the current hashmap using another hashmap as a base reference. | |
Private Attributes | |
| int | size |
| int | n |
| int | max |
| U | init |
| list< hashentry< T, U > > * | a |
Private Attributes inherited from concrete_struct | |
| int | ref_count |
| The reference count for the concrete object. | |
Friends | |
| class | hashmap< T, U > |
| class | rel_hashmap< T, U > |
| class | rel_hashmap_rep< T, U > |
| class | hashmap_iterator_rep< T, U > |
| class | edit_env_rep |
| int N | LESSGTR (hashmap< T, U > h) |
| tm_ostream & | operator<<LESSGTR (tm_ostream &out, hashmap< T, U > h) |
| hashmap< T, U > copy | LESSGTR (hashmap< T, U > h) |
| hashmap< T, U > changes | LESSGTR (hashmap< T, U > patch, hashmap< T, U > base) |
| hashmap< T, U > invert | LESSGTR (hashmap< T, U > patch, hashmap< T, U > base) |
| bool | operator==LESSGTR (hashmap< T, U > h1, hashmap< T, U > h2) |
| bool | operator!=LESSGTR (hashmap< T, U > h1, hashmap< T, U > h2) |
Additional Inherited Members | |
Private Member Functions inherited from concrete_struct | |
| concrete_struct () | |
| Default constructor for the concrete object. Increments the reference count. | |
| virtual | ~concrete_struct () |
| Virtual destructor for the concrete object. Decrements the reference count. | |
Definition at line 47 of file hashmap.hpp.
|
inline |
Constructor for the hashmap_rep class.
| T | Type of the keys in the hash map. |
| U | Type of the values in the hash map. |
| init2 | Initial value for hash entries. * |
| n2 | Initial size of the hash table array. |
| max2 | Maximum allowable size for dynamic resizing. |
Definition at line 52 of file hashmap.hpp.
|
inline |
Destructor for the hashmap_rep class.
| T | Type of the keys in the hash map. |
| U | Type of the values in the hash map. |
Definition at line 52 of file hashmap.hpp.
| void hashmap_rep< T, U >::resize | ( | int | n | ) |
Resizes the hashmap and rehashes all existing keys.
| n | The new size of the hashmap. |
Definition at line 48 of file hashmap.ipp.
| void hashmap_rep< T, U >::reset | ( | T | x | ) |
Remove a specific key from the hashmap, if it exists.
| T | The type of the key in the hashmap. |
| x | The key to be removed from the hashmap. |
Definition at line 108 of file hashmap.ipp.
| void hashmap_rep< T, U >::generate | ( | void(*)(T) | routine | ) |
Applies a given routine to each key in the hashmap.
| T | The type of the key in the hashmap. |
| routine | The function pointer to the routine to be applied to each key in the hashmap. |
Definition at line 123 of file hashmap.ipp.
| bool hashmap_rep< T, U >::contains | ( | T | x | ) |
Definition at line 66 of file hashmap.ipp.
| bool hashmap_rep< T, U >::empty | ( | ) |
Definition at line 77 of file hashmap.ipp.
| U hashmap_rep< T, U >::bracket_ro | ( | T | x | ) |
| U & hashmap_rep< T, U >::bracket_rw | ( | T | x | ) |
Definition at line 82 of file hashmap.ipp.
| U & hashmap_rep< T, U >::bracket_rw_debug | ( | T | x | ) |
| void hashmap_rep< T, U >::join | ( | hashmap< T, U > | H | ) |
Joins another hashmap into the current hashmap.
| T | The type of the key in the hashmap. |
| U | The type of the value in the hashmap. |
| h | The hashmap to be joined into the current hashmap. |
Definition at line 150 of file hashmap.ipp.
| void hashmap_rep< T, U >::write_back | ( | T | x, |
| hashmap< T, U > | base ) |
Writes back a key-value pair into the current hashmap using a base hashmap as a reference.
| T | The type of the key in the hashmap. |
| U | The type of the value in the hashmap. |
| x | The key to be inserted or updated in the current hashmap. |
| base | The base hashmap used as a reference for the value of the key. |
Definition at line 20 of file hashmap_extra.ipp.
| void hashmap_rep< T, U >::pre_patch | ( | hashmap< T, U > | patch, |
| hashmap< T, U > | base ) |
Applies a patch to the current hashmap using another hashmap as a base reference.
| T | The type of the key in the hashmap. |
| U | The type of the value in the hashmap. |
| patch | The hashmap containing the key-value pairs that serve as the patch. |
| base | The base hashmap used as a reference for the patching process. |
Definition at line 44 of file hashmap_extra.ipp.
| void hashmap_rep< T, U >::post_patch | ( | hashmap< T, U > | patch, |
| hashmap< T, U > | base ) |
Applies a post-patch to the current hashmap using another hashmap as a base reference.
| T | The type of the key in the hashmap. |
| U | The type of the value in the hashmap. |
| patch | The hashmap containing the key-value pairs that serve as the post-patch. |
| base | The base hashmap used as a reference for the post-patching process. |
Definition at line 58 of file hashmap_extra.ipp.
Definition at line 114 of file hashmap.hpp.
|
friend |
Definition at line 114 of file hashmap.hpp.
|
friend |
Definition at line 114 of file hashmap.hpp.
|
friend |
Definition at line 114 of file hashmap.hpp.
Definition at line 164 of file hashmap.hpp.
|
friend |
|
private |
Definition at line 48 of file hashmap.hpp.
|
private |
Definition at line 49 of file hashmap.hpp.
|
private |
Definition at line 50 of file hashmap.hpp.
|
private |
Definition at line 51 of file hashmap.hpp.
|
private |
Definition at line 52 of file hashmap.hpp.