00001 //Cache_Entries.cpp,v 1.11 2005/11/02 07:13:02 ossama Exp 00002 00003 #include "tao/Cache_Entries.h" 00004 #include "tao/Transport.h" 00005 00006 00007 #if !defined (__ACE_INLINE__) 00008 # include "tao/Cache_Entries.inl" 00009 #endif /* __ACE_INLINE__ */ 00010 00011 ACE_RCSID(tao, 00012 Cache_Entries, 00013 "Cache_Entries.cpp,v 1.11 2005/11/02 07:13:02 ossama Exp") 00014 00015 00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00017 00018 namespace TAO 00019 { 00020 Cache_IntId::Cache_IntId (TAO_Transport *transport) 00021 : transport_ (transport) 00022 , recycle_state_ (ENTRY_UNKNOWN) 00023 { 00024 transport->add_reference (); 00025 } 00026 00027 Cache_IntId::~Cache_IntId (void) 00028 { 00029 if (this->transport_) 00030 this->transport_->remove_reference (); 00031 } 00032 00033 Cache_IntId& 00034 Cache_IntId::operator= (const Cache_IntId &rhs) 00035 { 00036 if (this != &rhs) 00037 { 00038 this->recycle_state_ = rhs.recycle_state_; 00039 00040 TAO_Transport *old_transport = this->transport_; 00041 this->transport_ = rhs.transport_; 00042 if (this->transport_) 00043 this->transport_->add_reference (); 00044 if (old_transport) 00045 old_transport->remove_reference (); 00046 } 00047 00048 return *this; 00049 } 00050 } 00051 00052 TAO_END_VERSIONED_NAMESPACE_DECL