Helper that allocates tentative blocks at either end of a deque.
Declared in <bslstl_deque.h>
template<
class VALUE_TYPE,
class ALLOCATOR>
class Deque_BlockCreator;
This class allocates blocks at the front or back of a deque and tentatively adds them to the deque. It also keeps track of how many of the newly allocated blocks have actually been used by the deque. The destructor automatically frees any unused blocks (e.g., in case an exception is thrown).
| Name | Description |
|---|---|
Deque_BlockCreator [constructor] | Create a block creator for the specified deque. |
~Deque_BlockCreator [destructor] | Free any blocks that have been allocated by this allocator but have not yet been used by the deque. |
insertAtBack | Allocate n blocks at the back of the block array. |
insertAtFront | Allocate n blocks at the front of the block array. |
release | Relinquish control over any allocated blocks. The destructor will do nothing following a call to this method. |
reserveBlockSlots | Make room for numNewBlocks pointers in the blocks array. |