Public Member Functions | Public Attributes | Private Attributes

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.

Detailed Description

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

Definition at line 27 of file ESF_Copy_On_Write.h.


Constructor & Destructor Documentation

template<class COLLECTION , class ITERATOR >
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.

      :  refcount_ (1)
{
}


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 23 of file ESF_Copy_On_Write.cpp.

{
  // LOCKING: no locking is required, the caller grabs the mutex.
  {
    --this->refcount_;
    if (this->refcount_ != 0)
      return this->refcount_;
  }

  ITERATOR end = this->collection.end ();
  for (ITERATOR i = this->collection.begin (); i != end; ++i)
    {
      (*i)->_decr_refcnt ();
    }

  delete this;
  return 0;
}

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

Increment the reference count.

Definition at line 16 of file ESF_Copy_On_Write.cpp.

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


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.

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines