BDE 4.14.0 Production release
|
Macros | |
#define | bslalg_DequeImpUtil bslalg::DequeImpUtil |
This alias is defined for backward compatibility. | |
Provide basic parameters and primitive data structures for deques.
This component provides primitive data structures for implementing a deque knowing only its value type and the number of objects in a block. Conceptually, a deque is an array of blocks pointers, each block capable of containing a fixed number of objects. An element in the deque is identified by an iterator that consists of a pointer to the block pointer array, and a pointer to a value. A deque implementation is parameterized by the VALUE_TYPE
and a BLOCK_LENGTH
(fixed number of objects in a block). bslalg::DequeImpUtil
provides a namespace for the following types and constants:
The picture is as follows:
Depicted above is a deque consisting of an array of eight block pointers, only four actually used to point to blocks of eight elements. In the first block, the first three elements are uninitialized, and the twenty six elements follow in sequence across the different blocks. The value of the corresponding deque would be [ A, B, C, ... X, Y, Z ]
, its logical length 26, and its capacity would be 19 (the minimum number of prepend/append to force a reallocation of the block pointer array).
This component is for use by the bslalg
package. Other clients should use the STL deque (in header <deque>
).
#define bslalg_DequeImpUtil bslalg::DequeImpUtil |