Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::HashMapShared::Entry Class Reference

Base data entry for HashMap. More...

Inheritance diagram for Burger::HashMapShared::Entry:

Public Member Functions

uint_t IsEmpty (void) const noexcept
 Is the Entry an empty record.
 
uint_t IsEndOfChain (void) const noexcept
 Is the Entry the last Entry of a linked list.
 
uint_t IsHashInvalid (void) const noexcept
 Is the Entry uninitialized?
 

Public Attributes

uintptr_t m_uNextInChain
 Next item index in the linked list chain or END_OF_CHAIN to mark the end of a linked list.
 
uintptr_t m_uHashValue
 Computed hash value for this object (INVALID_HASH indicates this entry is not initialized)
 

Detailed Description

Base data entry for HashMap.


This is the base class for each data entry used by the HashMap / HashMapShared hash manager. These entries are used for managing the linked list for multiple hash items

The derived class will append the key / value pairs to this class.

An entry is considered initialized if the hash value is not INVALID_HASH

An entry is considered "dormant", that is, part of a linked list, yet must be skipped when the entry is not EMPTY_RECORD and the hash is INVALID_HASH.

This is to support erasing entries during the use of an iterator without complicating the iterator code.

See also
HashMap, HashMap::Entry or HashMapShared

Member Function Documentation

◆ IsEmpty()

uint_t Burger::HashMapShared::Entry::IsEmpty ( void ) const
inlinenoexcept

Is the Entry an empty record.


If the Entry is not used at all, it will return TRUE. Otherwise, it returns FALSE. It's possible the entry is invalid, however it can be still part of a linked list.

Returns
TRUE if this Entry is not used at all.
See also
IsEndOfChain(void) const or IsHashInvalid(void) const

◆ IsEndOfChain()

uint_t Burger::HashMapShared::Entry::IsEndOfChain ( void ) const
inlinenoexcept

Is the Entry the last Entry of a linked list.


If the Entry is the last link of the linked list, it will return TRUE. Otherwise, it returns FALSE.

Returns
TRUE if this Entry is the last entry of a valid linked list.
See also
IsEmpty(void) const or IsHashInvalid(void) const

◆ IsHashInvalid()

uint_t Burger::HashMapShared::Entry::IsHashInvalid ( void ) const
inlinenoexcept

Is the Entry uninitialized?


If the Entry doesn't contain valid data, it will return TRUE. Otherwise, it returns FALSE.

Returns
TRUE if this Entry not initialized.
See also
IsEndOfChain(void) const or IsEmpty(void) const

Member Data Documentation

◆ m_uHashValue

uintptr_t Burger::HashMapShared::Entry::m_uHashValue

Computed hash value for this object (INVALID_HASH indicates this entry is not initialized)

◆ m_uNextInChain

uintptr_t Burger::HashMapShared::Entry::m_uNextInChain

Next item index in the linked list chain or END_OF_CHAIN to mark the end of a linked list.