Insert link into anchor immediately before position.
Synopsis
Declared in <bslalg_hashtableimputil.h>
static
void
insertAtPosition(
HashTableAnchor* anchor,
BidirectionalLink* link,
std::size_t hashCode,
BidirectionalLink* position);
Description
Insert the specified link, having the specified (non‐adjusted) hashCode, into the specified anchor immediately before the specified position in the bi‐directional linked list of anchor. The behavior is undefined unless position is in the bucket having index computeBucketIndex(hashCode, anchor‐>bucketArraySize()) and anchor is well‐formed (see isWellFormed) for some combination of KEY_CONFIG and HASHER such that link refers to a node of type BidirectionalNode<KEY_CONFIG::ValueType> and HASHER(extractKey<KEY_CONFIG>(link)) returns hashCode.
Parameters
Name |
Description |
anchor |
hash table into which to insert |
link |
node to insert |
hashCode |
non‐adjusted hash code of |
position |
existing node before which to insert |
Created with MrDocs