ezEngine  Milestone 9
ezHashSet< KeyType, Hasher, AllocatorWrapper > Class Template Reference

#include <HashSet.h>

Inheritance diagram for ezHashSet< KeyType, Hasher, AllocatorWrapper >:

Public Member Functions

 ezHashSet (ezAllocatorBase *pAllocator)
 ezHashSet (const ezHashSet< KeyType, Hasher, AllocatorWrapper > &other)
 ezHashSet (const ezHashSetBase< KeyType, Hasher > &other)
 ezHashSet (ezHashSet< KeyType, Hasher, AllocatorWrapper > &&other)
 ezHashSet (ezHashSetBase< KeyType, Hasher > &&other)
void operator= (const ezHashSet< KeyType, Hasher, AllocatorWrapper > &rhs)
void operator= (const ezHashSetBase< KeyType, Hasher > &rhs)
void operator= (ezHashSet< KeyType, Hasher, AllocatorWrapper > &&rhs)
void operator= (ezHashSetBase< KeyType, Hasher > &&rhs)
- Public Member Functions inherited from ezHashSetBase< KeyType, Hasher >
bool operator== (const ezHashSetBase< KeyType, Hasher > &rhs) const
 Compares this table to another table.
bool operator!= (const ezHashSetBase< KeyType, Hasher > &rhs) const
 Compares this table to another table.
void Reserve (ezUInt32 uiCapacity)
 Expands the hashset by over-allocating the internal storage so that the load factor is lower or equal to 60% when inserting the given number of entries.
void Compact ()
 Tries to compact the hashset to avoid wasting memory. More...
ezUInt32 GetCount () const
 Returns the number of active entries in the table.
bool IsEmpty () const
 Returns true, if the hashset does not contain any elements.
void Clear ()
 Clears the table.
template<typename CompatibleKeyType >
bool Insert (CompatibleKeyType &&key)
 Inserts the key. Returns whether the key was already existing.
bool Remove (const KeyType &key)
 Removes the entry with the given key. Returns if an entry was removed.
bool Contains (const KeyType &key) const
 Returns if an entry with given key exists in the table.
ConstIterator GetIterator () const
 Returns a constant Iterator to the very first element.
ConstIterator GetEndIterator () const
 Returns a constant Iterator to the first element that is not part of the hashset. Needed to implement range based for loop support.
ezAllocatorBaseGetAllocator () const
 Returns the allocator that is used by this instance.
ezUInt64 GetHeapMemoryUsage () const
 Returns the amount of bytes that are currently allocated on the heap.
void Swap (ezHashSetBase< KeyType, Hasher > &other)
 Swaps this map with the other one.

Additional Inherited Members

- Protected Member Functions inherited from ezHashSetBase< KeyType, Hasher >
 ezHashSetBase (ezAllocatorBase *pAllocator)
 Creates an empty hashset. Does not allocate any data yet.
 ezHashSetBase (const ezHashSetBase< KeyType, Hasher > &rhs, ezAllocatorBase *pAllocator)
 Creates a copy of the given hashset.
 ezHashSetBase (ezHashSetBase< KeyType, Hasher > &&rhs, ezAllocatorBase *pAllocator)
 Moves data from an existing hashtable into this one.
 ~ezHashSetBase ()
void operator= (const ezHashSetBase< KeyType, Hasher > &rhs)
 Copies the data from another hashset into this one.
void operator= (ezHashSetBase< KeyType, Hasher > &&rhs)
 Moves data from an existing hashset into this one.

Detailed Description

template<typename KeyType, typename Hasher = ezHashHelper<KeyType>, typename AllocatorWrapper = ezDefaultAllocatorWrapper>
class ezHashSet< KeyType, Hasher, AllocatorWrapper >

See also

The documentation for this class was generated from the following files: