[#BloombergLP-bdlcc-FixedQueue] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::FixedQueue :relfileprefix: ../../ :mrdocs: This class provides a thread‐aware, lock‐free, fixed‐size queue of values. == Synopsis Declared in `<bdlcc_fixedqueue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class FixedQueue; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/FixedQueue/2constructor.adoc[`FixedQueue`] [.small]#[constructor]# | Create a thread‐aware lock‐free queue of the specified `capacity`. | xref:BloombergLP/bdlcc/FixedQueue/2destructor.adoc[`~FixedQueue`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bdlcc/FixedQueue/capacity.adoc[`capacity`] | Return the maximum number of elements that may be stored in this queue. | xref:BloombergLP/bdlcc/FixedQueue/disable.adoc[`disable`] | Disable this queue. | xref:BloombergLP/bdlcc/FixedQueue/enable.adoc[`enable`] | Enable queuing. If the queue is not disabled, this call has no effect. | xref:BloombergLP/bdlcc/FixedQueue/isEmpty.adoc[`isEmpty`] | Return `true` if this queue is empty (has no elements), or `false` otherwise. | xref:BloombergLP/bdlcc/FixedQueue/isEnabled.adoc[`isEnabled`] | Return `true` if this queue is enabled, and `false` otherwise. Note that the queue is created in the "enabled" state. | xref:BloombergLP/bdlcc/FixedQueue/isFull.adoc[`isFull`] | Return `true` if this queue is full (when the number of elements currently in this queue equals its capacity), or `false` otherwise. | xref:BloombergLP/bdlcc/FixedQueue/length.adoc[`length`] | DEPRECATED: Use `numElements()` instead. | xref:BloombergLP/bdlcc/FixedQueue/numElements.adoc[`numElements`] | Returns the number of elements currently in this queue. | xref:BloombergLP/bdlcc/FixedQueue/popFront-07.adoc[`popFront`] | `popFront` overloads | xref:BloombergLP/bdlcc/FixedQueue/pushBack-04.adoc[`pushBack`] | `pushBack` overloads | xref:BloombergLP/bdlcc/FixedQueue/removeAll.adoc[`removeAll`] | Remove all items from this queue. | xref:BloombergLP/bdlcc/FixedQueue/size.adoc[`size`] | DEPRECATED: Use `capacity()` instead. | xref:BloombergLP/bdlcc/FixedQueue/tryPopFront.adoc[`tryPopFront`] | Attempt to remove the front element without blocking. | xref:BloombergLP/bdlcc/FixedQueue/tryPushBack-08c.adoc[`tryPushBack`] | `tryPushBack` overloads | xref:BloombergLP/bdlcc/FixedQueue/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<FixedQueue, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlcc/FixedQueue_PopGuard.adoc[BloombergLP::bdlcc::FixedQueue_PopGuard]` | This class provides a destruction guard that pops an element from a `FixedQueue`. | `xref:BloombergLP/bdlcc/FixedQueue_PushProctor.adoc[BloombergLP::bdlcc::FixedQueue_PushProctor]` | This class provides a proctor that clears a `FixedQueue` on destruction unless released. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#