PF_API 0.52
|
#include <UHash.h>
Classes | |
struct | TableNode |
Public Member Functions | |
HashTableUIntKeys (uint powerOf2InitialSize_) | |
HashTableUIntKeys (uint powerOf2InitialSize_, const T &defaultValue_) | |
~HashTableUIntKeys () | |
HashTableUIntKeys (const HashTableUIntKeys< T > &hashTable_) | |
HashTableUIntKeys & | operator= (const HashTableUIntKeys< T > &hashTable_) |
const T & | find (const uint &key_) const |
bool | find (const uint &key_, T &value_) const |
bool | find (const uint &key_, T *&value_) const |
const T & | operator[] (const uint &key_) const |
void | add (const uint &key_, const T &value_) |
T & | add (const uint &key_) |
bool | remove (const uint &key_) |
void | clear (bool doRealloc_=true) |
uint | getLoad () const |
void | getAllValues (T **values_) const |
HashTableUIntKeys (uint powerOf2InitialSize_) | |
HashTableUIntKeys (uint powerOf2InitialSize_, const T &defaultValue_) | |
~HashTableUIntKeys () | |
HashTableUIntKeys (const HashTableUIntKeys< T > &hashTable_) | |
HashTableUIntKeys & | operator= (const HashTableUIntKeys< T > &hashTable_) |
const T & | find (const uint &key_) const |
bool | find (const uint &key_, T &value_) const |
bool | find (const uint &key_, T *&value_) const |
const T & | operator[] (const uint &key_) const |
void | add (const uint &key_, const T &value_) |
T & | add (const uint &key_) |
bool | remove (const uint &key_) |
void | clear (bool doRealloc_=true) |
uint | getLoad () const |
void | getAllValues (T **values_) const |
This table can hold a maximum of 2,147,483,648 keys.
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys | ( | uint | powerOf2InitialSize_ | ) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys | ( | uint | powerOf2InitialSize_, |
const T & | defaultValue_ | ||
) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::~HashTableUIntKeys | ( | ) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys | ( | const HashTableUIntKeys< T > & | hashTable_ | ) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys | ( | uint | powerOf2InitialSize_ | ) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys | ( | uint | powerOf2InitialSize_, |
const T & | defaultValue_ | ||
) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::~HashTableUIntKeys | ( | ) | [inline] |
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys | ( | const HashTableUIntKeys< T > & | hashTable_ | ) | [inline] |
void OpenSkyNet::Utils::HashTableUIntKeys< T >::add | ( | const uint & | key_, |
const T & | value_ | ||
) | [inline] |
Adapted from http://en.wikipedia.org/wiki/Hash_table.
void OpenSkyNet::Utils::HashTableUIntKeys< T >::add | ( | const uint & | key_, |
const T & | value_ | ||
) | [inline] |
Adapted from http://en.wikipedia.org/wiki/Hash_table.
T& OpenSkyNet::Utils::HashTableUIntKeys< T >::add | ( | const uint & | key_ | ) | [inline] |
This version returns a value that, when modified, will affect the table's value.
T& OpenSkyNet::Utils::HashTableUIntKeys< T >::add | ( | const uint & | key_ | ) | [inline] |
This version returns a value that, when modified, will affect the table's value.
void OpenSkyNet::Utils::HashTableUIntKeys< T >::clear | ( | bool | doRealloc_ = true | ) | [inline] |
By default, this method resizes the table to its initial size and will reset all values to the default value if it was provided for when the table was constructed.
doRealloc_ | If false, will neither delete nor resize the existing table, just reset values. |
void OpenSkyNet::Utils::HashTableUIntKeys< T >::clear | ( | bool | doRealloc_ = true | ) | [inline] |
By default, this method resizes the table to its initial size and will reset all values to the default value if it was provided for when the table was constructed.
doRealloc_ | If false, will neither delete nor resize the existing table, just reset values. |
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find | ( | const uint & | key_, |
T *& | value_ | ||
) | const [inline] |
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find | ( | const uint & | key_, |
T & | value_ | ||
) | const [inline] |
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find | ( | const uint & | key_, |
T *& | value_ | ||
) | const [inline] |
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find | ( | const uint & | key_, |
T & | value_ | ||
) | const [inline] |
const T& OpenSkyNet::Utils::HashTableUIntKeys< T >::find | ( | const uint & | key_ | ) | const [inline] |
const T& OpenSkyNet::Utils::HashTableUIntKeys< T >::find | ( | const uint & | key_ | ) | const [inline] |
void OpenSkyNet::Utils::HashTableUIntKeys< T >::getAllValues | ( | T ** | values_ | ) | const [inline] |
Sets an array to the values' addresses. The size of values_ when passed in must be at least getLoad(). This method takes O(n) where n is the size of the table.
void OpenSkyNet::Utils::HashTableUIntKeys< T >::getAllValues | ( | T ** | values_ | ) | const [inline] |
Sets an array to the values' addresses. The size of values_ when passed in must be at least getLoad(). This method takes O(n) where n is the size of the table.
uint OpenSkyNet::Utils::HashTableUIntKeys< T >::getLoad | ( | ) | const [inline] |
Return the number of keys stored.
uint OpenSkyNet::Utils::HashTableUIntKeys< T >::getLoad | ( | ) | const [inline] |
Return the number of keys stored.
HashTableUIntKeys& OpenSkyNet::Utils::HashTableUIntKeys< T >::operator= | ( | const HashTableUIntKeys< T > & | hashTable_ | ) | [inline] |
HashTableUIntKeys& OpenSkyNet::Utils::HashTableUIntKeys< T >::operator= | ( | const HashTableUIntKeys< T > & | hashTable_ | ) | [inline] |
const T& OpenSkyNet::Utils::HashTableUIntKeys< T >::operator[] | ( | const uint & | key_ | ) | const [inline] |
NOTE: Unlike other hash map implementations, this operator does NOT add items to the map.
const T& OpenSkyNet::Utils::HashTableUIntKeys< T >::operator[] | ( | const uint & | key_ | ) | const [inline] |
NOTE: Unlike other hash map implementations, this operator does NOT add items to the map.
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::remove | ( | const uint & | key_ | ) | [inline] |
Adapted from http://en.wikipedia.org/wiki/Hash_table.
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::remove | ( | const uint & | key_ | ) | [inline] |
Adapted from http://en.wikipedia.org/wiki/Hash_table.