BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlcc::FixedQueue_PopGuard< VALUE > Class Template Reference

#include <bdlcc_fixedqueue.h>

Public Member Functions

 FixedQueue_PopGuard (FixedQueue< VALUE > *queue, unsigned int generation, unsigned int index)
 
 ~FixedQueue_PopGuard ()
 

Detailed Description

template<class VALUE>
class bdlcc::FixedQueue_PopGuard< VALUE >

This class provides a guard that, upon its destruction, will remove (pop) the indicated element from the FixedQueue object supplied at construction. Note that this guard is used to provide exception safety when popping an element from a FixedQueue object.

See bdlcc_fixedqueue

Constructor & Destructor Documentation

◆ FixedQueue_PopGuard()

template<class VALUE >
bdlcc::FixedQueue_PopGuard< VALUE >::FixedQueue_PopGuard ( FixedQueue< VALUE > *  queue,
unsigned int  generation,
unsigned int  index 
)
inline

Create a guard that, upon its destruction, will update the state of the specified queue to remove (pop) the element at the specified index having the specified generation, and destroy that popped object. The behavior is undefined unless index and generation refer to a valid element in queue that the current thread has acquired a reservation to pop (using FixedQueueIndexManager::reservePopIndex).

◆ ~FixedQueue_PopGuard()

template<class VALUE >
bdlcc::FixedQueue_PopGuard< VALUE >::~FixedQueue_PopGuard ( )

Update the state of the FixedQueue object supplied at construction to remove (pop) the indicated element, and destroy the popped object.


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