tryPopFront overloads

Synopses

Declared in <bdlcc_queue.h>

Remove up to the specified maxNumItems from the front of this queue. Optionally specify a buffer into which the items removed from the queue are loaded. If buffer is non‐null, the removed items are appended to it as if by repeated application of buffer‐>push_back(popFront()) while the queue is not empty and maxNumItems have not yet been removed. The behavior is undefined unless maxNumItems >= 0. This method never blocks.

void
tryPopFront(int maxNumItems);

If this queue is non‐empty, remove the first item, load that item into the specified buffer, and return 0 indicating success. If this queue is empty, return a non‐zero value with no effect on buffer or the state of this queue. This method never blocks.

int
tryPopFront(TYPE* buffer);

Same as the preceding overload, appending removed items to buffer.

void
tryPopFront(
    int maxNumItems,
    bsl::vector<TYPE>* buffer);

Same as the preceding overload, appending removed items to buffer.

void
tryPopFront(
    int maxNumItems,
    std::pmr::vector<TYPE>* buffer);

Same as the preceding overload, appending removed items to buffer.

void
tryPopFront(
    int maxNumItems,
    std::vector<TYPE>* buffer);

Created with MrDocs