ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::containers::detail::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 41 of file hashtablebase.inl.

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

Public Static Field Index:

static constexpr bool CachedHashCodes = 1
 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 alib::lang::SidiNodeBase< HTElementCached< TStored > >
HTElementCached< TStored > * n
 

Public Method Index:

void fixHashCode (size_t pHashCode)
 
size_t getCached ()
 
- Public Method Index: inherited from alib::lang::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 alib::containers::detail::HTElementCached< TStored >::CachedHashCodes = 1
staticconstexpr

Denotes that hash codes are cached.

Definition at line 44 of file hashtablebase.inl.

◆ hashCode

template<typename TStored>
size_t alib::containers::detail::HTElementCached< TStored >::hashCode

The cached hash code.

Definition at line 49 of file hashtablebase.inl.

◆ value

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

The custom data stored in nodes of this table.

Definition at line 47 of file hashtablebase.inl.

Method Details:

◆ fixHashCode()

template<typename TStored>
void alib::containers::detail::HTElementCached< TStored >::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 53 of file hashtablebase.inl.

◆ getCached()

template<typename TStored>
size_t alib::containers::detail::HTElementCached< TStored >::getCached ( )
inline

Returns the cached hash code.

Returns
The hash code of this element.

Definition at line 57 of file hashtablebase.inl.


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