BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlcc::Deque< TYPE >::DequeThrowGuard Class Reference

#include <bdlcc_deque.h>

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.

Constructor & Destructor Documentation

◆ DequeThrowGuard()

template<class TYPE >
bdlcc::Deque< TYPE >::DequeThrowGuard::DequeThrowGuard ( MonoDeque monoDeque_p)
inlineexplicit

Create a Deque_DequeThrowGuard object that will manage the specified *monoDeque_p. The behavior is undefined if 0 == monoDeque_p.

◆ ~DequeThrowGuard()

template<class TYPE >
bdlcc::Deque< TYPE >::DequeThrowGuard::~DequeThrowGuard ( )
inline

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

◆ release()

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

Release the monitored MonoDeque from management by this Deque_DequeThrowGuard object.


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