DequeIterator specialization for a single element per block.

Synopsis

Declared in <bslalg_dequeiterator.h>

template<class VALUE_TYPE>
class DequeIterator<VALUE_TYPE, 1>;

Description

This partial specialization of DequeIterator for the case when there is a single element per block uses simpler storage and a simpler implementation. The contract for all functions is the same, and so not repeated.

Member Functions

Name

Description

DequeIterator [constructor]

Constructors

blockBegin

Return the address of the first element in the block pointed to by this iterator.

blockEnd

Return the address of (one‐past) the last element in the block pointed to by this iterator.

blockPtr

Return the address of the block pointer for this iterator.

nextBlock

Set this iterator to point to the first element of the next block.

offsetInBlock

Return the offset of the element pointed to by this iterator, from the beginning of the block containing it.

operator*

Return a reference to the element pointed to by this iterator.

operator+

Return an iterator pointing the element at the specified offset after this iterator.

operator++

Increment this iterator to the next element in the deque.

operator+=

Advance this iterator by the specified offset.

operator‐

Subtraction operators

operator‐‐

Decrement this iterator to the previous element in the deque.

operator‐=

Move this iterator backward by the specified offset.

previousBlock

Set this iterator to point to the first (not the last) element of the previous block.

remainingInBlock

Return how many elements remain in this block from the current position.

setBlock

Set this iterator to point to the first element of the block pointed to by the specified blockPtrPtr.

valuePtr

Return the address of the parameterized VALUE_TYPE object pointed to by this iterator.

valuePtrDecrement

Decrement the value pointer within the current block.

valuePtrIncrement

Increment the value pointer within the current block.

Friends

Name

Description

BloombergLP::bslalg::operator<=>

Return the result of comparing the block pointers of the specified lhs and rhs iterators.

BloombergLP::bslalg::operator==

Return true if lhs and rhs point to the same element.

Created with MrDocs