Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsl::Deque_Guard< VALUE_TYPE, ALLOCATOR > Class Template Reference
[Component bslstl_deque]

#include <bslstl_deque.h>

List of all members.

Public Member Functions

 Deque_Guard (deque< VALUE_TYPE, ALLOCATOR > *deque, bool isTail)
 ~Deque_Guard ()
std::size_t operator++ ()
std::size_t operator-- ()
void release ()
std::size_t count () const BSLS_KEYWORD_NOEXCEPT
IteratorImp begin () const BSLS_KEYWORD_NOEXCEPT
IteratorImp end () const BSLS_KEYWORD_NOEXCEPT

Detailed Description

template<class VALUE_TYPE, class ALLOCATOR>
class bsl::Deque_Guard< VALUE_TYPE, ALLOCATOR >

This class provides a proctor that maintains a count of the number of elements constructed at the front or back of a deque, but not yet committed to the deque's range of valid elements; if the count is non-zero at destruction, the destructor destroys the elements in the range [d_deque_p->end() .. d_deque_p->end() + d_count), or the range [d_deque_p->begin() - d_count .. d_deque_p->begin()), depending on whether this proctor guards the back or front. This guard is used to undo element constructors in the event of an exception. It is up to the client code to increment the count whenever a new element is constructed and to decrement the count whenever d_start or d_finish of the guarded deque is moved to incorporate more elements.

See Component bslstl_deque


The documentation for this class was generated from the following file: