Public Types | Public Member Functions | Public Attributes | Private Attributes

TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK > Class Template Reference

TAO_ESF_Copy_On_Write_Read_Guard. More...

#include <ESF_Copy_On_Write.h>

Collaboration diagram for TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
TAO_ESF_Copy_On_Write_Collection
< COLLECTION, ITERATOR > 
Collection
 Constructor.

Public Member Functions

 TAO_ESF_Copy_On_Write_Read_Guard (ACE_LOCK &mutex, Collection *&collection)
 ~TAO_ESF_Copy_On_Write_Read_Guard (void)
 Destructor.

Public Attributes

Collectioncollection

Private Attributes

ACE_LOCK & mutex

Detailed Description

template<class COLLECTION, class ITERATOR, class ACE_LOCK>
class TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >

TAO_ESF_Copy_On_Write_Read_Guard.

This helper class atomically increments the reference count of a TAO_ESF_Copy_On_Write_Collection and reads the current collection in the Copy_On_Write class.

Definition at line 58 of file ESF_Copy_On_Write.h.


Member Typedef Documentation

template<class COLLECTION , class ITERATOR , class ACE_LOCK >
typedef TAO_ESF_Copy_On_Write_Collection<COLLECTION,ITERATOR> TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::Collection

Constructor.

Definition at line 62 of file ESF_Copy_On_Write.h.


Constructor & Destructor Documentation

template<class COLLECTION , class ITERATOR , class ACE_LOCK >
TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::TAO_ESF_Copy_On_Write_Read_Guard ( ACE_LOCK &  mutex,
Collection *&  collection 
)

Definition at line 18 of file ESF_Copy_On_Write.inl.

      :  collection (0),
         mutex (m)
{
  ACE_GUARD (ACE_LOCK, ace_mon, this->mutex);
  this->collection = collection_ref;
  this->collection->_incr_refcnt ();
}

template<class COLLECTION , class ITERATOR , class ACE_LOCK >
TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::~TAO_ESF_Copy_On_Write_Read_Guard ( void   ) 

Destructor.

Definition at line 30 of file ESF_Copy_On_Write.inl.

{
  if (this->collection != 0)
    {
      ACE_GUARD (ACE_LOCK, ace_mon, this->mutex);
      this->collection->_decr_refcnt ();
    }
}


Member Data Documentation

template<class COLLECTION , class ITERATOR , class ACE_LOCK >
Collection* TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::collection

Definition at line 69 of file ESF_Copy_On_Write.h.

template<class COLLECTION , class ITERATOR , class ACE_LOCK >
ACE_LOCK& TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::mutex [private]

Definition at line 72 of file ESF_Copy_On_Write.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines