ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
HashTableElementCached< T, TStored > Struct Template Reference

Description:

template<typename T, typename TStored>
struct alib::monomem::detail::HashTableElementCached< T, TStored >

Type used by HashTableBase::Element if hash codes are cached.

Definition at line 79 of file hashtablebase.inl.

Inheritance diagram for HashTableElementCached< T, TStored >:
[legend]
Collaboration diagram for HashTableElementCached< T, TStored >:
[legend]

Public Static Field Index:

static constexpr bool CachedHashCodes = 1
 

Public Field Index:

union { 
 
   TStored   value 
 The value as seen internally. More...
 
   T   valueExternal 
 The value as seen externally. More...
 
};  
 
size_t hashCode
 The cached hash code.
 
- Public Field Index: inherited from SidiNodeBase< HashTableElementCached< T, TStored > >
HashTableElementCached< T, TStored > * pnext
 

Public Method Index:

 ~HashTableElementCached ()=delete
 
void destruct ()
 
void fixHashCode (size_t pHashCode)
 
size_t getCached ()
 
- Public Method Index: inherited from SidiNodeBase< HashTableElementCached< T, TStored > >
 SidiNodeBase () noexcept=default
 
 SidiNodeBase (const SidiNodeBase &)=delete
 
 SidiNodeBase (HashTableElementCached< T, TStored > *next) noexcept
 
 SidiNodeBase (SidiNodeBase &&) noexcept=default
 
HashTableElementCached< T, TStored > * addBehind (HashTableElementCached< T, TStored > *elem)
 
integer count (SidiNodeBase *end=nullptr) const
 
bool hasNext () const
 
HashTableElementCached< T, TStored > * next () const
 
void next (SidiNodeBase *p)
 
SidiNodeBaseoperator= (const SidiNodeBase &)=delete
 
SidiNodeBaseoperator= (SidiNodeBase &&) noexcept=default
 
bool pointsTo (const SidiNodeBase *elem) const
 
HashTableElementCached< T, TStored > * removeNext ()
 
HashTableElementCached< T, TStored > * removeRangeBehind (HashTableElementCached< T, TStored > *last)
 

Field Details:

◆ [union]

union { ... }

The custom data stored in nodes of this table.

◆ CachedHashCodes

template<typename T , typename TStored >
constexpr bool CachedHashCodes = 1
staticconstexpr

TMP constant that denotes that hash codes are cached.

Definition at line 85 of file hashtablebase.inl.

◆ hashCode

template<typename T , typename TStored >
size_t hashCode

The cached hash code.

Definition at line 94 of file hashtablebase.inl.

◆ value

template<typename T , typename TStored >
TStored value

The value as seen internally.

Definition at line 90 of file hashtablebase.inl.

◆ valueExternal

template<typename T , typename TStored >
T valueExternal

The value as seen externally.

Definition at line 91 of file hashtablebase.inl.

Constructor(s) / Destructor Details::

◆ ~HashTableElementCached()

template<typename T , typename TStored >
~HashTableElementCached ( )
delete

Deleted default destructor. (Needed to avoid warning with msc).

Method Details:

◆ destruct()

template<typename T , typename TStored >
void destruct ( )
inline

Invokes the destructor of templated custom member TStored .

Definition at line 111 of file hashtablebase.inl.

◆ fixHashCode()

template<typename T , typename TStored >
void fixHashCode ( size_t pHashCode)
inline

Stores the given hash code when an element is recycled or extracted and changed.

Parameters
pHashCodeThe new hash code to set for this (recycled) element.

Definition at line 98 of file hashtablebase.inl.

◆ getCached()

template<typename T , typename TStored >
size_t getCached ( )
inline

Returns the cached hash code.

Returns
The hash code of this element.

Definition at line 105 of file hashtablebase.inl.


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