This class provides a thread‐enabled implementation of an efficient, in‐place, indexable, double‐ended queue of parameterized TYPE values. Very efficient access to the underlying bdlc::Queue object is provided, as well as to a bslmt::Mutex and a bslmt::Condition variable, to facilitate thread‐safe use of the bdlc::Queue. Note that Queue is not a value‐semantic type, but the underlying bdlc::Queue is. In this regard, Queue is a thread‐enabled handle for a bdlc::Queue.
Synopsis
Declared in <bdlcc_queue.h>
template<class TYPE>
class Queue;
Types
Name |
Description |
Enable uniform use of an optional integral constructor argument to specify the initial internal capacity (in items). For example, ` const Queue<int>::InitialCapacity NUM_ITEMS(8)); Queue<int> x(NUM_ITEMS); ` defines an instance |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this container. The behavior is undefined unless all access or modification of the container has completed prior to this call. |
Return a reference to the modifiable condition variable used by this queue to signal that the queue is not empty. |
|
Append the specified |
|
Return the high‐water mark value for this queue. Note that a negative value indicates no suggested‐maximum capacity, and is not necessarily the same negative value that was passed to the constructor. |
|
Return a reference to the modifiable condition variable used by this queue to signal that the queue is not full (i.e., has fewer items than its high‐water mark). |
|
Return the number of elements in this queue. Note that if other threads are manipulating the queue, this information may be obsolete by the time it is returned. |
|
Return a reference to the modifiable mutex used by this queue to synchronize access to its underlying |
|
Return the condition variable used by this queue to signal that the queue is not empty. |
|
Return the condition variable used by this queue to signal that the queue is not full (i.e., has fewer items than its high‐water mark). |
|
|
|
|
|
Append the specified |
|
Append the specified |
|
Return a reference to the modifiable underlying |
|
|
|
Remove the last item in this queue and load that item value into the specified |
|
Remove the first item in this queue and load that item value into the specified |
|
Append the specified |
|
Append the specified |
|
|
|
|
|
|
Declare that this type uses a |
Created with MrDocs