Quick Links: |
#include <bdlcc_deque.h>
Public Member Functions | |
DequeThrowGuard (MonoDeque *monoDeque_p) | |
~DequeThrowGuard () | |
void | release () |
This private class
is used to manage a bsl::deque
, during the course of an operation by a bdlcc::Deque
. Because it has a release
method, it is actually a proctor, but we call it a guard
to avoid having clients confuse it with this component's Proctor
and ConstProctor
types. A deque
that is being managed may only grow, and only on one end or the other. If a throw happens during the course of the operation and this guard's destructor is called while still managing the object, it will restore the managed object to its initial state via operations that are guaranteed not to throw.
bdlcc::Deque< TYPE >::DequeThrowGuard::DequeThrowGuard | ( | MonoDeque * | monoDeque_p | ) | [explicit] |
Create a Deque_DequeThrowGuard
object that will manage the specified *monoDeque_p
. The behavior is undefined if 0 == monoDeque_p
.
bdlcc::Deque< TYPE >::DequeThrowGuard::~DequeThrowGuard | ( | ) |
If a MonoDeque
is being managed by this ThrowGuard
, restore it to the state it was in when this object was created.
void bdlcc::Deque< TYPE >::DequeThrowGuard::release | ( | ) |
Release the monitored MonoDeque
from management by this Deque_DequeThrowGuard
object.