BloombergLP::bdlcc::SkipList::addAtLevelRaw

Add a key/data pair at a specified skip-list level.

Synopsis

Declared in <bdlcc_skiplist.h>

void
addAtLevelRaw(
    Pair** result,
    int level,
    KEY const& key,
    DATA const& data,
    bool* newFrontFlag = 0);

Description

Add the specified key / data pair to this list at the specified level, and load into the specified result a reference to the pair in the list. The result reference must be released (using releaseReferenceRaw) when it is no longer needed. Load into the the optionally specified newFrontFlag a true value if the pair is at the front of the list, and a false value otherwise. The behavior is undefined if level is greater than the implementation-defined maximum level of this class, or if level is negative. Note that this method is provided for testing purposes.

Parameters

NameDescription
resultlocation for a raw reference to the inserted pair
levelskip-list level at which to insert
keykey of the pair
datadata associated with key
newFrontFlagif non-null, set to whether the pair is at the front