Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ACE_RMCast_Copy_On_Write_Read_Guard Class Template Reference

Implement a read guard for a reference counted collection. More...

#include <RMCast_Copy_On_Write.h>

Collaboration diagram for ACE_RMCast_Copy_On_Write_Read_Guard:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_RMCast_Copy_On_Write_Collection<
COLLECTION, ITERATOR > 
Collection
typedef ACE_RMCast_Copy_On_Write_Container<
COLLECTION, ITERATOR > 
Container

Public Methods

 ACE_RMCast_Copy_On_Write_Read_Guard (Container &container)
 Constructor. More...

 ~ACE_RMCast_Copy_On_Write_Read_Guard (void)
 Destructor. More...


Public Attributes

Collectioncollection
 A reference to the collection. More...


Private Attributes

ACE_SYNCH_MUTEXmutex_
 Synchronization. More...


Detailed Description

template<class COLLECTION, class ITERATOR>
class ACE_RMCast_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR >

Implement a read guard for a reference counted collection.

Definition at line 84 of file RMCast_Copy_On_Write.h.


Member Typedef Documentation

template<class COLLECTION, class ITERATOR>
typedef ACE_RMCast_Copy_On_Write_Collection<COLLECTION,ITERATOR> ACE_RMCast_Copy_On_Write_Read_Guard::Collection
 

Definition at line 87 of file RMCast_Copy_On_Write.h.

template<class COLLECTION, class ITERATOR>
typedef ACE_RMCast_Copy_On_Write_Container<COLLECTION,ITERATOR> ACE_RMCast_Copy_On_Write_Read_Guard::Container
 

Definition at line 88 of file RMCast_Copy_On_Write.h.


Constructor & Destructor Documentation

template<class COLLECTION, class ITERATOR>
ACE_INLINE ACE_RMCast_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR >::ACE_RMCast_Copy_On_Write_Read_Guard Container   container
 

Constructor.

Definition at line 14 of file RMCast_Copy_On_Write.i.

References ACE_RMCast_Copy_On_Write_Collection::_incr_refcnt, ACE_GUARD, ACE_SYNCH_MUTEX, and collection.

00015   : collection (0)
00016   , mutex_ (container.mutex_)
00017 {
00018   ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
00019   this->collection = container.collection_;
00020   this->collection->_incr_refcnt ();
00021 }

template<class COLLECTION, class ITERATOR>
ACE_INLINE ACE_RMCast_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR >::~ACE_RMCast_Copy_On_Write_Read_Guard void   
 

Destructor.

Definition at line 25 of file RMCast_Copy_On_Write.i.

References ACE_RMCast_Copy_On_Write_Collection::_decr_refcnt, ACE_GUARD, ACE_SYNCH_MUTEX, and collection.

00026 {
00027   if (this->collection != 0)
00028     {
00029       ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
00030       this->collection->_decr_refcnt ();
00031     }
00032 }


Member Data Documentation

template<class COLLECTION, class ITERATOR>
Collection* ACE_RMCast_Copy_On_Write_Read_Guard::collection
 

A reference to the collection.

Definition at line 97 of file RMCast_Copy_On_Write.h.

Referenced by ACE_RMCast_Copy_On_Write_Read_Guard, ACE_RMCast_Copy_On_Write::empty, ACE_RMCast_Copy_On_Write::first_key, ACE_RMCast_Copy_On_Write::for_each, and ~ACE_RMCast_Copy_On_Write_Read_Guard.

template<class COLLECTION, class ITERATOR>
ACE_SYNCH_MUTEX& ACE_RMCast_Copy_On_Write_Read_Guard::mutex_ [private]
 

Synchronization.

Definition at line 101 of file RMCast_Copy_On_Write.h.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:13:55 2003 for ACE_RMCast by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002