[#BloombergLP-bdlcc-Deque]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::Deque
:relfileprefix: ../../
:mrdocs:

This class provides a fully thread&hyphen;safe implementation of an efficient, in&hyphen;place, indexable, double&hyphen;ended queue of (template parameter) `TYPE` values&period; Direct access to the underlying `bsl&colon;&colon;deque&lt;TYPE&gt;` object is provided through the nested `Proctor` and `ConstProctor` classes&period; While this class is not value&hyphen;semantic, the underlying `bsl&colon;&colon;deque&lt;TYPE&gt;` class is&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class Deque;
----

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Deque/ConstProctor.adoc[`ConstProctor`] 
| This class defines a proctor type that provides direct const access to the underlying `bsl&colon;&colon;deque` contained in a `Deque`&period;
| xref:BloombergLP/bdlcc/Deque/Proctor.adoc[`Proctor`] 
| This class defines a proctor type that provides direct access to the underlying `bsl&colon;&colon;deque` contained in a `Deque`&period; Creation of a `Proctor` object locks the mutex of the `Deque`, and destruction unlocks it&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Deque/MonoDeque.adoc[`MonoDeque`] 
| Underlying non&hyphen;thread&hyphen;safe deque type&period;
| xref:BloombergLP/bdlcc/Deque/size_type.adoc[`size&lowbar;type`] 
| Unsigned type used for sizes and indexes&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Deque/2constructor-0c.adoc[`Deque`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlcc/Deque/2destructor.adoc[`&#126;Deque`] [.small]#[destructor]#
| Destroy this container&period; The behavior is undefined unless all access or modification of the container has completed prior to the destruction of this object&period;
| xref:BloombergLP/bdlcc/Deque/allocator.adoc[`allocator`] 
| Return the allocator used by this container for allocating memory&period;
| xref:BloombergLP/bdlcc/Deque/clockType.adoc[`clockType`] 
| Return the system clock type used for timing `timed&ast;` operations on this object (see &lcub;Supported Clock&hyphen;Types&rcub; in the component documentation)&period;
| xref:BloombergLP/bdlcc/Deque/forcePushBack-0d.adoc[`forcePushBack`] 
| `forcePushBack` overloads
| xref:BloombergLP/bdlcc/Deque/forcePushFront-0a.adoc[`forcePushFront`] 
| `forcePushFront` overloads
| xref:BloombergLP/bdlcc/Deque/highWaterMark.adoc[`highWaterMark`] 
| Return the high&hyphen;water mark value for this container&period;
| xref:BloombergLP/bdlcc/Deque/length.adoc[`length`] 
| Return the number of elements contained in this container&period; Note that this method temporarily acquires the mutex, so that this method must not be called while a proctor in the same thread has this container locked, and the value returned is potentially obsolete before it is returned if any other threads are simultaneously modifying this container&period; To find the length while a proctor has the container locked, call `proctor&hyphen;&gt;size()`&period;
| xref:BloombergLP/bdlcc/Deque/popBack-0f.adoc[`popBack`] 
| `popBack` overloads
| xref:BloombergLP/bdlcc/Deque/popFront-02.adoc[`popFront`] 
| `popFront` overloads
| xref:BloombergLP/bdlcc/Deque/pushBack-02.adoc[`pushBack`] 
| `pushBack` overloads
| xref:BloombergLP/bdlcc/Deque/pushFront-08d.adoc[`pushFront`] 
| `pushFront` overloads
| xref:BloombergLP/bdlcc/Deque/removeAll-09.adoc[`removeAll`] 
| `removeAll` overloads
| xref:BloombergLP/bdlcc/Deque/timedPopBack.adoc[`timedPopBack`] 
| Remove the last item in this container and load that item value into the specified `&ast;item`&period; If this container is empty, block until an item is available or until the specified `timeout` (expressed as the *ABSOLUTE* time from 00&colon;00&colon;00 UTC, January 1, 1970) expires&period; Return 0 on success, and a non&hyphen;zero value if the call timed out before an item was available&period; Note that this method can block indefinitely if another thread has the mutex locked, particularly by a proctor object &hyphen;&hyphen; there is no guarantee that this method will return after `timeout`&period;
| xref:BloombergLP/bdlcc/Deque/timedPopFront.adoc[`timedPopFront`] 
| Remove the first item in this container and load that item value into the specified `&ast;item`&period; If this container is empty, block until an item is available or until the specified `timeout` (expressed as the *ABSOLUTE* time from 00&colon;00&colon;00 UTC, January 1, 1970) expires&period; Return 0 on success, and a non&hyphen;zero value if the call timed out before an item was available&period; Note that this method can block indefinitely if another thread has the mutex locked, particularly by a proctor object &hyphen;&hyphen; there is no guarantee that this method will return after `timeout`&period;
| xref:BloombergLP/bdlcc/Deque/timedPushBack-06.adoc[`timedPushBack`] 
| `timedPushBack` overloads
| xref:BloombergLP/bdlcc/Deque/timedPushFront-02.adoc[`timedPushFront`] 
| `timedPushFront` overloads
| xref:BloombergLP/bdlcc/Deque/tryPopBack-0ca.adoc[`tryPopBack`] 
| `tryPopBack` overloads
| xref:BloombergLP/bdlcc/Deque/tryPopFront-03.adoc[`tryPopFront`] 
| `tryPopFront` overloads
| xref:BloombergLP/bdlcc/Deque/tryPushBack-01.adoc[`tryPushBack`] 
| `tryPushBack` overloads
| xref:BloombergLP/bdlcc/Deque/tryPushFront-024.adoc[`tryPushFront`] 
| `tryPushFront` overloads
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/Deque/maxSizeT.adoc[`maxSizeT`] 
| Return the maximum value that can be stored in a veriable of type `size&lowbar;type`&period; The high water mark defaults to having this value&period;
|===



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