#include <hashlist.h>
Public Member Functions | |
| virtual | ~Hash () |
| Destructor. | |
| virtual int | compare (KeyT const &key, T const &value) const =0 |
| Compares a value against a key. | |
| virtual uint32_t | hash (KeyT const &key, uint32_t max) const =0 |
| Hash the given key. | |
| virtual bool | match (KeyT const &key, T const &value) const =0 |
| Determines whether a key matches a value. | |
You can't use this class directly; instead, create a derived class and override the compare(), hash() and match() functions.
| T | The type of value in the hash list. | |
| KeyT | The type of the key. |
| virtual int containers::Hash< T, KeyT >::compare | ( | KeyT const & | key, | |
| T const & | value | |||
| ) | const [pure virtual] |
Compares a value against the given key.
| [in] | key | The key which must be compared to the value. |
| [in] | value | The value. |
| virtual uint32_t containers::Hash< T, KeyT >::hash | ( | KeyT const & | key, | |
| uint32_t | max | |||
| ) | const [pure virtual] |
Hash the given key.
| [in] | key | The key to hash. |
| [in] | max | The number of potential different hash this function can return. |
| virtual bool containers::Hash< T, KeyT >::match | ( | KeyT const & | key, | |
| T const & | value | |||
| ) | const [pure virtual] |
Determines whether a key matches the given value.
| [in] | key | The key to match the value against. |
| [in] | value | The value. |
1.5.3