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.inl.

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 22 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().

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

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 15 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().

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


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 Sun Jan 27 13:38:50 2008 for TAO_ESF by doxygen 1.3.6