15 class HashF = GFixedSizeHash<C>,
16 class Allocator = GAllocatorGH<C>,
17 class HashNode = GHashNode<C, U, HashF>,
18 class Entry = GHashsetCachedNodeEntry<HashNode, typename HashNode::NodeHashF>,
19 class Container = GHashSet<HashNode, typename HashNode::NodeHashF, typename HashNode::NodeAltHashF, Allocator, Entry>>
30 GHash(std::int32_t a_sizeHint) :
38 GHash(
void* a_heap, std::int32_t a_sizeHint) :
39 hash(a_heap, a_sizeHint)
63 return hash.IsEmpty();
66 inline void Set(
const C& a_key,
const U& a_value)
68 typename HashNode::NodeRef entry(a_key, a_value);
72 inline void Add(
const C& a_key,
const U& a_value)
74 typename HashNode::NodeRef entry(a_key, a_value);
80 hash.RemoveAlt(a_key);
86 hash.RemoveAlt(a_key);
89 bool Get(
const C& a_key, U* a_value)
const
91 const HashNode* ptr =
hash.GetAlt(a_key);
94 *a_value = ptr->second;
102 bool GetAlt(
const K& a_key, U* a_value)
const
104 const HashNode* ptr =
hash.GetAlt(a_key);
107 *a_value = ptr->second;
114 inline U*
Get(
const C& a_key)
116 HashNode* ptr =
hash.GetAlt(a_key);
117 return ptr ? &ptr->second :
nullptr;
120 inline const U*
Get(
const C& a_key)
const
122 const HashNode* ptr =
hash.GetAlt(a_key);
123 return ptr ? &ptr->second :
nullptr;
129 HashNode* ptr =
hash.GetAlt(a_key);
130 return ptr ? &ptr->second :
nullptr;
134 inline const U*
GetAlt(
const K& a_key)
const
136 const HashNode* ptr =
hash.GetAlt(a_key);
137 return ptr ? &ptr->second :
nullptr;
142 return hash.GetSize();
152 hash.SetCapacity(a_newSize);
177 return hash.FindAlt(a_key);
182 return hash.FindAlt(a_key);
188 return hash.FindAlt(a_key);
194 return hash.FindAlt(a_key);
void Set(const C &a_key, const U &a_value)
Definition: GHash.h:66
const U * GetAlt(const K &a_key) const
Definition: GHash.h:134
const U * Get(const C &a_key) const
Definition: GHash.h:120
iterator begin()
Definition: GHash.h:155
U * Get(const C &a_key)
Definition: GHash.h:114
const_iterator FindAlt(const K &a_key) const
Definition: GHash.h:192
GHash(std::int32_t a_sizeHint)
Definition: GHash.h:30
void SetCapacity(UPInt a_newSize)
Definition: GHash.h:150
bool Get(const C &a_key, U *a_value) const
Definition: GHash.h:89
GHash(const SelfType &a_src)
Definition: GHash.h:42
void RemoveAlt(const K &a_key)
Definition: GHash.h:84
~GHash()
Definition: GHash.h:46
GHash(void *a_heap)
Definition: GHash.h:34
bool GetAlt(const K &a_key, U *a_value) const
Definition: GHash.h:102
typename Container::const_iterator const_iterator
Definition: GHash.h:24
typename Container::iterator iterator
Definition: GHash.h:25
iterator Find(const C &a_key)
Definition: GHash.h:175
const_iterator begin() const
Definition: GHash.h:165
void Resize(UPInt a_size)
Definition: GHash.h:145
GFC_MEMORY_REDEFINE_NEW(GHash, Allocator::kStatID)
void operator=(const SelfType &a_src)
Definition: GHash.h:51
GHash()
Definition: GHash.h:27
U * GetAlt(const K &a_key)
Definition: GHash.h:127
void Clear()
Definition: GHash.h:56
GHash(void *a_heap, std::int32_t a_sizeHint)
Definition: GHash.h:38
iterator end()
Definition: GHash.h:160
void Remove(const C &a_key)
Definition: GHash.h:78
const_iterator end() const
Definition: GHash.h:170
iterator FindAlt(const K &a_key)
Definition: GHash.h:186
UPInt GetSize() const
Definition: GHash.h:140
bool IsEmpty() const
Definition: GHash.h:61
void Add(const C &a_key, const U &a_value)
Definition: GHash.h:72
const_iterator Find(const C &a_key) const
Definition: GHash.h:180
Container hash
Definition: GHash.h:198
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5