|
BDE 4.14.0 Production release
|
#include <bslalg_dequeprimitives.h>
Public Types | |
| typedef std::size_t | size_type |
| typedef DequeIterator< VALUE_TYPE, BLOCK_LENGTH > | Iterator |
Static Public Member Functions | |
| template<class ALLOCATOR > | |
| static void | destruct (Iterator begin, Iterator end, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | destruct (Iterator begin, Iterator end, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | destruct (Iterator begin, Iterator end, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static Iterator | erase (Iterator *toBegin, Iterator *toEnd, Iterator fromBegin, Iterator first, Iterator last, Iterator fromEnd, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static Iterator | erase (Iterator *toBegin, Iterator *toEnd, Iterator fromBegin, Iterator first, Iterator last, Iterator fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >) |
| template<class ALLOCATOR > | |
| static Iterator | erase (Iterator *toBegin, Iterator *toEnd, Iterator fromBegin, Iterator first, Iterator last, Iterator fromEnd, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_MOVEABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >) |
| template<class FWD_ITER , class ALLOCATOR > | |
| static void | insertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, FWD_ITER first, FWD_ITER last, size_type numElements, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_MOVEABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_MOVEABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | insertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >) |
| template<class FWD_ITER , class ALLOCATOR > | |
| static void | insertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, FWD_ITER first, FWD_ITER last, size_type numElements, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_MOVEABLE_TRAITS >) |
| template<class ALLOCATOR > | |
| static void | moveInsertAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, bslmf::MovableRef< VALUE_TYPE > value, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToBack (Iterator *toEnd, Iterator fromEnd, Iterator position, ALLOCATOR allocator, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToBackDispatch (Iterator *toEnd, Iterator fromEnd, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToBackDispatch (Iterator *toEnd, Iterator fromEnd, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_MOVEABLE_TRAITS >, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToBackDispatch (Iterator *toEnd, Iterator fromEnd, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToFront (Iterator *toBegin, Iterator fromBegin, Iterator position, ALLOCATOR allocator, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToFrontDispatch (Iterator *toBegin, Iterator fromBegin, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_COPYABLE_TRAITS >, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToFrontDispatch (Iterator *toBegin, Iterator fromBegin, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, BITWISE_MOVEABLE_TRAITS >, Args &&... arguments) |
| template<class ALLOCATOR , class... Args> | |
| static void | emplaceAndMoveToFrontDispatch (Iterator *toBegin, Iterator fromBegin, Iterator position, ALLOCATOR allocator, bsl::integral_constant< int, NIL_TRAITS >, Args &&... arguments) |
| static void | moveBack (Iterator *destination, Iterator *source, size_type numElements) |
| static void | moveFront (Iterator *destination, Iterator *source, size_type numElements) |
| template<class ALLOCATOR > | |
| static void | uninitializedFillNBack (Iterator *toEnd, Iterator fromEnd, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | uninitializedFillNFront (Iterator *toBegin, Iterator fromBegin, size_type numElements, const VALUE_TYPE &value, ALLOCATOR allocator) |
| template<class ALLOCATOR > | |
| static void | valueInititalizeN (Iterator *toEnd, Iterator fromEnd, size_type numElements, ALLOCATOR allocator) |
This struct provides a namespace for a suite of utility functions that operate on deques parameterized by the VALUE_TYPE and BLOCK_LENGTH. Depending on the traits of VALUE_TYPE, the default and copy constructors, destructor, assignment operators, etcetera may not be invoked, and instead the operation can be optimized using a no-op, bitwise move, or bitwise copy.
| typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> bslalg::DequePrimitives< VALUE_TYPE, BLOCK_LENGTH >::Iterator |
| typedef std::size_t bslalg::DequePrimitives< VALUE_TYPE, BLOCK_LENGTH >::size_type |
|
inlinestatic |
TBD: fix comment Call the destructor on each of the elements of a deque of parameterized VALUE_TYPE in the specified range [begin .. end). The behavior is undefined unless begin <= end. Note that this does not deallocate any memory (except memory deallocated by the element destructor calls).
|
static |
|
static |
Call the destructor on each of the elements of a deque of parameterized VALUE_TYPE in the specified range [begin .. end). The behavior is undefined unless begin <= end. Note that this does not deallocate any memory (except memory deallocated by the element destructor calls). Note that the last argument is for removing overload ambiguities and is not used.
|
inlinestatic |
Insert at the specified position a newly created VALUE_TYPE object, constructed by forwarding the specified allocator (if required) and the specified (variable number of) arguments to the corresponding constructor of VALUE_TYPE, and move the elements in the range [position .. fromEnd) forward by 1 position. Load into the specified toEnd an iterator one past the inserted element (i.e., fromEnd + 1). The behavior is undefined unless fromEnd + 1 is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert 1 element).
|
static |
Insert at the specified position a newly created VALUE_TYPE object, constructed by forwarding the specified allocator (if required) and the specified (variable number of) arguments to the corresponding constructor of VALUE_TYPE, and move the elements in the range [position .. fromEnd) forward by 1 position. Load into the specified toEnd an iterator one past the inserted element (i.e., fromEnd + 1). The behavior is undefined unless fromEnd + 1 is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert 1 element). Note that the next to last argument is for removing overload ambiguities and is not used.
|
static |
|
static |
|
inlinestatic |
Insert at the specified position a newly created VALUE_TYPE object, constructed by forwarding the specified allocator (if required) and the specified (variable number of) arguments to the corresponding constructor of VALUE_TYPE, and move the elements in the range [fromBegin .. position) backward by 1 position. Load into the specified toBegin an iterator to the inserted element (i.e., fromBegin - 1). The behavior is undefined unless fromBegin - 1 is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert 1 element).
|
static |
Insert at the specified position a newly created VALUE_TYPE object, constructed by forwarding the specified allocator (if required) and the specified (variable number of) arguments to the corresponding constructor of VALUE_TYPE, and move the elements in the range [fromBegin .. position) backward by 1 position. Load into the specified toBegin an iterator to the inserted element (i.e., fromBegin - 1). The behavior is undefined unless fromBegin - 1 is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert 1 element). Note that the next to last argument is for removing overload ambiguities and is not used.
|
static |
|
static |
|
inlinestatic |
Call the destructor on each of the elements of a deque of parameterized VALUE_TYPE in the specified range [first .. last). Shift the elements to fill up the empty space after the erasure, using the smaller of the range defined by [fromBegin .. first) and [last .. fromEnd) after the erasure. Load in the specified toBegin and toEnd the new boundaries of the deque after erasure and return an iterator pointing to the element immediately following the removed elements. The behavior is undefined unless fromBegin <= first <= last <= fromEnd.
|
static |
|
static |
Call the destructor on each of the elements of a deque of parameterized VALUE_TYPE in the specified range [first .. last). Shift the elements from the smaller of the specified range [fromBegin .. first) and [last .. fromEnd) to fill up the empty spaces after the erasure. Load in the specified toBegin and toEnd the new boundaries of the deque after erasure and return an iterator pointing to the element immediately following the removed elements. The behavior is undefined unless fromBegin <= first <= last <= fromEnd. Note that the last argument is for removing overload ambiguities and is not used.
|
static |
Insert the specified numElements in the range [first .. last) at the specified position, by moving the elements in the range [position .. fromEnd) forward by numElements position. Pass the specified allocator to the copy constructor if appropriate. Load into the specified toEnd an iterator to the end of the data after insertion (i.e., fromEnd + numElements). The behavior is undefined unless fromEnd + numElements is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert numElements).
|
inlinestatic |
Insert the specified numElements copies of the specified value at the specified position, by moving the elements in the range [position .. fromEnd) forward by numElements position. Pass the specified allocator to the copy constructor if appropriate. Load into the specified toEnd an iterator to the end of the deque after insertion (i.e., fromEnd + numElements). The behavior is undefined unless fromEnd + numElements is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert numElements).
|
static |
Insert the specified numElements copies of the specified value at the specified position, by moving the elements in the range [position .. fromEnd) forward by numElements position. Pass the specified allocator to the copy constructor if appropriate. Load into the specified toEnd an iterator to the end of the deque after insertion (i.e., fromEnd + numElements). The behavior is undefined unless fromEnd + numElements is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert numElements). Note that the last argument is for removing overload ambiguities and is not used.
|
static |
|
static |
|
static |
Insert the specified numElements in the range [first .. last) at the specified position, by moving the elements in the range [fromBegin .. position) backward by numElements position. Pass the specified allocator to the copy constructor if appropriate. Load into the specified toBegin an iterator to the end of the data after insertion (i.e., fromBegin - numElements). The behavior is undefined unless fromBegin - numElements is a valid iterator (i.e., the block pointer array holds enough room before the fromBefore position to insert numElements).
|
inlinestatic |
Insert the specified numElements copies of the specified value at the specified position, by moving the elements in the range [fromBegin .. position) backward by numElements position. Pass the specified allocator to the copy constructor if appropriate. Load into the specified toBegin an iterator to the beginning of the data after insertion (i.e., fromBegin - numElements). The behavior is undefined unless fromBegin - numElements is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert numElements).
|
static |
Insert the specified numElements copies of the specified value at the specified position, by moving the elements in the range [fromBegin .. position) backward by numElements position. Pass the specified allocator to the copy constructor if appropriate. Load into the specified toBegin an iterator to the beginning of the data after insertion (i.e., fromBegin - numElements. The behavior is undefined unless fromBegin - numElements is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert numElements). Note that the last argument is for removing overload ambiguities and is not used.
|
static |
|
static |
|
static |
Move the specified numElements from the specified source to the specified destination using std::memmove. Also load into destination the value destination - numElements and source the value source - numElements. The behavior is undefined unless destination >= source.
|
static |
Move the specified numElements from the specified source to the specified destination using std::memmove. Also load into destination the value destination + numElements and source the the value source + numElements. The behavior is undefined unless destination <= source.
|
inlinestatic |
Insert the specified move-insertable value at the specified position by moving the elements in the range [position .. fromEnd) forward by 1 position; pass the specified allocator to the move constructor if appropriate. Load into the specified toEnd an iterator one past the inserted element (i.e., fromEnd + 1). The behavior is undefined unless fromEnd + 1 is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert 1 element).
|
static |
Insert the specified move-insertable value at the specified position by moving the elements in the range [position .. fromEnd) forward by 1 position; pass the specified allocator to the move constructor if appropriate. Load into the specified toEnd an iterator one past the inserted element (i.e., fromEnd + 1). The behavior is undefined unless fromEnd + 1 is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert 1 element). Note that the last argument is for removing overload ambiguities and is not used.
|
static |
|
static |
|
inlinestatic |
Insert the specified move-insertable value at the specified position by moving the elements in the range [fromBegin .. position) backward by 1 position; pass the specified allocator to the move constructor if appropriate. Load into the specified toBegin an iterator to the inserted element (i.e., fromBegin - 1). The behavior is undefined unless fromBegin - 1 is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert 1 element).
|
static |
Insert the specified move-insertable value at the specified position by moving the elements in the range [fromBegin .. position) backward by 1 position; pass the specified allocator to the move constructor if appropriate. Load into the specified toBegin an iterator to the inserted element (i.e., fromBegin - 1). The behavior is undefined unless fromBegin - 1 is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert 1 element). Note that the last argument is for removing overload ambiguities and is not used.
|
static |
|
static |
|
static |
Append the specified numElements copies of the specified value to the deque ending at the specified fromEnd iterator, passing the specified allocator through to the new elements, and load into the specified toEnd an iterator pointing to the end of the data after appending (i.e., fromEnd + numElements). The behavior is undefined unless fromEnd + numElements is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert numElements).
|
static |
Prepend the specified numElements copies of the specified value to the deque starting at the specified fromBegin iterator, passing the specified allocator through to the new elements, and load into the specified toBegin an iterator pointing to the end of the data after prepending, i.e., fromBegin - numElements. The behavior is undefined unless fromBegin - numElements is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert numElements).
|
static |
Append the specified numElements value-initialized objects to the deque ending at the specified fromEnd iterator, passing the specified allocator through to the new elements, and load into the specified toEnd an iterator pointing to the end of the data after appending (i.e., fromEnd + numElements). The behavior is undefined unless fromEnd + numElements is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert numElements).