Constructors

Synopses

Declared in <bdlcc_queue.h>

Create a queue of objects of parameterized TYPE. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

explicit
Queue(bslma::Allocator* basicAllocator = 0);

Create a queue of objects of parameterized TYPE having either the specified highWaterMark suggested maximum length if highWaterMark is positive, or no maximum length if highWaterMark is negative. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless highWaterMark != 0.

explicit
Queue(
    int highWaterMark,
    bslma::Allocator* basicAllocator = 0);

Create a queue of objects of parameterized TYPE with sufficient initial capacity to accommodate up to the specified numItems values without subsequent reallocation. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

explicit
Queue(
    InitialCapacity const& numItems,
    bslma::Allocator* basicAllocator = 0);

Create a queue of objects of parameterized TYPE containing the sequence of TYPE values from the specified srcQueue. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

Queue(
    bdlc::Queue<TYPE> const& srcQueue,
    bslma::Allocator* basicAllocator = 0);

Create a queue of objects of parameterized TYPE with sufficient initial capacity to accommodate up to the specified numItems values without subsequent reallocation and having either the specified highWaterMark suggested maximum length if highWaterMark is positive, or no maximum length if highWaterMark is negative. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless highWaterMark != 0.

Queue(
    InitialCapacity const& numItems,
    int highWaterMark,
    bslma::Allocator* basicAllocator = 0);

Create a queue of objects of parameterized TYPE containing the sequence of TYPE values from the specified srcQueue and having either the specified highWaterMark suggested maximum length if highWaterMark is positive, or no maximum length if highWaterMark is negative. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless highWaterMark != 0.

Queue(
    bdlc::Queue<TYPE> const& srcQueue,
    int highWaterMark,
    bslma::Allocator* basicAllocator = 0);

Created with MrDocs