[#BloombergLP-bdlcc-TimeQueue-09c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::TimeQueue
:relfileprefix: ../../
:mrdocs:

Priority queue of `DATA` items ordered by associated time values&period;

== Synopsis

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

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

== Description

This parameterized class provides a public interface which is similar in structure and intent to `Queue&lt;DATA&gt;`, with the exception that each item stored in the `TimeQueue` has an associated time value&period; Items are retrieved or exchanged by proxy of a `TimeQueueItem&lt;DATA&gt;`, and are referred to by an opaque data type `TimeQueue&colon;&colon;Handle` which serves to identify an individual element on the Time Queue&period; Idiomatic usage of `TimeQueue` includes the member function `popLE`, which finds all items on the queue whose `bsls&colon;&colon;TimeInterval` are less than a specified value and transfers those items to a provided vector of items, and the member function `update`, which can update the time value for a specific `TimeQueueItem` without removing it from the queue&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/TimeQueue-09c/Key.adoc[`Key`] 
| This type is a wrapper around a void pointer that will be supplied and used by clients to uniquely identify an item in the queue&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/TimeQueue-09c/Handle.adoc[`Handle`] 
| Alias for uniquely identifying a valid node in the time queue&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/TimeQueue-09c/2constructor-0a.adoc[`TimeQueue`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlcc/TimeQueue-09c/2destructor.adoc[`&#126;TimeQueue`] [.small]#[destructor]#
| Destroy this time queue&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/add-0b3.adoc[`add`] 
| `add` overloads
| xref:BloombergLP/bdlcc/TimeQueue-09c/countLE.adoc[`countLE`] 
| Return the number of items with a time less than or equal to `time`&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/isRegisteredHandle-08.adoc[`isRegisteredHandle`] 
| `isRegisteredHandle` overloads
| xref:BloombergLP/bdlcc/TimeQueue-09c/length.adoc[`length`] 
| Return number of items in this queue&period; Note that the value returned may be obsolete by the time it is received&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/minTime.adoc[`minTime`] 
| Load into the specified `buffer`, the time value of the lowest time in this queue&period; Return 0 on success, and a non&hyphen;zero value if this queue is empty&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/popFront.adoc[`popFront`] 
| Atomically remove the top item from this queue&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/popLE-00.adoc[`popLE`] 
| `popLE` overloads
| xref:BloombergLP/bdlcc/TimeQueue-09c/remove-08.adoc[`remove`] 
| `remove` overloads
| xref:BloombergLP/bdlcc/TimeQueue-09c/removeAll.adoc[`removeAll`] 
| Remove all the items from this queue&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/removeIf.adoc[`removeIf`] 
| Remove all items for which the specified `predicate` returns `true`&period;
| xref:BloombergLP/bdlcc/TimeQueue-09c/update-00.adoc[`update`] 
| `update` overloads
|===



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