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

Name

Description

reference

pair in this list

newKey

new key assigned to the pair

newFrontFlag

if non‐null, set to whether the pair is at the front

allowDuplicates

whether duplicate keys are allowed

Created with MrDocs