ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Static Fields | Public Fields | Public Methods | List of all members
HashTableElementCached< T, TStored > Struct Template Reference
Inheritance diagram for HashTableElementCached< T, TStored >:
[legend]
Collaboration diagram for HashTableElementCached< T, TStored >:
[legend]

Class Description

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

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

Definition at line 79 of file hashtablebase.inl.

Public Static Fields

static constexpr bool CachedHashCodes = 1
 

Public Fields

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

Public Methods

 ~HashTableElementCached ()=delete
 
void destruct ()
 
void fixHashCode (size_t pHashCode)
 
size_t getCached ()
 
- Public Methods 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)
 

Constructor & Destructor Documentation

◆ ~HashTableElementCached()

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

Member Function Documentation

◆ destruct()

void destruct ( )
inline

Invokes the destructor of templated custom member TStored.

Definition at line 111 of file hashtablebase.inl.

◆ fixHashCode()

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()

size_t getCached ( )
inline

Returns the cached hash code.

Returns
The hash code of this element.

Definition at line 105 of file hashtablebase.inl.

Member Data Documentation

◆ @1

union { ... }

The custom data stored in nodes of this table.

◆ CachedHashCodes

constexpr bool CachedHashCodes = 1
staticconstexpr

TMP constant that denotes that hash codes are cached.

Definition at line 85 of file hashtablebase.inl.


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