From d66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de Mon Sep 17 00:00:00 2001 From: Abdullah Sowayan Date: Sun, 18 Mar 2007 22:22:42 +0000 Subject: --- TAO/tao/Cache_Entries.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 TAO/tao/Cache_Entries.cpp (limited to 'TAO/tao/Cache_Entries.cpp') diff --git a/TAO/tao/Cache_Entries.cpp b/TAO/tao/Cache_Entries.cpp new file mode 100644 index 00000000000..99ecb2ad72b --- /dev/null +++ b/TAO/tao/Cache_Entries.cpp @@ -0,0 +1,52 @@ +//$Id$ + +#include "tao/Cache_Entries.h" +#include "tao/Transport.h" + + +#if !defined (__ACE_INLINE__) +# include "tao/Cache_Entries.inl" +#endif /* __ACE_INLINE__ */ + +ACE_RCSID(tao, + Cache_Entries, + "$Id$") + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace TAO +{ + Cache_IntId::Cache_IntId (TAO_Transport *transport) + : transport_ (transport) + , recycle_state_ (ENTRY_UNKNOWN) + { + transport->add_reference (); + } + + Cache_IntId::~Cache_IntId (void) + { + if (this->transport_) + this->transport_->remove_reference (); + } + + Cache_IntId& + Cache_IntId::operator= (const Cache_IntId &rhs) + { + if (this != &rhs) + { + this->recycle_state_ = rhs.recycle_state_; + + TAO_Transport *old_transport = this->transport_; + this->transport_ = rhs.transport_; + if (this->transport_) + this->transport_->add_reference (); + if (old_transport) + old_transport->remove_reference (); + } + + return *this; + } +} + +TAO_END_VERSIONED_NAMESPACE_DECL -- cgit v1.2.1