[#BloombergLP-bdlcc-SkipList-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::SkipList
:relfileprefix: ../../
:mrdocs:

Thread&hyphen;safe ordered associative skip list of key&sol;data pairs&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;skiplist&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY,
    class DATA&gt;
class SkipList;
----

== Description

This class provides a generic thread&hyphen;safe Skip List (an ordered associative container)&period; It supports an almost complete set of _value_ _semantic_ operations, including copy construction, assignment, equality comparison, and `ostream` printing (but not BDEX serialization)&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/SkipList-0a/Pair.adoc[`Pair`] 
| Unmanaged reference to a key&sol;data pair in this list&period;
| xref:BloombergLP/bdlcc/SkipList-0a/PairHandle.adoc[`PairHandle`] 
| Managed handle to a key&sol;data pair in this list&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/SkipList-0a/_04enum.adoc[`Unnamed enum`] 
| Status codes returned by skip&hyphen;list operations&period;
|===


== 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[`&#126;SkipList`] [.small]#[destructor]#
| Destroy this Skip List&period; The behavior is undefined if references are outstanding to any pairs in the list&period;
| xref:BloombergLP/bdlcc/SkipList-0a/operator_assign.adoc[`operator&equals;`] 
| Assign to this list the value of `rhs`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/add-09d.adoc[`add`] 
| `add` overloads
| xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelRaw.adoc[`addAtLevelRaw`] 
| Add a key&sol;data pair at a specified skip&hyphen;list level&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelRawR.adoc[`addAtLevelRawR`] 
| Add a key&sol;data pair at `level`, searching from the back&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelUniqueRaw.adoc[`addAtLevelUniqueRaw`] 
| Add a unique key&sol;data pair at the specified `level`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addAtLevelUniqueRawR.adoc[`addAtLevelUniqueRawR`] 
| Add a unique key&sol;data pair at `level`, searching from the back&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addPairReferenceRaw.adoc[`addPairReferenceRaw`] 
| Increment the reference count for the pair at `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addR-0f.adoc[`addR`] 
| `addR` overloads
| xref:BloombergLP/bdlcc/SkipList-0a/addRaw.adoc[`addRaw`] 
| Add a key&sol;data pair and load a raw reference into `result`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addRawR.adoc[`addRawR`] 
| Add `key`&sol;`data` from the back and load a raw reference&period;
| 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&sol;data pair and load a raw reference&period;
| xref:BloombergLP/bdlcc/SkipList-0a/addUniqueRawR.adoc[`addUniqueRawR`] 
| Add a unique key&sol;data pair and return a raw reference to it&period;
| xref:BloombergLP/bdlcc/SkipList-0a/allocator.adoc[`allocator`] 
| Return the allocator used by this object to supply memory&period;
| xref:BloombergLP/bdlcc/SkipList-0a/back.adoc[`back`] 
| Load a reference to the last item into `back`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/backRaw.adoc[`backRaw`] 
| Load a raw reference to the last item into `back`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/data.adoc[`data`] 
| Load into `value` the data of the pair at `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/exists.adoc[`exists`] 
| Return whether a pair with the specified `key` is in the list&period;
| xref:BloombergLP/bdlcc/SkipList-0a/find.adoc[`find`] 
| Find the element with `key`, searching from the front&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findLowerBound.adoc[`findLowerBound`] 
| Find the lower bound for `key`, searching from the front&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findLowerBoundR.adoc[`findLowerBoundR`] 
| Find the lower bound for `key`, searching from the back&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findLowerBoundRRaw.adoc[`findLowerBoundRRaw`] 
| Find the reverse lower bound for `key`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findLowerBoundRaw.adoc[`findLowerBoundRaw`] 
| Find the lower bound for `key` and load a raw reference&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findR.adoc[`findR`] 
| Find the element with `key`, searching from the back&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findRRaw.adoc[`findRRaw`] 
| Find `key` from the back and load a raw reference into `item`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findRaw.adoc[`findRaw`] 
| Find `key` from the front and load a raw reference into `item`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findUpperBound.adoc[`findUpperBound`] 
| Find the upper bound for `key`, searching from the front&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findUpperBoundR.adoc[`findUpperBoundR`] 
| Find the upper bound for `key`, searching from the back&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findUpperBoundRRaw.adoc[`findUpperBoundRRaw`] 
| Find the reverse upper bound for `key`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/findUpperBoundRaw.adoc[`findUpperBoundRaw`] 
| Find the upper bound for `key` and load a raw reference&period;
| xref:BloombergLP/bdlcc/SkipList-0a/front.adoc[`front`] 
| Load a reference to the first item into `front`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/frontRaw.adoc[`frontRaw`] 
| Load a raw reference to the first item into `front`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/isEmpty.adoc[`isEmpty`] 
| Return `true` if this list is empty, and `false` otherwise&period;
| xref:BloombergLP/bdlcc/SkipList-0a/key.adoc[`key`] 
| Load into `value` the key of the pair at `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/length.adoc[`length`] 
| Return the number of items in this list&period;
| xref:BloombergLP/bdlcc/SkipList-0a/next.adoc[`next`] 
| Load into `next` the list item after `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/nextRaw.adoc[`nextRaw`] 
| Load a raw reference to the item after `reference` into `next`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/popFront.adoc[`popFront`] 
| Remove and return the first item in the list&period;
| xref:BloombergLP/bdlcc/SkipList-0a/popFrontRaw.adoc[`popFrontRaw`] 
| Remove the first item and load a raw reference into `item`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/previous.adoc[`previous`] 
| Load into `prevPair` the pair before `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/previousRaw.adoc[`previousRaw`] 
| Load a raw reference to the pair before `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/print.adoc[`print`] 
| Format this list to the specified output `stream`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/releaseReferenceRaw.adoc[`releaseReferenceRaw`] 
| Release the reference to the pair at `reference`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/remove.adoc[`remove`] 
| Remove the item identified by `reference` from this list&period;
| 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`&period;
| xref:BloombergLP/bdlcc/SkipList-0a/skipBackward.adoc[`skipBackward`] 
| Move `item` to the previous item, or reset it at the front&period;
| xref:BloombergLP/bdlcc/SkipList-0a/skipBackwardRaw.adoc[`skipBackwardRaw`] 
| Move the raw reference `item` to the previous item&period;
| xref:BloombergLP/bdlcc/SkipList-0a/skipForward.adoc[`skipForward`] 
| Advance `item` to the next item in the list&period;
| xref:BloombergLP/bdlcc/SkipList-0a/skipForwardRaw.adoc[`skipForwardRaw`] 
| Advance the raw reference `item` to the next item&period;
| xref:BloombergLP/bdlcc/SkipList-0a/update.adoc[`update`] 
| Assign `newKey` to the pair at `reference`, moving it as needed&period;
| xref:BloombergLP/bdlcc/SkipList-0a/updateR.adoc[`updateR`] 
| Update the key of a pair, searching for position from the back&period;
| xref:BloombergLP/bdlcc/SkipList-0a/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;SkipList, UsesBslmaAllocator&gt;`] 
| Return the nested trait declaration for this skip&hyphen;list type&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/SkipList-0a/level.adoc[`level`] 
| Return the skip&hyphen;list level of the pair at `reference`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlcc/operator_not_eq-03.adoc[BloombergLP::bdlcc::operator!&equals;]`
| Return `true` if the specified lists have different values&period;
| `xref:BloombergLP/bdlcc/operator_eq-0e.adoc[BloombergLP::bdlcc::operator&equals;&equals;]`
| Return `true` if the specified lists have the same value&period;
| `xref:BloombergLP/bdlcc/SkipListPairHandle.adoc[BloombergLP::bdlcc::SkipListPairHandle]`
| Managed handle to a key&sol;data pair in a `SkipList`&period;
| `xref:BloombergLP/bdlcc/SkipListPair.adoc[BloombergLP::bdlcc::SkipListPair]`
| Type&hyphen;safe pointer to a key&sol;data pair in a `SkipList`&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/operator_not_eq-0e.adoc[`operator!&equals;`]
| Return whether `lhs` and `rhs` have different values&period;
| xref:BloombergLP/bdlcc/operator_eq-05.adoc[`operator&equals;&equals;`]
| Return whether `lhs` and `rhs` have the same value&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
