[#BloombergLP-bdlcc-SkipList-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::SkipList :relfileprefix: ../../ :mrdocs: Thread‐safe ordered associative skip list of key/data pairs. == Synopsis Declared in `<bdlcc_skiplist.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class DATA> class SkipList; ---- == Description This class provides a generic thread‐safe Skip List (an ordered associative container). It supports an almost complete set of _value_ _semantic_ operations, including copy construction, assignment, equality comparison, and `ostream` printing (but not BDEX serialization). == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SkipList-0a/Pair.adoc[`Pair`] | Unmanaged reference to a key/data pair in this list. | xref:BloombergLP/bdlcc/SkipList-0a/PairHandle.adoc[`PairHandle`] | Managed handle to a key/data pair in this list. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SkipList-0a/_04enum.adoc[`Unnamed enum`] | Status codes returned by skip‐list operations. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SkipList-0a/2constructor-0a.adoc[`SkipList`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlcc/SkipList-0a/2destructor.adoc[`~SkipList`] [.small]#[destructor]# | Destroy this Skip List. The behavior is undefined if references are outstanding to any pairs in the list. | xref:BloombergLP/bdlcc/SkipList-0a/operator_assign.adoc[`operator=`] | Assign to this list the value of `rhs`. | xref:BloombergLP/bdlcc/SkipList-0a/add-09d.adoc[`add`] | `add` overloads | xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelRaw.adoc[`addAtLevelRaw`] | Add a key/data pair at a specified skip‐list level. | xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelRawR.adoc[`addAtLevelRawR`] | Add a key/data pair at `level`, searching from the back. | xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelUniqueRaw.adoc[`addAtLevelUniqueRaw`] | Add a unique key/data pair at the specified `level`. | xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelUniqueRawR.adoc[`addAtLevelUniqueRawR`] | Add a unique key/data pair at `level`, searching from the back. | xref:BloombergLP/bdlcc/SkipList-0a/addPairReferenceRaw.adoc[`addPairReferenceRaw`] | Increment the reference count for the pair at `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/addR-0f.adoc[`addR`] | `addR` overloads | xref:BloombergLP/bdlcc/SkipList-0a/addRaw.adoc[`addRaw`] | Add a key/data pair and load a raw reference into `result`. | xref:BloombergLP/bdlcc/SkipList-0a/addRawR.adoc[`addRawR`] | Add `key`/`data` from the back and load a raw reference. | xref:BloombergLP/bdlcc/SkipList-0a/addUnique-03.adoc[`addUnique`] | `addUnique` overloads | xref:BloombergLP/bdlcc/SkipList-0a/addUniqueR-09.adoc[`addUniqueR`] | `addUniqueR` overloads | xref:BloombergLP/bdlcc/SkipList-0a/addUniqueRaw.adoc[`addUniqueRaw`] | Add a unique key/data pair and load a raw reference. | xref:BloombergLP/bdlcc/SkipList-0a/addUniqueRawR.adoc[`addUniqueRawR`] | Add a unique key/data pair and return a raw reference to it. | xref:BloombergLP/bdlcc/SkipList-0a/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bdlcc/SkipList-0a/back.adoc[`back`] | Load a reference to the last item into `back`. | xref:BloombergLP/bdlcc/SkipList-0a/backRaw.adoc[`backRaw`] | Load a raw reference to the last item into `back`. | xref:BloombergLP/bdlcc/SkipList-0a/data.adoc[`data`] | Load into `value` the data of the pair at `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/exists.adoc[`exists`] | Return whether a pair with the specified `key` is in the list. | xref:BloombergLP/bdlcc/SkipList-0a/find.adoc[`find`] | Find the element with `key`, searching from the front. | xref:BloombergLP/bdlcc/SkipList-0a/findLowerBound.adoc[`findLowerBound`] | Find the lower bound for `key`, searching from the front. | xref:BloombergLP/bdlcc/SkipList-0a/findLowerBoundR.adoc[`findLowerBoundR`] | Find the lower bound for `key`, searching from the back. | xref:BloombergLP/bdlcc/SkipList-0a/findLowerBoundRRaw.adoc[`findLowerBoundRRaw`] | Find the reverse lower bound for `key`. | xref:BloombergLP/bdlcc/SkipList-0a/findLowerBoundRaw.adoc[`findLowerBoundRaw`] | Find the lower bound for `key` and load a raw reference. | xref:BloombergLP/bdlcc/SkipList-0a/findR.adoc[`findR`] | Find the element with `key`, searching from the back. | xref:BloombergLP/bdlcc/SkipList-0a/findRRaw.adoc[`findRRaw`] | Find `key` from the back and load a raw reference into `item`. | xref:BloombergLP/bdlcc/SkipList-0a/findRaw.adoc[`findRaw`] | Find `key` from the front and load a raw reference into `item`. | xref:BloombergLP/bdlcc/SkipList-0a/findUpperBound.adoc[`findUpperBound`] | Find the upper bound for `key`, searching from the front. | xref:BloombergLP/bdlcc/SkipList-0a/findUpperBoundR.adoc[`findUpperBoundR`] | Find the upper bound for `key`, searching from the back. | xref:BloombergLP/bdlcc/SkipList-0a/findUpperBoundRRaw.adoc[`findUpperBoundRRaw`] | Find the reverse upper bound for `key`. | xref:BloombergLP/bdlcc/SkipList-0a/findUpperBoundRaw.adoc[`findUpperBoundRaw`] | Find the upper bound for `key` and load a raw reference. | xref:BloombergLP/bdlcc/SkipList-0a/front.adoc[`front`] | Load a reference to the first item into `front`. | xref:BloombergLP/bdlcc/SkipList-0a/frontRaw.adoc[`frontRaw`] | Load a raw reference to the first item into `front`. | xref:BloombergLP/bdlcc/SkipList-0a/isEmpty.adoc[`isEmpty`] | Return `true` if this list is empty, and `false` otherwise. | xref:BloombergLP/bdlcc/SkipList-0a/key.adoc[`key`] | Load into `value` the key of the pair at `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/length.adoc[`length`] | Return the number of items in this list. | xref:BloombergLP/bdlcc/SkipList-0a/next.adoc[`next`] | Load into `next` the list item after `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/nextRaw.adoc[`nextRaw`] | Load a raw reference to the item after `reference` into `next`. | xref:BloombergLP/bdlcc/SkipList-0a/popFront.adoc[`popFront`] | Remove and return the first item in the list. | xref:BloombergLP/bdlcc/SkipList-0a/popFrontRaw.adoc[`popFrontRaw`] | Remove the first item and load a raw reference into `item`. | xref:BloombergLP/bdlcc/SkipList-0a/previous.adoc[`previous`] | Load into `prevPair` the pair before `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/previousRaw.adoc[`previousRaw`] | Load a raw reference to the pair before `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/print.adoc[`print`] | Format this list to the specified output `stream`. | xref:BloombergLP/bdlcc/SkipList-0a/releaseReferenceRaw.adoc[`releaseReferenceRaw`] | Release the reference to the pair at `reference`. | xref:BloombergLP/bdlcc/SkipList-0a/remove.adoc[`remove`] | Remove the item identified by `reference` from this list. | xref:BloombergLP/bdlcc/SkipList-0a/removeAll-0e.adoc[`removeAll`] | `removeAll` overloads | xref:BloombergLP/bdlcc/SkipList-0a/removeAllRaw-08.adoc[`removeAllRaw`] | Remove all items and append raw references to `removed`. | xref:BloombergLP/bdlcc/SkipList-0a/skipBackward.adoc[`skipBackward`] | Move `item` to the previous item, or reset it at the front. | xref:BloombergLP/bdlcc/SkipList-0a/skipBackwardRaw.adoc[`skipBackwardRaw`] | Move the raw reference `item` to the previous item. | xref:BloombergLP/bdlcc/SkipList-0a/skipForward.adoc[`skipForward`] | Advance `item` to the next item in the list. | xref:BloombergLP/bdlcc/SkipList-0a/skipForwardRaw.adoc[`skipForwardRaw`] | Advance the raw reference `item` to the next item. | xref:BloombergLP/bdlcc/SkipList-0a/update.adoc[`update`] | Assign `newKey` to the pair at `reference`, moving it as needed. | xref:BloombergLP/bdlcc/SkipList-0a/updateR.adoc[`updateR`] | Update the key of a pair, searching for position from the back. | xref:BloombergLP/bdlcc/SkipList-0a/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<SkipList, UsesBslmaAllocator>`] | Return the nested trait declaration for this skip‐list type. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/SkipList-0a/level.adoc[`level`] | Return the skip‐list level of the pair at `reference`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlcc/operator_not_eq-03.adoc[BloombergLP::bdlcc::operator!=]` | Return `true` if the specified lists have different values. | `xref:BloombergLP/bdlcc/operator_eq-0e.adoc[BloombergLP::bdlcc::operator==]` | Return `true` if the specified lists have the same value. | `xref:BloombergLP/bdlcc/SkipListPairHandle.adoc[BloombergLP::bdlcc::SkipListPairHandle]` | Managed handle to a key/data pair in a `SkipList`. | `xref:BloombergLP/bdlcc/SkipListPair.adoc[BloombergLP::bdlcc::SkipListPair]` | Type‐safe pointer to a key/data pair in a `SkipList`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/operator_not_eq-0e.adoc[`operator!=`] | Return whether `lhs` and `rhs` have different values. | xref:BloombergLP/bdlcc/operator_eq-05.adoc[`operator==`] | Return whether `lhs` and `rhs` have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#