ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
HTElementCached< TStored > Struct Template Reference

Description:

template<typename TStored>
struct alib::containers::detail::HTElementCached< TStored >

HashTable element type if hash codes are cached.

Template Parameters
TStoredThe custom data stored.

Definition at line 53 of file hashtablebase.inl.

Inheritance diagram for HTElementCached< TStored >:
[legend]
Collaboration diagram for HTElementCached< TStored >:
[legend]

Public Static Field Index:

static constexpr bool CachedHashCodes = 1
 TMP constant that denotes that hash codes are cached.
 

Public Field Index:

size_t hashCode
 The cached hash code.
 
TStored value
 The custom data stored in nodes of this table.
 
- Public Field Index: inherited from SidiNodeBase< HTElementCached< TStored > >
HTElementCached< TStored > * n
 

Public Method Index:

void fixHashCode (size_t pHashCode)
 
size_t getCached ()
 
- Public Method Index: inherited from SidiNodeBase< HTElementCached< TStored > >
 SidiNodeBase () noexcept=default
 Default constructor. (Does not initialize the pointer.)
 
 SidiNodeBase (const SidiNodeBase &)=delete
 
 SidiNodeBase (HTElementCached< TStored > *next) noexcept
 
 SidiNodeBase (SidiNodeBase &&) noexcept=default
 Defaulted move constructor.
 
HTElementCached< TStored > * addBehind (HTElementCached< TStored > *elem) noexcept
 
integer count (SidiNodeBase *end=nullptr) const noexcept
 
bool hasNext () const
 
HTElementCached< TStored > * next () const
 
void next (SidiNodeBase *p)
 
SidiNodeBaseoperator= (const SidiNodeBase &)=delete
 
SidiNodeBaseoperator= (SidiNodeBase &&) noexcept=default
 
bool pointsTo (const SidiNodeBase *elem) const
 
HTElementCached< TStored > * removeNext () noexcept
 
HTElementCached< TStored > * removeRangeBehind (HTElementCached< TStored > *last) noexcept
 

Field Details:

◆ CachedHashCodes

template<typename TStored >
bool CachedHashCodes = 1
staticconstexpr

TMP constant that denotes that hash codes are cached.

Definition at line 56 of file hashtablebase.inl.

◆ hashCode

template<typename TStored >
size_t hashCode

The cached hash code.

Definition at line 61 of file hashtablebase.inl.

◆ value

template<typename TStored >
TStored value

The custom data stored in nodes of this table.

Definition at line 59 of file hashtablebase.inl.

Method Details:

◆ fixHashCode()

template<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 65 of file hashtablebase.inl.

◆ getCached()

template<typename TStored >
size_t getCached ( )
inline

Returns the cached hash code.

Returns
The hash code of this element.

Definition at line 69 of file hashtablebase.inl.


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