00001 //$Id: Refcounted_ObjectKey.cpp 72219 2006-04-20 13:36:42Z jwillemsen $ 00002 #include "tao/Refcounted_ObjectKey.h" 00003 #include "ace/Log_Msg.h" 00004 00005 #if !defined (__ACE_INLINE__) 00006 #include "tao/Refcounted_ObjectKey.inl" 00007 #endif /* defined INLINE */ 00008 00009 ACE_RCSID(tao, 00010 Refcounted_ObjectKey, 00011 "$Id: Refcounted_ObjectKey.cpp 72219 2006-04-20 13:36:42Z jwillemsen $") 00012 00013 00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00015 00016 TAO::Refcounted_ObjectKey::Refcounted_ObjectKey (const TAO::ObjectKey &key) 00017 : object_key_ (key) 00018 , ref_count_ (1) 00019 { 00020 } 00021 00022 TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey (void) 00023 { 00024 } 00025 00026 CORBA::ULong 00027 TAO::Refcounted_ObjectKey::decr_refcount (void) 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 } 00040 00041 TAO_END_VERSIONED_NAMESPACE_DECL