PF_API 0.52
Classes | Public Member Functions

OpenSkyNet::Utils::HashTableUIntKeys< T > Class Template Reference

#include <UHash.h>

List of all members.

Classes

struct  TableNode

Public Member Functions

 HashTableUIntKeys (uint powerOf2InitialSize_)
 HashTableUIntKeys (uint powerOf2InitialSize_, const T &defaultValue_)
 ~HashTableUIntKeys ()
 HashTableUIntKeys (const HashTableUIntKeys< T > &hashTable_)
HashTableUIntKeysoperator= (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_)
HashTableUIntKeysoperator= (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

Detailed Description

template<class T = uint>
class OpenSkyNet::Utils::HashTableUIntKeys< T >

This table can hold a maximum of 2,147,483,648 keys.


Constructor & Destructor Documentation

template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys ( uint  powerOf2InitialSize_) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys ( uint  powerOf2InitialSize_,
const T &  defaultValue_ 
) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::~HashTableUIntKeys ( ) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys ( const HashTableUIntKeys< T > &  hashTable_) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys ( uint  powerOf2InitialSize_) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys ( uint  powerOf2InitialSize_,
const T &  defaultValue_ 
) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::~HashTableUIntKeys ( ) [inline]
template<class T = uint>
OpenSkyNet::Utils::HashTableUIntKeys< T >::HashTableUIntKeys ( const HashTableUIntKeys< T > &  hashTable_) [inline]

Member Function Documentation

template<class T = uint>
void OpenSkyNet::Utils::HashTableUIntKeys< T >::add ( const uint key_,
const T &  value_ 
) [inline]
template<class T = uint>
void OpenSkyNet::Utils::HashTableUIntKeys< T >::add ( const uint key_,
const T &  value_ 
) [inline]
template<class T = uint>
T& OpenSkyNet::Utils::HashTableUIntKeys< T >::add ( const uint key_) [inline]

This version returns a value that, when modified, will affect the table's value.

template<class T = uint>
T& OpenSkyNet::Utils::HashTableUIntKeys< T >::add ( const uint key_) [inline]

This version returns a value that, when modified, will affect the table's value.

template<class T = uint>
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.

Parameters:
doRealloc_If false, will neither delete nor resize the existing table, just reset values.
template<class T = uint>
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.

Parameters:
doRealloc_If false, will neither delete nor resize the existing table, just reset values.
template<class T = uint>
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find ( const uint key_,
T *&  value_ 
) const [inline]
template<class T = uint>
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find ( const uint key_,
T &  value_ 
) const [inline]
template<class T = uint>
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find ( const uint key_,
T *&  value_ 
) const [inline]
template<class T = uint>
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::find ( const uint key_,
T &  value_ 
) const [inline]
template<class T = uint>
const T& OpenSkyNet::Utils::HashTableUIntKeys< T >::find ( const uint key_) const [inline]
template<class T = uint>
const T& OpenSkyNet::Utils::HashTableUIntKeys< T >::find ( const uint key_) const [inline]
template<class T = uint>
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.

template<class T = uint>
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.

template<class T = uint>
uint OpenSkyNet::Utils::HashTableUIntKeys< T >::getLoad ( ) const [inline]

Return the number of keys stored.

template<class T = uint>
uint OpenSkyNet::Utils::HashTableUIntKeys< T >::getLoad ( ) const [inline]

Return the number of keys stored.

template<class T = uint>
HashTableUIntKeys& OpenSkyNet::Utils::HashTableUIntKeys< T >::operator= ( const HashTableUIntKeys< T > &  hashTable_) [inline]
template<class T = uint>
HashTableUIntKeys& OpenSkyNet::Utils::HashTableUIntKeys< T >::operator= ( const HashTableUIntKeys< T > &  hashTable_) [inline]
template<class T = uint>
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.

template<class T = uint>
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.

template<class T = uint>
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::remove ( const uint key_) [inline]
template<class T = uint>
bool OpenSkyNet::Utils::HashTableUIntKeys< T >::remove ( const uint key_) [inline]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines