BloombergLP::bdlcc::TimeQueue::add

add overloads

Synopses

Declared in <bdlcc_timequeue.h>

Add the value of the specified item to this queue.

TimeQueue<DATA>::Handle
add(
    TimeQueueItem<DATA> const& item,
    int* isNewTop = 0,
    int* newLength = 0);
» more...

Add an item with the specified time and associated data.

TimeQueue<DATA>::Handle
add(
    bsls::TimeInterval const& time,
    DATA const& data,
    int* isNewTop = 0,
    int* newLength = 0);
» more...

Same as the preceding overload, with the specified key.

TimeQueue<DATA>::Handle
add(
    bsls::TimeInterval const& time,
    DATA const& data,
    Key const& key,
    int* isNewTop = 0,
    int* newLength = 0);
» more...

Return Value

handle for the item, or -1 if the queue is full

Parameters

NameDescription
itemitem whose time, data, and key are added
isNewTopoptional flag set if the item is the new lowest
newLengthoptional location for the new queue length
timescheduled time for the item
datadata associated with the item
keykey used to uniquely identify the item