// -*- C++ -*- TAO_BEGIN_VERSIONED_NAMESPACE_DECL template ACE_INLINE TAO_Intrusive_Ref_Count_Handle::TAO_Intrusive_Ref_Count_Handle () : ptr_(0) { } template ACE_INLINE TAO_Intrusive_Ref_Count_Handle::TAO_Intrusive_Ref_Count_Handle ( T* p, bool take_ownership) : ptr_(p) { if (!take_ownership) { this->claim (); } } template ACE_INLINE TAO_Intrusive_Ref_Count_Handle::TAO_Intrusive_Ref_Count_Handle ( const TAO_Intrusive_Ref_Count_Handle& b) : ptr_(b.ptr_) { this->claim(); } template ACE_INLINE TAO_Intrusive_Ref_Count_Handle::~TAO_Intrusive_Ref_Count_Handle() { this->drop(); } template ACE_INLINE TAO_Intrusive_Ref_Count_Handle& TAO_Intrusive_Ref_Count_Handle::operator=(T* p) { TAO_Intrusive_Ref_Count_Handle tmp (p); return this->operator= (tmp); } template ACE_INLINE TAO_Intrusive_Ref_Count_Handle& TAO_Intrusive_Ref_Count_Handle::operator= (const TAO_Intrusive_Ref_Count_Handle& b) { // Strongly exception-safe assignment through the usual copy and // swap technique. TAO_Intrusive_Ref_Count_Handle tmp (b); T * old_ptr = this->ptr_; this->ptr_ = tmp.ptr_; tmp.ptr_ = old_ptr; return *this; } template ACE_INLINE T* TAO_Intrusive_Ref_Count_Handle::operator->() const { return this->ptr_; } template ACE_INLINE bool TAO_Intrusive_Ref_Count_Handle::is_nil() const { return this->ptr_ == 0; } template ACE_INLINE T* TAO_Intrusive_Ref_Count_Handle::in() const { return this->ptr_; } template ACE_INLINE T*& TAO_Intrusive_Ref_Count_Handle::inout() { return this->ptr_; } template ACE_INLINE T*& TAO_Intrusive_Ref_Count_Handle::out() { this->drop(); return this->ptr_; } template ACE_INLINE T* TAO_Intrusive_Ref_Count_Handle::_retn() { T* retval = this->ptr_; this->ptr_ = 0; return retval; } template ACE_INLINE bool TAO_Intrusive_Ref_Count_Handle::operator== (const TAO_Intrusive_Ref_Count_Handle& h) const { return this->ptr_ == h.in(); } template ACE_INLINE void TAO_Intrusive_Ref_Count_Handle::claim() { if (this->ptr_ != 0) { this->ptr_->_add_ref(); } } template ACE_INLINE void TAO_Intrusive_Ref_Count_Handle::drop() { if (this->ptr_ != 0) { this->ptr_->_remove_ref(); this->ptr_ = 0; } } TAO_END_VERSIONED_NAMESPACE_DECL