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

#include <bdlcc_deque.h>

Public Member Functions

 Proctor (Deque< TYPE > *container=0)
 
 ~Proctor ()
 
void load (Deque< TYPE > *container)
 
void release ()
 
MonoDequeoperator-> () const
 
MonoDequeoperator* () const
 
TYPE & operator[] (typename MonoDeque::size_type position) const
 
bool isNull () const
 Return true if this object is not associated with a Deque object.
 

Detailed Description

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

This class defines a proctor type that provides direct access to the underlying bsl::deque contained in a Deque. Creation of a Proctor object locks the mutex of the Deque, and destruction unlocks it.

Constructor & Destructor Documentation

◆ Proctor()

template<class TYPE >
bdlcc::Deque< TYPE >::Proctor::Proctor ( Deque< TYPE > *  container = 0)
inlineexplicit

Create a Proctor object to provide access to the underlying bsl::deque contained in the optionally specified *container, locking containers mutex. If no container is specified, this object will be null.

◆ ~Proctor()

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

Release the lock on the mutex of the Deque that was provided at contstuction and destroy this Proctor object. Signal the conditions on the Deque that was supplied to this object at construction to reflect any changes that have been made to its contents since construction.

Member Function Documentation

◆ isNull()

template<class TYPE >
bool bdlcc::Deque< TYPE >::Proctor::isNull ( ) const
inline

◆ load()

template<class TYPE >
void bdlcc::Deque< TYPE >::Proctor::load ( Deque< TYPE > *  container)
inline

In the case where this Proctor has been released, attach this object to the specified container. If this object is already attached, release the previous object first. The behavior is undefined if 0 == container.

◆ operator*()

template<class TYPE >
bsl::deque< TYPE > & bdlcc::Deque< TYPE >::Proctor::operator* ( ) const
inline

Return a reference to the bsl::deque managed by this Proctor object. The behavior is undefined if this Proctor has been released.

◆ operator->()

template<class TYPE >
bsl::deque< TYPE > * bdlcc::Deque< TYPE >::Proctor::operator-> ( ) const
inline

Return a pointer to the bsl::deque contained in the Deque managed by this Proctor object'. The behavior is undefined if this Proctor has been released.

◆ operator[]()

template<class TYPE >
TYPE & bdlcc::Deque< TYPE >::Proctor::operator[] ( typename MonoDeque::size_type  position) const
inline

Return a reference providing modifiable access to the element at the specified position in the bsl::deque held by this proctor. The behavior is undefined unless position < size where size is the the number of elements in that deque.

◆ release()

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

Release this proctor without destroying it. Afterward the destructor will have no effect. This may be called multiple times; only the first call has any effect.


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