LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::IntrusiveHashMap< H >::Bucket Struct Reference

A bucket for the hash map. More...

#include <IntrusiveHashMap.h>

Collaboration diagram for swoc::IntrusiveHashMap< H >::Bucket:
Collaboration graph

Classes

struct  Linkage
 Support for IntrusiveDList<Bucket::Linkage>, definitions and link storage. More...
 

Public Member Functions

value_typelimit () const
 
bool contains (value_type *v) const
 Verify v is in this bucket.
 
void clear ()
 Reset to initial state.
 

Public Attributes

struct swoc::IntrusiveHashMap::Bucket::Linkage _link
 
value_type_v {nullptr}
 First element in the bucket.
 
size_t _count {0}
 Number of elements in the bucket.
 
bool _mixed_p {false}
 

Detailed Description

template<typename H>
struct swoc::IntrusiveHashMap< H >::Bucket

A bucket for the hash map.

Definition at line 100 of file IntrusiveHashMap.h.

Member Function Documentation

◆ clear()

template<typename H>
void swoc::IntrusiveHashMap< H >::Bucket::clear ( )

Reset to initial state.

Definition at line 338 of file IntrusiveHashMap.h.

◆ contains()

template<typename H>
bool swoc::IntrusiveHashMap< H >::Bucket::contains ( value_type * v) const

Verify v is in this bucket.

Definition at line 348 of file IntrusiveHashMap.h.

◆ limit()

template<typename H>
auto swoc::IntrusiveHashMap< H >::Bucket::limit ( ) const

Compute the limit value for iteration in this bucket. This is the value of the next bucket, or nullptr if no next bucket.

Definition at line 331 of file IntrusiveHashMap.h.

Member Data Documentation

◆ _count

template<typename H>
size_t swoc::IntrusiveHashMap< H >::Bucket::_count {0}

Number of elements in the bucket.

Definition at line 110 of file IntrusiveHashMap.h.

◆ _mixed_p

template<typename H>
bool swoc::IntrusiveHashMap< H >::Bucket::_mixed_p {false}

Marker for the chain having different keys.

This is used to determine if expanding the hash map would be useful - buckets that are not mixed will not be changed by an expansion.

Definition at line 117 of file IntrusiveHashMap.h.

◆ _v

template<typename H>
value_type* swoc::IntrusiveHashMap< H >::Bucket::_v {nullptr}

First element in the bucket.

Definition at line 109 of file IntrusiveHashMap.h.


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