Information about locating a value in the hash table. More...
#include <Map.h>
Public Member Functions | |
Location () | |
Default constructor - empty location. | |
bool | isValid () const |
Check for location being valid (referencing a value). | |
operator Value * () const | |
Automatically cast to a Value* for convenience. | |
Value & | operator* () const |
Dereference. | |
Value * | operator-> () const |
Dereference. | |
Location & | operator++ () |
Find next value with matching key (prefix). | |
Location & | operator++ (int) |
Find next value with matching key (postfix). | |
Data Fields | |
Value * | m_value |
The value located. | |
Bucket * | m_bucket |
Containing bucket of value. | |
ID | m_id |
ID (hashed key). | |
size_t | m_distance |
How many values in the chain we've gone past to get here. | |
Protected Member Functions | |
void | advance () |
Move to next matching value, no checks. | |
Friends | |
class | TSHashTable |
Information about locating a value in the hash table.
An instance of this returned when searching for a key in the table. It can then be used to check if a matching key was found, and to iterate over equivalent keys. Note this iterator will touch only values which have a matching key.
Definition at line 1092 of file Map.h.
TSHashTable< H >::Location::Location | ( | ) | [inline] |
void TSHashTable< H >::Location::advance | ( | ) | [protected] |
Move to next matching value, no checks.
Definition at line 1294 of file Map.h.
References TSHashTable< H >::Location::m_distance, and TSHashTable< H >::Location::m_value.
Referenced by TSHashTable< H >::Location::operator++(), and TSHashTable< H >::remove().
bool TSHashTable< H >::Location::isValid | ( | ) | const [inline] |
Check for location being valid (referencing a value).
Definition at line 1102 of file Map.h.
References TSHashTable< H >::Location::m_value.
Referenced by TSHashTable< H >::remove().
TSHashTable< H >::Location::operator Value * | ( | ) | const [inline] |
Automatically cast to a Value*
for convenience.
find
to a Value*
. Definition at line 1107 of file Map.h.
References TSHashTable< H >::Location::m_value.
Value& TSHashTable< H >::Location::operator* | ( | ) | const [inline] |
Location& TSHashTable< H >::Location::operator++ | ( | int | ) | [inline] |
Find next value with matching key (postfix).
Definition at line 1117 of file Map.h.
References TSHashTable< H >::Location::advance(), and TSHashTable< H >::Location::m_value.
Location& TSHashTable< H >::Location::operator++ | ( | ) | [inline] |
Find next value with matching key (prefix).
Definition at line 1115 of file Map.h.
References TSHashTable< H >::Location::advance(), and TSHashTable< H >::Location::m_value.
Value* TSHashTable< H >::Location::operator-> | ( | ) | const [inline] |
friend class TSHashTable [friend] |
Bucket* TSHashTable< H >::Location::m_bucket |
Containing bucket of value.
Definition at line 1094 of file Map.h.
Referenced by TSHashTable< H >::find(), TSHashTable< H >::findBucket(), and TSHashTable< H >::remove().
size_t TSHashTable< H >::Location::m_distance |
How many values in the chain we've gone past to get here.
Definition at line 1096 of file Map.h.
Referenced by TSHashTable< H >::Location::advance().
ID TSHashTable< H >::Location::m_id |
ID (hashed key).
Definition at line 1095 of file Map.h.
Referenced by TSHashTable< H >::findBucket().
Value* TSHashTable< H >::Location::m_value |
The value located.
Definition at line 1093 of file Map.h.
Referenced by TSHashTable< H >::Location::advance(), TSHashTable< H >::find(), TSHashTable< H >::Location::isValid(), TSHashTable< H >::Location::operator Value *(), TSHashTable< H >::Location::operator*(), TSHashTable< H >::Location::operator++(), TSHashTable< H >::Location::operator->(), and TSHashTable< H >::remove().