Isle
Loading...
Searching...
No Matches
MxHashTableNode< T > Class Template Reference

[AI] Node used within the MxHashTable to store an individual object and associated hash, for organizing elements in a bucketed linked list. More...

#include <mxhashtable.h>

Collaboration diagram for MxHashTableNode< T >:

Public Member Functions

 MxHashTableNode (T p_obj, MxU32 p_hash, MxHashTableNode *p_prev, MxHashTableNode *p_next)
 [AI] Constructor for a new hash node with its associated object, hash value, and linkage pointers. More...
 

Public Attributes

m_obj
 [AI] The actual object value this node represents. More...
 
MxU32 m_hash
 [AI] The hash value for m_obj, used for placement/search in the table. More...
 
MxHashTableNodem_prev
 [AI] Previous node in the linked list chain within the current bucket. More...
 
MxHashTableNodem_next
 [AI] Next node in the linked list chain within the current bucket. More...
 

Detailed Description

template<class T>
class MxHashTableNode< T >

[AI] Node used within the MxHashTable to store an individual object and associated hash, for organizing elements in a bucketed linked list.

[AI] Each hash table slot contains a linked list of these nodes. Each node stores an object of type T and the corresponding hash, as well as pointers to previous and next nodes in the bucket's list.

Template Parameters
T[AI] Type of object stored in the hash table node.

Definition at line 20 of file mxhashtable.h.

Constructor & Destructor Documentation

◆ MxHashTableNode()

template<class T >
MxHashTableNode< T >::MxHashTableNode ( p_obj,
MxU32  p_hash,
MxHashTableNode< T > *  p_prev,
MxHashTableNode< T > *  p_next 
)
inline

[AI] Constructor for a new hash node with its associated object, hash value, and linkage pointers.

Parameters
p_obj[AI] The object value held by this node.
p_hash[AI] The precomputed hash for the stored object.
p_prev[AI] The node preceding this one in the bucket's linked list (can be nullptr).
p_next[AI] The node following this one in the bucket's linked list (can be nullptr).

Definition at line 309 of file mxhashtable.h.

Member Data Documentation

◆ m_hash

template<class T >
MxU32 MxHashTableNode< T >::m_hash

[AI] The hash value for m_obj, used for placement/search in the table.

Definition at line 43 of file mxhashtable.h.

◆ m_next

template<class T >
MxHashTableNode* MxHashTableNode< T >::m_next

[AI] Next node in the linked list chain within the current bucket.

Definition at line 47 of file mxhashtable.h.

◆ m_obj

template<class T >
T MxHashTableNode< T >::m_obj

[AI] The actual object value this node represents.

Definition at line 41 of file mxhashtable.h.

◆ m_prev

template<class T >
MxHashTableNode* MxHashTableNode< T >::m_prev

[AI] Previous node in the linked list chain within the current bucket.

Definition at line 45 of file mxhashtable.h.


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