TAO::Refcounted_ObjectKey Class Reference

A wrapper class that ties together a refcount to an ObjectKey. More...

#include <Refcounted_ObjectKey.h>

List of all members.

Public Member Functions

 Refcounted_ObjectKey (const ObjectKey &ref)
 Constructor.
const ObjectKeyobject_key (void) const
 Accessor for the underlying ObjectKey.

Protected Member Functions

 ~Refcounted_ObjectKey (void)
 Protected destructor.
void incr_refcount (void)
 Methods for incrementing refcount.
CORBA::ULong decr_refcount (void)

Private Attributes

ObjectKey object_key_
 The object key.
CORBA::ULong ref_count_
 The refcount on the object key..

Friends

class ObjectKey_Table


Detailed Description

A wrapper class that ties together a refcount to an ObjectKey.

The refcount in this class is manipulated within the context of the lock in the TAO::ObjectKey_Table. Manipulating the refcount from anywhere else is strictly forbidden.

Definition at line 40 of file Refcounted_ObjectKey.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::Refcounted_ObjectKey::Refcounted_ObjectKey ( const ObjectKey ref  ) 

Constructor.

Definition at line 16 of file Refcounted_ObjectKey.cpp.

00017   : object_key_ (key)
00018   , ref_count_ (1)
00019 {
00020 }

TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey ( void   )  [protected]

Protected destructor.

Definition at line 22 of file Refcounted_ObjectKey.cpp.

References ~Refcounted_ObjectKey().

Referenced by ~Refcounted_ObjectKey().

00023 {
00024 }


Member Function Documentation

CORBA::ULong TAO::Refcounted_ObjectKey::decr_refcount ( void   )  [protected]

Methods for decrementing refcount. Return the refcount, used by the ObjectKey table.

Definition at line 27 of file Refcounted_ObjectKey.cpp.

References ACE_ASSERT, decr_refcount(), and ref_count_.

Referenced by decr_refcount().

00028 {
00029   if (--this->ref_count_ > 0)
00030     {
00031       return this->ref_count_;
00032     }
00033 
00034   ACE_ASSERT (this->ref_count_ == 0);
00035 
00036   delete this;
00037 
00038   return 0;
00039 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void TAO::Refcounted_ObjectKey::incr_refcount ( void   )  [protected]

Methods for incrementing refcount.

Definition at line 9 of file Refcounted_ObjectKey.inl.

References incr_refcount(), and ref_count_.

Referenced by incr_refcount().

00010 {
00011   ++this->ref_count_;
00012 }

ACE_INLINE const TAO::ObjectKey & TAO::Refcounted_ObjectKey::object_key ( void   )  const

Accessor for the underlying ObjectKey.

Definition at line 15 of file Refcounted_ObjectKey.inl.

References object_key(), and object_key_.

Referenced by object_key().

00016 {
00017   return this->object_key_;
00018 }


Friends And Related Function Documentation

friend class ObjectKey_Table [friend]

Definition at line 50 of file Refcounted_ObjectKey.h.


Member Data Documentation

ObjectKey TAO::Refcounted_ObjectKey::object_key_ [private]

The object key.

Definition at line 64 of file Refcounted_ObjectKey.h.

Referenced by object_key().

CORBA::ULong TAO::Refcounted_ObjectKey::ref_count_ [private]

The refcount on the object key..

Definition at line 67 of file Refcounted_ObjectKey.h.

Referenced by decr_refcount(), and incr_refcount().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:17 2010 for TAO by  doxygen 1.4.7