Add the value of the specified item to this queue.
Declared in <bdlcc_timequeue.h>
TimeQueue<DATA>::Handle
add(
TimeQueueItem<DATA> const& item,
int* isNewTop = 0,
int* newLength = 0);
Optionally load into the optionally specified isNewTop a non-zero value if the item is now the lowest element in this queue, and a 0 value otherwise. If specified, load into the optionally specified newLength, the new number of elements in this queue. Return a value that may be used to identify the newly added item in future calls to time queue on success, and -1 if the maximum queue length has been reached.
handle for the item, or -1 if the queue is full
| 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 |