Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QHashPrivate::Data< Node > Struct Template Reference

#include <qhash.h>

Collaboration diagram for QHashPrivate::Data< Node >:

Classes

struct  Bucket
struct  InsertionResult

Public Types

using Key = typename Node::KeyType
using T = typename Node::ValueType
using Span = QHashPrivate::Span<Node>
using iterator = QHashPrivate::iterator<Node>

Public Member Functions

 Data (size_t reserve=0)
template<bool Resized>
Q_ALWAYS_INLINE void reallocationHelper (const Data &other, size_t nSpans)
 Data (const Data &other)
 Data (const Data &other, size_t reserved)
void clear ()
iterator detachedIterator (iterator other) const noexcept
iterator begin () const noexcept
constexpr iterator end () const noexcept
void rehash (size_t sizeHint=0)
size_t nextBucket (size_t bucket) const noexcept
float loadFactor () const noexcept
bool shouldGrow () const noexcept
template<typename K>
Bucket findBucket (const K &key) const noexcept
template<typename K>
Bucket findBucketWithHash (const K &key, size_t hash) const noexcept
template<typename K>
NodefindNode (const K &key) const noexcept
template<typename K>
InsertionResult findOrInsert (const K &key) noexcept
void erase (Bucket bucket) noexcept(std::is_nothrow_destructible< Node >::value)
 ~Data ()

Static Public Member Functions

static constexpr size_t maxNumBuckets () noexcept
static auto allocateSpans (size_t numBuckets)
static Datadetached (Data *d)
static Datadetached (Data *d, size_t size)

Public Attributes

QtPrivate::RefCount ref = {{1}}
size_t size = 0
size_t numBuckets = 0
size_t seed = 0
Spanspans = nullptr

Detailed Description

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

Definition at line 449 of file qhash.h.

Member Typedef Documentation

◆ iterator

Definition at line 454 of file qhash.h.

◆ Key

template<typename Node>
using QHashPrivate::Data< Node >::Key = typename Node::KeyType

Definition at line 451 of file qhash.h.

◆ Span

template<typename Node>
using QHashPrivate::Data< Node >::Span = QHashPrivate::Span<Node>

Definition at line 453 of file qhash.h.

◆ T

template<typename Node>
using QHashPrivate::Data< Node >::T = typename Node::ValueType

Definition at line 452 of file qhash.h.

Constructor & Destructor Documentation

◆ Data() [1/3]

template<typename Node>
QHashPrivate::Data< Node >::Data ( size_t reserve = 0)
inline

Definition at line 555 of file qhash.h.

◆ Data() [2/3]

template<typename Node>
QHashPrivate::Data< Node >::Data ( const Data< Node > & other)
inline

Definition at line 582 of file qhash.h.

References spans.

◆ Data() [3/3]

template<typename Node>
QHashPrivate::Data< Node >::Data ( const Data< Node > & other,
size_t reserved )
inline

Definition at line 588 of file qhash.h.

◆ ~Data()

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

Definition at line 782 of file qhash.h.

References spans.

Member Function Documentation

◆ allocateSpans()

template<typename Node>
auto QHashPrivate::Data< Node >::allocateSpans ( size_t numBuckets)
inlinestatic

Definition at line 536 of file qhash.h.

◆ begin()

template<typename Node>
iterator QHashPrivate::Data< Node >::begin ( ) const
inlinenoexcept

Definition at line 628 of file qhash.h.

◆ clear()

template<typename Node>
void QHashPrivate::Data< Node >::clear ( )
inline

Definition at line 615 of file qhash.h.

References spans.

◆ detached() [1/2]

template<typename Node>
Data * QHashPrivate::Data< Node >::detached ( Data< Node > * d)
inlinestatic

Definition at line 596 of file qhash.h.

◆ detached() [2/2]

template<typename Node>
Data * QHashPrivate::Data< Node >::detached ( Data< Node > * d,
size_t size )
inlinestatic

Definition at line 605 of file qhash.h.

◆ detachedIterator()

template<typename Node>
iterator QHashPrivate::Data< Node >::detachedIterator ( iterator other) const
inlinenoexcept

Definition at line 623 of file qhash.h.

◆ end()

template<typename Node>
iterator QHashPrivate::Data< Node >::end ( ) const
inlineconstexprnoexcept

Definition at line 636 of file qhash.h.

◆ erase()

template<typename Node>
void QHashPrivate::Data< Node >::erase ( Bucket bucket)
inlinenoexcept

Definition at line 747 of file qhash.h.

◆ findBucket()

template<typename Node>
template<typename K>
Bucket QHashPrivate::Data< Node >::findBucket ( const K & key) const
inlinenoexcept

Definition at line 686 of file qhash.h.

◆ findBucketWithHash()

template<typename Node>
template<typename K>
Bucket QHashPrivate::Data< Node >::findBucketWithHash ( const K & key,
size_t hash ) const
inlinenoexcept

Definition at line 692 of file qhash.h.

◆ findNode()

template<typename Node>
template<typename K>
Node * QHashPrivate::Data< Node >::findNode ( const K & key) const
inlinenoexcept

Definition at line 713 of file qhash.h.

◆ findOrInsert()

template<typename Node>
template<typename K>
InsertionResult QHashPrivate::Data< Node >::findOrInsert ( const K & key)
inlinenoexcept

Definition at line 727 of file qhash.h.

References shouldGrow().

Here is the call graph for this function:

◆ loadFactor()

template<typename Node>
float QHashPrivate::Data< Node >::loadFactor ( ) const
inlinenoexcept

Definition at line 677 of file qhash.h.

◆ maxNumBuckets()

template<typename Node>
constexpr size_t QHashPrivate::Data< Node >::maxNumBuckets ( )
inlinestaticconstexprnoexcept

Definition at line 462 of file qhash.h.

◆ nextBucket()

template<typename Node>
size_t QHashPrivate::Data< Node >::nextBucket ( size_t bucket) const
inlinenoexcept

Definition at line 669 of file qhash.h.

◆ reallocationHelper()

template<typename Node>
template<bool Resized>
Q_ALWAYS_INLINE void QHashPrivate::Data< Node >::reallocationHelper ( const Data< Node > & other,
size_t nSpans )
inline

Definition at line 566 of file qhash.h.

References spans.

◆ rehash()

template<typename Node>
void QHashPrivate::Data< Node >::rehash ( size_t sizeHint = 0)
inline

Definition at line 641 of file qhash.h.

References spans.

◆ shouldGrow()

template<typename Node>
bool QHashPrivate::Data< Node >::shouldGrow ( ) const
inlinenoexcept

Definition at line 681 of file qhash.h.

Referenced by findOrInsert().

Here is the caller graph for this function:

Member Data Documentation

◆ numBuckets

template<typename Node>
size_t QHashPrivate::Data< Node >::numBuckets = 0

Definition at line 458 of file qhash.h.

◆ ref

template<typename Node>
QtPrivate::RefCount QHashPrivate::Data< Node >::ref = {{1}}

Definition at line 456 of file qhash.h.

◆ seed

template<typename Node>
size_t QHashPrivate::Data< Node >::seed = 0

Definition at line 459 of file qhash.h.

◆ size

template<typename Node>
size_t QHashPrivate::Data< Node >::size = 0

Definition at line 457 of file qhash.h.

◆ spans


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