TAO_Local_RefCounted_Object Class Reference

This class adds default reference counting to local objects. More...

#include <LocalObject.h>

Inheritance diagram for TAO_Local_RefCounted_Object:

Inheritance graph
[legend]
Collaboration diagram for TAO_Local_RefCounted_Object:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~TAO_Local_RefCounted_Object (void)
 Destructor.

virtual void _add_ref (void)
 Increment reference count.

virtual void _remove_ref (void)
 Decrement reference count.


Protected Member Functions

 TAO_Local_RefCounted_Object (void)

Protected Attributes

ACE_Atomic_Op< TAO_SYNCH_MUTEX,
CORBA::ULong
refcount_
 Reference counter.


Private Member Functions

Unimplemented methods
 TAO_Local_RefCounted_Object (const TAO_Local_RefCounted_Object &)
TAO_Local_RefCounted_Objectoperator= (const TAO_Local_RefCounted_Object &)

Detailed Description

This class adds default reference counting to local objects.

This is proprietary convenience class that implements reference counting in locality constrained objects.

Definition at line 221 of file LocalObject.h.


Constructor & Destructor Documentation

TAO_Local_RefCounted_Object::~TAO_Local_RefCounted_Object void   )  [virtual]
 

Destructor.

Definition at line 223 of file LocalObject.cpp.

00224 {
00225 }

ACE_INLINE TAO_Local_RefCounted_Object::TAO_Local_RefCounted_Object void   )  [protected]
 

Make it protected to prevent instantiation of this class.

Definition at line 50 of file LocalObject.i.

00051   : refcount_ (1)
00052 {
00053 }

TAO_Local_RefCounted_Object::TAO_Local_RefCounted_Object const TAO_Local_RefCounted_Object  )  [private]
 


Member Function Documentation

void TAO_Local_RefCounted_Object::_add_ref void   )  [virtual]
 

Increment reference count.

Reimplemented from CORBA::LocalObject.

Definition at line 228 of file LocalObject.cpp.

00229 {
00230   ++this->refcount_;
00231 }

void TAO_Local_RefCounted_Object::_remove_ref void   )  [virtual]
 

Decrement reference count.

Reimplemented from CORBA::LocalObject.

Definition at line 234 of file LocalObject.cpp.

00235 {
00236   const CORBA::ULong new_count = --this->refcount_;
00237 
00238   if (new_count == 0)
00239     delete this;
00240 }

TAO_Local_RefCounted_Object& TAO_Local_RefCounted_Object::operator= const TAO_Local_RefCounted_Object  )  [private]
 


Member Data Documentation

ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> TAO_Local_RefCounted_Object::refcount_ [protected]
 

Reference counter.

Reimplemented from CORBA::Object.

Definition at line 257 of file LocalObject.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:22:26 2006 for TAO by doxygen 1.3.6