Cache_Entries.cpp

Go to the documentation of this file.
00001 //$Id: Cache_Entries.cpp 79338 2007-08-14 16:21:42Z mesnier_p $
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           "$Id: Cache_Entries.cpp 79338 2007-08-14 16:21:42Z mesnier_p $")
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     , is_connected_ (false)
00024   {
00025     this->is_connected_ = transport->is_connected();
00026     transport->add_reference ();
00027   }
00028 
00029   Cache_IntId::~Cache_IntId (void)
00030   {
00031     if (this->transport_)
00032       this->transport_->remove_reference ();
00033   }
00034 
00035   Cache_IntId&
00036   Cache_IntId::operator= (const Cache_IntId &rhs)
00037   {
00038     if (this != &rhs)
00039       {
00040         this->recycle_state_ = rhs.recycle_state_;
00041         this->is_connected_ = rhs.is_connected_;
00042         TAO_Transport *old_transport = this->transport_;
00043         this->transport_ = rhs.transport_;
00044         if (this->transport_)
00045           this->transport_->add_reference ();
00046         if (old_transport)
00047           old_transport->remove_reference ();
00048       }
00049 
00050     return *this;
00051   }
00052 }
00053 
00054 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:37:51 2010 for TAO by  doxygen 1.4.7