mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
chore(hash): clean up visibility in TSHashTable
This commit is contained in:
parent
8a232d34f2
commit
ce1c33d88b
1 changed files with 26 additions and 16 deletions
|
|
@ -8,30 +8,14 @@
|
||||||
template <class T, class TKey>
|
template <class T, class TKey>
|
||||||
class TSHashTable {
|
class TSHashTable {
|
||||||
public:
|
public:
|
||||||
// Member variables
|
|
||||||
STORM_EXPLICIT_LIST(T, m_linktofull) m_fulllist;
|
|
||||||
uint32_t m_fullnessIndicator = 0;
|
|
||||||
TSGrowableArray<STORM_EXPLICIT_LIST(T, m_linktoslot)> m_slotlistarray;
|
|
||||||
uint32_t m_slotmask = -1;
|
|
||||||
|
|
||||||
// Virtual member functions
|
// Virtual member functions
|
||||||
virtual void InternalDelete(T* ptr);
|
|
||||||
virtual T* InternalNew(STORM_EXPLICIT_LIST(T, m_linktoslot)* listptr, size_t extrabytes, uint32_t flags);
|
|
||||||
virtual ~TSHashTable();
|
virtual ~TSHashTable();
|
||||||
virtual void Destroy();
|
virtual void Destroy();
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
void Clear();
|
void Clear();
|
||||||
uint32_t ComputeSlot(uint32_t hashval);
|
|
||||||
int32_t GetLinkOffset();
|
|
||||||
T* Head();
|
T* Head();
|
||||||
void Initialize();
|
|
||||||
bool Initialized();
|
|
||||||
void Insert(T* ptr, uint32_t hashval, const TKey& key);
|
void Insert(T* ptr, uint32_t hashval, const TKey& key);
|
||||||
void InternalClear(int32_t warn);
|
|
||||||
void InternalLinkNode(T* ptr, uint32_t hashval);
|
|
||||||
T* InternalNewNode(uint32_t, size_t extrabytes, uint32_t flags);
|
|
||||||
int32_t MonitorFullness(uint32_t slot);
|
|
||||||
T* New(const char* str, size_t extrabytes, uint32_t flags);
|
T* New(const char* str, size_t extrabytes, uint32_t flags);
|
||||||
T* New(uint32_t hashval, const char* str, size_t extrabytes, uint32_t flags);
|
T* New(uint32_t hashval, const char* str, size_t extrabytes, uint32_t flags);
|
||||||
T* New(uint32_t hashval, const TKey& key, size_t extrabytes, uint32_t flags);
|
T* New(uint32_t hashval, const TKey& key, size_t extrabytes, uint32_t flags);
|
||||||
|
|
@ -39,6 +23,32 @@ class TSHashTable {
|
||||||
T* Ptr(const char* str);
|
T* Ptr(const char* str);
|
||||||
T* Ptr(uint32_t hashval, const TKey& key);
|
T* Ptr(uint32_t hashval, const TKey& key);
|
||||||
void Unlink(T* ptr);
|
void Unlink(T* ptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Member variables
|
||||||
|
STORM_EXPLICIT_LIST(T, m_linktofull) m_fulllist;
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
int32_t GetLinkOffset();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Member variables
|
||||||
|
uint32_t m_fullnessIndicator = 0;
|
||||||
|
TSGrowableArray<STORM_EXPLICIT_LIST(T, m_linktoslot)> m_slotlistarray;
|
||||||
|
uint32_t m_slotmask = -1;
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual void InternalDelete(T* ptr);
|
||||||
|
virtual T* InternalNew(STORM_EXPLICIT_LIST(T, m_linktoslot)* listptr, size_t extrabytes, uint32_t flags);
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
uint32_t ComputeSlot(uint32_t hashval);
|
||||||
|
void Initialize();
|
||||||
|
bool Initialized();
|
||||||
|
void InternalClear(int32_t warn);
|
||||||
|
void InternalLinkNode(T* ptr, uint32_t hashval);
|
||||||
|
T* InternalNewNode(uint32_t, size_t extrabytes, uint32_t flags);
|
||||||
|
int32_t MonitorFullness(uint32_t slot);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, class TKey>
|
template <class T, class TKey>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue