Quick Links: |
#include <bslalg_dequeprimitives.h>
Public Types | |
typedef DequeIterator < VALUE_TYPE, BLOCK_LENGTH > | Iterator |
Public Member Functions | |
DequePrimitives_ExternalDequeElementGuard (Iterator *begin, Iterator *end, ALLOCATOR allocator) | |
~DequePrimitives_ExternalDequeElementGuard () | |
void | release () |
This class
provides a specialized proctor object that, upon destruction and unless the release
method has been called, destroys the elements in a segment of a bsl::deque
of parameterized type VALUE_TYPE
. The elements destroyed are delimited by the "guarded" range [*d_begin .. *d_end)
. Note that the range guarded by this class
is dynamic and can be changed outside of this class
.
See Component bslalg_dequeprimitives
typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> bslalg::DequePrimitives_ExternalDequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::Iterator |
bslalg::DequePrimitives_ExternalDequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::DequePrimitives_ExternalDequeElementGuard | ( | Iterator * | begin, | |
Iterator * | end, | |||
ALLOCATOR | allocator | |||
) |
Create a deque exception guard object for the sequence of elements of the parameterized VALUE_TYPE
delimited by the specified range [*begin .. *end)
. The behavior is undefined unless *begin
<= *end
and unless each element in the range [*begin .. *end)
has been initialized.
bslalg::DequePrimitives_ExternalDequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::~DequePrimitives_ExternalDequeElementGuard | ( | ) |
Call the destructor on each of the elements of the parameterized VALUE_TYPE
delimited by the range [*d_begin_p .. *d_end_p)
and destroy this array exception guard.
void bslalg::DequePrimitives_ExternalDequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::release | ( | ) |
Set the range of elements guarded by this object to be empty. Note that d_begin_p == d_end_p == 0
following this operation.