[#BloombergLP-bdlcc-TimeQueue-091-add-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/TimeQueue-091.adoc[TimeQueue&lt;function&lt;void()&gt;&gt;]::add
:relfileprefix: ../../../
:mrdocs:

`add` overloads

== Synopses

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

Add the value of the specified `item` to this queue&period; Optionally load into the optionally specified `isNewTop` a non&hyphen;zero value if the replaces 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;


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

[.small]#xref:BloombergLP/bdlcc/TimeQueue-091/add-0f7.adoc[_» more&period;&period;&period;_]#

Add a new item to this queue having the specified `time` value, and associated `data`&period; Optionally use the specified `key` to uniquely identify the item in subsequent calls to `remove` and `update`&period; Optionally load into the optionally specified `isNewTop` a non&hyphen;zero value if the item is now the lowest item in this queue, and a 0 value otherwise&period; If specified, load into the optionally specified `newLength`, the new number of items 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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/TimeQueue-091/Handle.adoc[Handle]
xref:BloombergLP/bdlcc/TimeQueue-091/add-01.adoc[add](
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& time,
    xref:bsl/function-0a.adoc[function&lt;void()&gt;] const& data,
    int* isNewTop = 0,
    int* newLength = 0);
----

[.small]#xref:BloombergLP/bdlcc/TimeQueue-091/add-01.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, with the specified `key`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/TimeQueue-091/Handle.adoc[Handle]
xref:BloombergLP/bdlcc/TimeQueue-091/add-0f9.adoc[add](
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& time,
    xref:bsl/function-0a.adoc[function&lt;void()&gt;] const& data,
    xref:BloombergLP/bdlcc/TimeQueue-091/Key.adoc[Key] const& key,
    int* isNewTop = 0,
    int* newLength = 0);
----

[.small]#xref:BloombergLP/bdlcc/TimeQueue-091/add-0f9.adoc[_» more&period;&period;&period;_]#


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