Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Public Attributes

bslalg::HashTableBucket Struct Reference

#include <bslalg_hashtablebucket.h>

List of all members.

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (HashTableBucket, bsl::is_trivially_copyable)
void setFirst (BidirectionalLink *node)
void setLast (BidirectionalLink *node)
void setFirstAndLast (BidirectionalLink *first, BidirectionalLink *last)
void reset ()
BidirectionalLinkend () const
BidirectionalLinkfirst () const
BidirectionalLinklast () const
std::size_t countElements () const

Public Attributes

BidirectionalLinkd_first_p
BidirectionalLinkd_last_p

Member Function Documentation

bslalg::HashTableBucket::BSLMF_NESTED_TRAIT_DECLARATION ( HashTableBucket  ,
bsl::is_trivially_copyable   
)
void bslalg::HashTableBucket::setFirst ( BidirectionalLink node  ) 

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.

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

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.

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

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.

void bslalg::HashTableBucket::reset (  ) 

Set first and last to a null pointer value.

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

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.

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

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

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

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

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

Return the number of nodes in this hash bucket.


Member Data Documentation


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