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

ACE_RMCast_Copy_On_Write_Container Class Template Reference

Base class for the Copy_On_Write collection, used to simplify the declaration of the Write_Guard. More...

#include <RMCast_Copy_On_Write.h>

Inheritance diagram for ACE_RMCast_Copy_On_Write_Container:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast_Copy_On_Write_Container:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_RMCast_Copy_On_Write_Collection<
COLLECTION, ITERATOR > 
Collection
 A shorter name for the actual collection type. More...


Public Methods

 ACE_RMCast_Copy_On_Write_Container (void)
 Constructor. More...


Protected Attributes

int pending_writes_
 Number of pending writes. More...

int writing_
 If non-zero then a thread is changing the collection. More...

ACE_SYNCH_MUTEX mutex_
 A mutex to serialize access to the collection pointer. More...

ACE_SYNCH_CONDITION cond_
 A condition variable to wait to synchronize multiple writers. More...

Collectioncollection_
 The collection, with reference counting added. More...


Friends

class ACE_RMCast_Copy_On_Write_Write_Guard< COLLECTION, ITERATOR >
 Let the Write_Guard access the internal fields. More...

class ACE_RMCast_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR >
 Let the Read_Guard access the internal fields. More...


Detailed Description

template<class COLLECTION, class ITERATOR>
class ACE_RMCast_Copy_On_Write_Container< COLLECTION, ITERATOR >

Base class for the Copy_On_Write collection, used to simplify the declaration of the Write_Guard.

Definition at line 44 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_Container::Collection
 

A shorter name for the actual collection type.

Reimplemented in ACE_RMCast_Copy_On_Write.

Definition at line 57 of file RMCast_Copy_On_Write.h.


Constructor & Destructor Documentation

template<class COLLECTION, class ITERATOR>
ACE_RMCast_Copy_On_Write_Container< COLLECTION, ITERATOR >::ACE_RMCast_Copy_On_Write_Container void   
 

Constructor.

Definition at line 135 of file RMCast_Copy_On_Write.cpp.

References ACE_NEW.

00136   : pending_writes_ (0)
00137   , writing_ (0)
00138   , cond_ (mutex_)
00139 {
00140   ACE_NEW (this->collection_, Collection);
00141 }


Friends And Related Function Documentation

template<class COLLECTION, class ITERATOR>
friend class ACE_RMCast_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR > [friend]
 

Let the Read_Guard access the internal fields.

Definition at line 54 of file RMCast_Copy_On_Write.h.

template<class COLLECTION, class ITERATOR>
friend class ACE_RMCast_Copy_On_Write_Write_Guard< COLLECTION, ITERATOR > [friend]
 

Let the Write_Guard access the internal fields.

Definition at line 51 of file RMCast_Copy_On_Write.h.


Member Data Documentation

template<class COLLECTION, class ITERATOR>
Collection* ACE_RMCast_Copy_On_Write_Container::collection_ [protected]
 

The collection, with reference counting added.

Definition at line 77 of file RMCast_Copy_On_Write.h.

Referenced by ACE_RMCast_Copy_On_Write::~ACE_RMCast_Copy_On_Write.

template<class COLLECTION, class ITERATOR>
ACE_SYNCH_CONDITION ACE_RMCast_Copy_On_Write_Container::cond_ [protected]
 

A condition variable to wait to synchronize multiple writers.

Definition at line 74 of file RMCast_Copy_On_Write.h.

Referenced by ACE_RMCast_Copy_On_Write::~ACE_RMCast_Copy_On_Write.

template<class COLLECTION, class ITERATOR>
ACE_SYNCH_MUTEX ACE_RMCast_Copy_On_Write_Container::mutex_ [protected]
 

A mutex to serialize access to the collection pointer.

Definition at line 71 of file RMCast_Copy_On_Write.h.

template<class COLLECTION, class ITERATOR>
int ACE_RMCast_Copy_On_Write_Container::pending_writes_ [protected]
 

Number of pending writes.

Definition at line 61 of file RMCast_Copy_On_Write.h.

Referenced by ACE_RMCast_Copy_On_Write::~ACE_RMCast_Copy_On_Write.

template<class COLLECTION, class ITERATOR>
int ACE_RMCast_Copy_On_Write_Container::writing_ [protected]
 

If non-zero then a thread is changing the collection.

Many threads can use the collection simulatenously, but only one change it.

Definition at line 68 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:54 2003 for ACE_RMCast by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002