BloombergLP::bdlcc::SkipList::update

Assign newKey to the pair at reference, moving it as needed.

Synopsis

Declared in <bdlcc_skiplist.h>

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

Description

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