BloombergLP::bdlcc::SkipList::updateR

Update the key of a pair, searching for position from the back.

Synopsis

Declared in <bdlcc_skiplist.h>

int
updateR(
    Pair const* reference,
    KEY const& newKey,
    bool* newFrontFlag = 0,
    bool allowDuplicates = true);

Description

Search for the new position from the back of the list (in descending order by key value). Load into the optionally specified newFrontFlag a true value if the new location of the pair is the front of the list. Return 0 on success, e_NOT_FOUND if the pair referred to by reference is no longer in the list, or e_DUPLICATE if the optionally specified allowDuplicates is false and newKey already appears in the list.

Return Value

0 on success, or a non-zero status code on failure

Parameters

NameDescription
referencepair in this list
newKeynew key assigned to the pair
newFrontFlagif non-null, set to whether the pair is at the front
allowDuplicateswhether duplicate keys are allowed