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

Add the value of the specified `item` to this queue&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/TimeQueue-09c/Handle.adoc[TimeQueue&lt;DATA&gt;::Handle]
add(
    xref:BloombergLP/bdlcc/TimeQueueItem.adoc[TimeQueueItem&lt;DATA&gt;] const& item,
    int* isNewTop = 0,
    int* newLength = 0);
----

== Description

Optionally load into the optionally specified `isNewTop` a non&hyphen;zero value if the item is now the lowest element in this queue, and a 0 value otherwise&period; If specified, load into the optionally specified `newLength`, the new number of elements in this queue&period; Return a value that may be used to identify the newly added item in future calls to time queue on success, and &hyphen;1 if the maximum queue length has been reached&period;

== Return Value

handle for the item, or &hyphen;1 if the queue is full

== Parameters

[cols="1,4"]
|===
| Name| Description
| *item*
| item whose time, data, and key are added
| *isNewTop*
| optional flag set if the item is the new lowest
| *newLength*
| optional location for the new queue length
|===


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