Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QHashPrivate::Span< Node > Struct Template Reference

#include <qhash.h>

+ Collaboration diagram for QHashPrivate::Span< Node >:

Classes

struct  Entry
 

Public Member Functions

 Span () noexcept
 
 ~Span ()
 
void freeData () noexcept(std::is_nothrow_destructible< Node >::value)
 
Nodeinsert (size_t i)
 
void erase (size_t bucket) noexcept(std::is_nothrow_destructible< Node >::value)
 
size_t offset (size_t i) const noexcept
 
bool hasNode (size_t i) const noexcept
 
Nodeat (size_t i) noexcept
 
const Nodeat (size_t i) const noexcept
 
NodeatOffset (size_t o) noexcept
 
const NodeatOffset (size_t o) const noexcept
 
void moveLocal (size_t from, size_t to) noexcept
 
void moveFromSpan (Span &fromSpan, size_t fromIndex, size_t to) noexcept(std::is_nothrow_move_constructible_v< Node >)
 
void addStorage ()
 

Public Attributes

unsigned char offsets [SpanConstants::NEntries]
 
Entryentries = nullptr
 
unsigned char allocated = 0
 
unsigned char nextFree = 0
 

Detailed Description

template<typename Node>
struct QHashPrivate::Span< Node >

Definition at line 239 of file qhash.h.

Constructor & Destructor Documentation

◆ Span()

template<typename Node >
QHashPrivate::Span< Node >::Span ( )
inlinenoexcept

Definition at line 257 of file qhash.h.

References QHashPrivate::SpanConstants::UnusedEntry.

◆ ~Span()

template<typename Node >
QHashPrivate::Span< Node >::~Span ( )
inline

Definition at line 261 of file qhash.h.

References QHashPrivate::Span< Node >::freeData().

+ Here is the call graph for this function:

Member Function Documentation

◆ addStorage()

template<typename Node >
void QHashPrivate::Span< Node >::addStorage ( )
inline

Definition at line 370 of file qhash.h.

References QHashPrivate::Span< Node >::allocated, QHashPrivate::Span< Node >::entries, i, QHashPrivate::SpanConstants::NEntries, QHashPrivate::Span< Node >::Entry::nextFree(), QHashPrivate::Span< Node >::nextFree, QHashPrivate::Span< Node >::Entry::node(), and Q_ASSERT.

Referenced by QHashPrivate::Span< Node >::insert(), and QHashPrivate::Span< Node >::moveFromSpan().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ at() [1/2]

template<typename Node >
const Node & QHashPrivate::Span< Node >::at ( size_t i) const
inlinenoexcept

Definition at line 317 of file qhash.h.

References QHashPrivate::Span< Node >::entries, i, QHashPrivate::SpanConstants::NEntries, QHashPrivate::Span< Node >::Entry::node(), Q_ASSERT, and QHashPrivate::SpanConstants::UnusedEntry.

+ Here is the call graph for this function:

◆ at() [2/2]

template<typename Node >
Node & QHashPrivate::Span< Node >::at ( size_t i)
inlinenoexcept

Definition at line 310 of file qhash.h.

References QHashPrivate::Span< Node >::entries, i, QHashPrivate::SpanConstants::NEntries, QHashPrivate::Span< Node >::Entry::node(), Q_ASSERT, and QHashPrivate::SpanConstants::UnusedEntry.

+ Here is the call graph for this function:

◆ atOffset() [1/2]

template<typename Node >
const Node & QHashPrivate::Span< Node >::atOffset ( size_t o) const
inlinenoexcept

Definition at line 330 of file qhash.h.

References QHashPrivate::Span< Node >::allocated, QHashPrivate::Span< Node >::entries, QHashPrivate::Span< Node >::Entry::node(), o, and Q_ASSERT.

+ Here is the call graph for this function:

◆ atOffset() [2/2]

template<typename Node >
Node & QHashPrivate::Span< Node >::atOffset ( size_t o)
inlinenoexcept

Definition at line 324 of file qhash.h.

References QHashPrivate::Span< Node >::allocated, QHashPrivate::Span< Node >::entries, QHashPrivate::Span< Node >::Entry::node(), o, and Q_ASSERT.

+ Here is the call graph for this function:

◆ erase()

template<typename Node >
void QHashPrivate::Span< Node >::erase ( size_t bucket)
inlinenoexcept

Definition at line 290 of file qhash.h.

References QHashPrivate::Span< Node >::entries, QHashPrivate::SpanConstants::NEntries, QHashPrivate::Span< Node >::Entry::nextFree(), QHashPrivate::Span< Node >::nextFree, QHashPrivate::Span< Node >::Entry::node(), Q_ASSERT, and QHashPrivate::SpanConstants::UnusedEntry.

+ Here is the call graph for this function:

◆ freeData()

template<typename Node >
void QHashPrivate::Span< Node >::freeData ( )
inlinenoexcept

Definition at line 265 of file qhash.h.

References QHashPrivate::Span< Node >::entries, QHashPrivate::Span< Node >::Entry::node(), o, QHashPrivate::Span< Node >::offsets, and QHashPrivate::SpanConstants::UnusedEntry.

Referenced by QHashPrivate::Span< Node >::~Span().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasNode()

template<typename Node >
bool QHashPrivate::Span< Node >::hasNode ( size_t i) const
inlinenoexcept

Definition at line 306 of file qhash.h.

References i, and QHashPrivate::SpanConstants::UnusedEntry.

◆ insert()

template<typename Node >
Node * QHashPrivate::Span< Node >::insert ( size_t i)
inline

◆ moveFromSpan()

template<typename Node >
void QHashPrivate::Span< Node >::moveFromSpan ( Span< Node > & fromSpan,
size_t fromIndex,
size_t to )
inlinenoexcept

Definition at line 343 of file qhash.h.

References QHashPrivate::Span< Node >::addStorage(), QHashPrivate::Span< Node >::allocated, QHashPrivate::Span< Node >::entries, QHashPrivate::SpanConstants::NEntries, QHashPrivate::Span< Node >::nextFree, Q_ASSERT, and QHashPrivate::SpanConstants::UnusedEntry.

+ Here is the call graph for this function:

◆ moveLocal()

template<typename Node >
void QHashPrivate::Span< Node >::moveLocal ( size_t from,
size_t to )
inlinenoexcept

Definition at line 336 of file qhash.h.

References Q_ASSERT, and QHashPrivate::SpanConstants::UnusedEntry.

◆ offset()

template<typename Node >
size_t QHashPrivate::Span< Node >::offset ( size_t i) const
inlinenoexcept

Definition at line 302 of file qhash.h.

References i.

Member Data Documentation

◆ allocated

◆ entries

◆ nextFree

◆ offsets

template<typename Node >
unsigned char QHashPrivate::Span< Node >::offsets[SpanConstants::NEntries]

Definition at line 253 of file qhash.h.

Referenced by QHashPrivate::Span< Node >::freeData().


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