[#BloombergLP-bdlcc-FixedQueueIndexManager] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::FixedQueueIndexManager :relfileprefix: ../../ :mrdocs: Thread‐enabled index manager for a fixed‐size circular buffer. == Synopsis Declared in `<bdlcc_fixedqueueindexmanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class FixedQueueIndexManager; ---- == Description This class implements a circular buffer of atomic state variables. These are intended to synchronize access to another (non‐atomic) indexed data structure so that the other data structure can be used as a thread‐enabled fixed‐size queue. == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/FixedQueueIndexManager/_04enum.adoc[`Unnamed enum`] | Capacity‐related constants for this index manager. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/FixedQueueIndexManager/2constructor.adoc[`FixedQueueIndexManager`] [.small]#[constructor]# | Create an index manager for a circular buffer having the specified maximum `capacity`. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/2destructor.adoc[`~FixedQueueIndexManager`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/abortPushIndexReservation.adoc[`abortPushIndexReservation`] | Release the specified `index` for use in the next generation. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/capacity.adoc[`capacity`] | Return the maximum number of items that may be stored in the queue. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/commitPopIndex.adoc[`commitPopIndex`] | Mark the specified `index` as available (empty) in the next generation. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/commitPushIndex.adoc[`commitPushIndex`] | Mark the specified `index` as occupied (full) in the specified `generation`. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/disable.adoc[`disable`] | Mark the queue as disabled. Future calls to `reservePushIndex` will fail. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/enable.adoc[`enable`] | Mark the queue as enabled. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/isEnabled.adoc[`isEnabled`] | Return `true` if the queue is enabled, and `false` if it is disabled. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/length.adoc[`length`] | Return a snapshot of the number of items in the queue. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/print.adoc[`print`] | Print a formatted string describing the current state of this object to the specified `stream`. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/reservePopIndex.adoc[`reservePopIndex`] | Reserve the next available index from which to dequeue an element. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/reservePopIndexForClear.adoc[`reservePopIndexForClear`] | Reserve a pop index for clearing cells up to a push reservation. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/reservePushIndex.adoc[`reservePushIndex`] | Reserve the next available index at which to enqueue an element. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<FixedQueueIndexManager, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlcc/FixedQueueIndexManager/circularDifference.adoc[`circularDifference`] | Return the signed circular difference of two values modulo a bound. | xref:BloombergLP/bdlcc/FixedQueueIndexManager/numRepresentableGenerations.adoc[`numRepresentableGenerations`] | Return the number of representable generations for a circular buffer of the specified `capacity`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#