Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bdlcc::Deque< TYPE >::VectorThrowGuard< VECTOR > Class Template Reference

#include <bdlcc_deque.h>

List of all members.

Public Member Functions

 VectorThrowGuard (VECTOR *vector_p)
 ~VectorThrowGuard ()
void release ()

Detailed Description

template<class TYPE>
template<class VECTOR>
class bdlcc::Deque< TYPE >::VectorThrowGuard< VECTOR >

This private class is used to manage one vector object 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 the Proctor and ConstProctor types. The vector may only grow by having objects appended to it. If a throw happens during the course of the operation and the 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>
template<class VECTOR >
bdlcc::Deque< TYPE >::VectorThrowGuard< VECTOR >::VectorThrowGuard ( VECTOR *  vector_p  )  [explicit]

Create a VectorThrowGuard object that will manage the specified *vector_p. Note that the case where 0 == vector_p is explicitly permitted, in which case this object will not manage anything.

template<class TYPE>
template<class VECTOR >
bdlcc::Deque< TYPE >::VectorThrowGuard< VECTOR >::~VectorThrowGuard (  ) 

If a vector is being managed by this VectorThrowGuard, restore it to the state it was in when this object was created.


Member Function Documentation

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

Release the monitored vector from management by this VectorThrowGuard object.


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