00001 // -*- C++ -*- 00002 // 00003 // ECG_Mcast_EH.i,v 1.5 2005/11/10 06:47:23 ossama Exp 00004 00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 ACE_INLINE 00008 TAO_ECG_Mcast_EH:: 00009 Observer_Disconnect_Command::Observer_Disconnect_Command (void) 00010 : handle_ () 00011 , ec_ () 00012 { 00013 } 00014 00015 ACE_INLINE 00016 TAO_ECG_Mcast_EH:: 00017 Observer_Disconnect_Command::Observer_Disconnect_Command ( 00018 RtecEventChannelAdmin::Observer_Handle handle, 00019 RtecEventChannelAdmin::EventChannel_ptr ec) 00020 : handle_ (handle) 00021 , ec_ (RtecEventChannelAdmin::EventChannel::_duplicate (ec)) 00022 { 00023 } 00024 00025 ACE_INLINE 00026 TAO_ECG_Mcast_EH:: 00027 Observer_Disconnect_Command::Observer_Disconnect_Command ( 00028 const Observer_Disconnect_Command & rhs) 00029 : handle_ (rhs.handle_) 00030 , ec_ (RtecEventChannelAdmin::EventChannel::_duplicate (rhs.ec_.in())) 00031 { 00032 } 00033 00034 ACE_INLINE 00035 TAO_ECG_Mcast_EH::Observer_Disconnect_Command & 00036 TAO_ECG_Mcast_EH:: 00037 Observer_Disconnect_Command::operator= ( 00038 const Observer_Disconnect_Command & rhs) 00039 { 00040 this->handle_ = rhs.handle_; 00041 this->ec_ = RtecEventChannelAdmin::EventChannel::_duplicate (rhs.ec_.in()); 00042 00043 return *this; 00044 } 00045 00046 ACE_INLINE void 00047 TAO_ECG_Mcast_EH:: 00048 Observer_Disconnect_Command::execute (ACE_ENV_SINGLE_ARG_DECL) 00049 { 00050 if (CORBA::is_nil (this->ec_.in ())) 00051 // We are not connected. 00052 return; 00053 00054 RtecEventChannelAdmin::EventChannel_var release_ec = 00055 this->ec_._retn (); 00056 00057 release_ec->remove_observer (this->handle_ ACE_ENV_ARG_PARAMETER); 00058 ACE_CHECK; 00059 } 00060 00061 //*************************************************************************** 00062 00063 TAO_END_VERSIONED_NAMESPACE_DECL