Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bdlcc::Deque< TYPE >::DequeThrowGuard Class Reference

#include <bdlcc_deque.h>

List of all members.

Public Member Functions

 DequeThrowGuard (MonoDeque *monoDeque_p)
 ~DequeThrowGuard ()
void release ()

Detailed Description

template<class TYPE>
class bdlcc::Deque< TYPE >::DequeThrowGuard

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.

See Component bdlcc_deque


Constructor & Destructor Documentation

template<class TYPE>
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.

template<class TYPE>
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.


Member Function Documentation

template<class TYPE>
void bdlcc::Deque< TYPE >::DequeThrowGuard::release (  ) 

Release the monitored MonoDeque from management by this Deque_DequeThrowGuard object.


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