// CORBA_Ref.cpp // $Id$ #if !defined (ACE_CORBA_REF_C) #define ACE_CORBA_REF_C #include "ace/CORBA_Ref.h" #include "ace/Log_Msg.h" ACE_RCSID(ace, CORBA_Ref, "$Id$") template ACE_CORBA_Ref::ACE_CORBA_Ref (void) : ref_ (0) { ACE_TRACE ("ACE_CORBA_Ref::ACE_CORBA_Ref"); } template ACE_CORBA_Ref::ACE_CORBA_Ref (CORBA_REF *ref) { ACE_TRACE ("ACE_CORBA_Ref::ACE_CORBA_Ref"); if (ref != 0) ref_ = ref->_duplicate (); else ref_ = 0; } template CORBA_REF * ACE_CORBA_Ref::operator= (CORBA_REF *ref) { ACE_TRACE ("ACE_CORBA_Ref::operator="); if (ref_ != 0) ref_->_release (); if (ref == 0) { ref_ = 0; return 0; } else return ref_ = ref->_duplicate (); } template ACE_CORBA_Ref::operator CORBA_REF * (void) const { ACE_TRACE ("ACE_CORBA_Ref::operator CORBA_REF *"); ACE_ASSERT (ref_ != 0); return ref_; } template CORBA_REF * ACE_CORBA_Ref::operator-> (void) const { ACE_TRACE ("ACE_CORBA_Ref::operator->"); ACE_ASSERT (ref_ != 0); return ref_; } template int ACE_CORBA_Ref::operator== (CORBA_REF *rhs) const { ACE_TRACE ("ACE_CORBA_Ref::operator=="); // pointer comparison. return ref_ == rhs; } template int ACE_CORBA_Ref::operator!= (CORBA_REF *rhs) const { ACE_TRACE ("ACE_CORBA_Ref::operator!="); // pointer comparison. return ref_ != rhs; } template ACE_CORBA_Ref::~ACE_CORBA_Ref () { ACE_TRACE ("ACE_CORBA_Ref::~ACE_CORBA_Ref"); if (ref_ != 0) ref_->_release (); } #endif /* ACE_CORBA_REF_C */