BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg::HashTableBucket Struct Reference

#include <bslalg_hashtablebucket.h>

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (HashTableBucket, bslmf::IsBitwiseCopyable)
 
void setFirst (BidirectionalLink *node)
 
void setLast (BidirectionalLink *node)
 
void setFirstAndLast (BidirectionalLink *first, BidirectionalLink *last)
 
void reset ()
 Set first and last to a null pointer value.
 
BidirectionalLinkend () const
 
BidirectionalLinkfirst () const
 
BidirectionalLinklast () const
 
std::size_t countElements () const
 Return the number of nodes in this hash bucket.
 

Public Attributes

BidirectionalLinkd_first_p
 
BidirectionalLinkd_last_p
 

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION()

bslalg::HashTableBucket::BSLMF_NESTED_TRAIT_DECLARATION ( HashTableBucket  ,
bslmf::IsBitwiseCopyable   
)

◆ countElements()

std::size_t bslalg::HashTableBucket::countElements ( ) const

◆ end()

BidirectionalLink * bslalg::HashTableBucket::end ( ) const
inline

Return the next node after the end of this bucket, or 0 if 0 == last(), so the range to traverse to traverse all nodes in the bucket is always [ first(), end() ) regardless of whether the bucket is empty.

◆ first()

BidirectionalLink * bslalg::HashTableBucket::first ( ) const
inline

Return the address of the first element in this hash bucket, or a null pointer value if the bucket is empty.

◆ last()

BidirectionalLink * bslalg::HashTableBucket::last ( ) const
inline

Return the address of the last element in this hash bucket, or a null pointer value if the bucket is empty.

◆ reset()

void bslalg::HashTableBucket::reset ( )
inline

◆ setFirst()

void bslalg::HashTableBucket::setFirst ( BidirectionalLink node)
inline

Set the first element of this bucket to the specified node. The behavior is undefined unless node is an element from the same bidirectional list as the last element in this bucket, and node either precedes last in that list, or is the same node, or this bucket is empty and node has a null pointer value.

◆ setFirstAndLast()

void bslalg::HashTableBucket::setFirstAndLast ( BidirectionalLink first,
BidirectionalLink last 
)
inline

Set first and last to the specified values. Behavior is undefined unless unless first == last, or unless first and last are links from the same list, where first precedes last in the list. Note that first and last may both have a null pointer value, indicating an empty bucket.

◆ setLast()

void bslalg::HashTableBucket::setLast ( BidirectionalLink node)
inline

Set the last element of this bucket to the specified node. The behavior is undefined unless node is an element from the same bidirectional list as the first element in this bucket, and node either follows first in that list, or is the same node, or this bucket is empty and node has a null pointer value.

Member Data Documentation

◆ d_first_p

BidirectionalLink* bslalg::HashTableBucket::d_first_p

◆ d_last_p

BidirectionalLink* bslalg::HashTableBucket::d_last_p

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