TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR > Class Template Reference

#include <ESF_Copy_On_Write.h>

Collaboration diagram for TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_ESF_Copy_On_Write_Collection (void)
CORBA::ULong _incr_refcnt (void)
 Increment the reference count.

CORBA::ULong _decr_refcnt (void)
 Decrement the reference count.


Public Attributes

COLLECTION collection
 The actual collection.


Private Attributes

CORBA::ULong refcount_
 The reference count.

template<class COLLECTION, class ITERATOR>
class TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >


Constructor & Destructor Documentation

template<class COLLECTION, class ITERATOR>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::TAO_ESF_Copy_On_Write_Collection void   ) 
 

Definition at line 9 of file ESF_Copy_On_Write.i.

00010       :  refcount_ (1)
00011 {
00012 }


Member Function Documentation

template<class COLLECTION, class ITERATOR>
CORBA::ULong TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::_decr_refcnt void   ) 
 

Decrement the reference count.

Definition at line 24 of file ESF_Copy_On_Write.cpp.

References TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::collection.

Referenced by TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::~TAO_ESF_Copy_On_Write_Read_Guard().

00025 {
00026   // LOCKING: no locking is required, the caller grabs the mutex.
00027   {
00028     this->refcount_--;
00029     if (this->refcount_ != 0)
00030       return this->refcount_;
00031   }
00032 
00033   ITERATOR end = this->collection.end ();
00034   for (ITERATOR i = this->collection.begin (); i != end; ++i)
00035     {
00036       (*i)->_decr_refcnt ();
00037     }
00038 
00039   delete this;
00040   return 0;
00041 }

template<class COLLECTION, class ITERATOR>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::ULong TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::_incr_refcnt void   ) 
 

Increment the reference count.

Definition at line 17 of file ESF_Copy_On_Write.cpp.

Referenced by TAO_ESF_Copy_On_Write_Read_Guard< COLLECTION, ITERATOR, ACE_LOCK >::TAO_ESF_Copy_On_Write_Read_Guard().

00018 {
00019   // LOCKING: no locking is required, the caller grabs the mutex.
00020   return this->refcount_++;
00021 }


Member Data Documentation

template<class COLLECTION, class ITERATOR>
COLLECTION TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::collection
 

The actual collection.

Definition at line 39 of file ESF_Copy_On_Write.h.

Referenced by TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::_decr_refcnt().

template<class COLLECTION, class ITERATOR>
CORBA::ULong TAO_ESF_Copy_On_Write_Collection< COLLECTION, ITERATOR >::refcount_ [private]
 

The reference count.

Definition at line 43 of file ESF_Copy_On_Write.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:08:45 2006 for TAO_ESF by doxygen 1.3.6