Quick Links: |
#include <bslstl_deque.h>
Public Types | |
typedef VALUE_TYPE & | reference |
typedef const VALUE_TYPE & | const_reference |
typedef Iterator | iterator |
typedef ConstIterator | const_iterator |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
typedef VALUE_TYPE | value_type |
typedef ALLOCATOR | allocator_type |
typedef AllocatorTraits::pointer | pointer |
typedef AllocatorTraits::const_pointer | const_pointer |
typedef bsl::reverse_iterator < Iterator > | reverse_iterator |
typedef bsl::reverse_iterator < ConstIterator > | const_reverse_iterator |
Public Member Functions | |
deque () | |
deque (const ALLOCATOR &basicAllocator) | |
deque (size_type numElements, const ALLOCATOR &basicAllocator=ALLOCATOR()) | |
deque (size_type numElements, const VALUE_TYPE &value, const ALLOCATOR &basicAllocator=ALLOCATOR()) | |
template<class INPUT_ITERATOR > | |
deque (INPUT_ITERATOR first, INPUT_ITERATOR last, const ALLOCATOR &basicAllocator=ALLOCATOR()) | |
deque (const deque &original) | |
deque (const deque &original, const typename type_identity< ALLOCATOR >::type &basicAllocator) | |
deque (BloombergLP::bslmf::MovableRef< deque > original) | |
deque (BloombergLP::bslmf::MovableRef< deque > original, const typename type_identity< ALLOCATOR >::type &basicAllocator) | |
deque (std::initializer_list< value_type > values, const ALLOCATOR &basicAllocator=ALLOCATOR()) | |
~deque () | |
deque & | operator= (const deque &rhs) |
deque &operator=(BloombergLP::bslmf::MovableRef < deque > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits deque & | operator= (std::initializer_list< value_type > values) |
template<class INPUT_ITERATOR > | |
void | assign (INPUT_ITERATOR first, INPUT_ITERATOR last) |
void | assign (size_type numElements, const VALUE_TYPE &value) |
void | assign (std::initializer_list< value_type > values) |
void | reserve (size_type numElements) |
void | resize (size_type newSize) |
void | resize (size_type newSize, const VALUE_TYPE &value) |
void | shrink_to_fit () |
void | push_front (const VALUE_TYPE &value) |
void | push_front (BloombergLP::bslmf::MovableRef< value_type > value) |
void | push_back (const VALUE_TYPE &value) |
void | push_back (BloombergLP::bslmf::MovableRef< value_type > value) |
template<class... Args> | |
reference | emplace_front (Args &&...arguments) |
template<class... Args> | |
reference | emplace_back (Args &&...arguments) |
template<class... Args> | |
iterator | emplace (const_iterator position, Args &&...arguments) |
void | pop_front () |
void | pop_back () |
iterator | insert (const_iterator position, const VALUE_TYPE &value) |
iterator | insert (const_iterator position, BloombergLP::bslmf::MovableRef< value_type > value) |
iterator | insert (const_iterator position, size_type numElements, const VALUE_TYPE &value) |
template<class INPUT_ITERATOR > | |
iterator | insert (const_iterator position, INPUT_ITERATOR first, INPUT_ITERATOR last) |
iterator | insert (const_iterator position, std::initializer_list< value_type > values) |
iterator | erase (const_iterator position) |
iterator | erase (const_iterator first, const_iterator last) |
allocator_type | get_allocator () const BSLS_KEYWORD_NOEXCEPT |
size_type | max_size () const BSLS_KEYWORD_NOEXCEPT |
iterator | begin () BSLS_KEYWORD_NOEXCEPT |
const_iterator | begin () const BSLS_KEYWORD_NOEXCEPT |
iterator | end () BSLS_KEYWORD_NOEXCEPT |
const_iterator | end () const BSLS_KEYWORD_NOEXCEPT |
reverse_iterator | rbegin () BSLS_KEYWORD_NOEXCEPT |
const_reverse_iterator | rbegin () const BSLS_KEYWORD_NOEXCEPT |
reverse_iterator | rend () BSLS_KEYWORD_NOEXCEPT |
const_reverse_iterator | rend () const BSLS_KEYWORD_NOEXCEPT |
reference | operator[] (size_type position) |
const_reference | operator[] (size_type position) const |
reference | at (size_type position) |
const_reference | at (size_type position) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
const_iterator | cbegin () const BSLS_KEYWORD_NOEXCEPT |
const_iterator | cend () const BSLS_KEYWORD_NOEXCEPT |
const_reverse_iterator | crbegin () const BSLS_KEYWORD_NOEXCEPT |
const_reverse_iterator | crend () const BSLS_KEYWORD_NOEXCEPT |
size_type | size () const BSLS_KEYWORD_NOEXCEPT |
size_type | capacity () const BSLS_KEYWORD_NOEXCEPT |
bool | empty () const BSLS_KEYWORD_NOEXCEPT |
Public Attributes | |
void swap(deque< VALUE_TYPE, ALLOCATOR > &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void | clear () BSLS_KEYWORD_NOEXCEPT |
Protected Attributes | |
BlockPtr * | d_blocks_p |
std::size_t | d_blocksLength |
IteratorImp | d_start |
IteratorImp | d_finish |
Friends | |
class | Deque_BlockCreator |
class | Deque_BlockProctor |
class | Deque_Guard |
This class template provides an STL-compliant deque
that conforms to the bslma::Allocator
model. For the requirements of a deque class, consult the C++11 standard. In particular, this implementation offers the general rules that:
max_size
triggers a call to bslstl::StdExceptUtil::throwLengthError
. at
method that attempts to access a position outside of the valid range of a deque triggers a call to bslstl::StdExceptUtil::throwOutOfRange
. Note that portions of the standard methods are implemented in Deque_Base
, which is parameterized on only VALUE_TYPE
in order to generate smaller debug strings.
This class:
supports a complete set of value-semantic operations
BDEX
serialization const
thread-safe For terminology see bsldoc_glossary
.
In addition, the following members offer a full guarantee of rollback: if an exception is thrown during the invocation of insert
, push_front
, or push_back
on a pre-existing object, the object is left in a valid state and its value is unchanged.