#include <EC_Lifetime_Utils.h>
Public Member Functions | |
TAO_EC_Event_Channel_Holder (void) | |
Constructor. No-op. | |
~TAO_EC_Event_Channel_Holder (void) | |
Destructor. If holding an Event Channel, destroy it. | |
void | init (RtecEventChannelAdmin::EventChannel_var ec_var) |
Private Member Functions | |
TAO_EC_Event_Channel_Holder & | operator= (const TAO_EC_Event_Channel_Holder &rhs) |
Disallow. | |
TAO_EC_Event_Channel_Holder (const TAO_EC_Event_Channel_Holder &rhs) | |
Disallow. | |
Private Attributes | |
RtecEventChannelAdmin::EventChannel_var | ec_ |
EC to be destroyed. |
Holds a reference to an Event Channel, and calls destroy() on it in the destructor.
Definition at line 184 of file EC_Lifetime_Utils.h.
ACE_INLINE TAO_EC_Event_Channel_Holder::TAO_EC_Event_Channel_Holder | ( | void | ) |
Constructor. No-op.
Definition at line 142 of file EC_Lifetime_Utils.inl.
00143 : ec_ () 00144 { 00145 }
ACE_INLINE TAO_EC_Event_Channel_Holder::~TAO_EC_Event_Channel_Holder | ( | void | ) |
Destructor. If holding an Event Channel, destroy it.
Definition at line 148 of file EC_Lifetime_Utils.inl.
References ec_, and CORBA::is_nil().
00149 { 00150 if (!CORBA::is_nil (this->ec_.in ())) 00151 { 00152 try 00153 { 00154 this->ec_->destroy (); 00155 } 00156 catch (const CORBA::Exception&) 00157 { 00158 // Ignore. 00159 } 00160 } 00161 }
TAO_EC_Event_Channel_Holder::TAO_EC_Event_Channel_Holder | ( | const TAO_EC_Event_Channel_Holder & | rhs | ) | [private] |
Disallow.
ACE_INLINE void TAO_EC_Event_Channel_Holder::init | ( | RtecEventChannelAdmin::EventChannel_var | ec_var | ) |
Set the Event Channel to be destroyed in destructor to ec_var. If TAO_EC_Event_Channel_Holder already held an Event Channel prior to invocation of this method, that Event Channel is NOT destroyed.
Definition at line 164 of file EC_Lifetime_Utils.inl.
References ec_.
00166 { 00167 this->ec_ = ec_var; 00168 }
TAO_EC_Event_Channel_Holder& TAO_EC_Event_Channel_Holder::operator= | ( | const TAO_EC_Event_Channel_Holder & | rhs | ) | [private] |
Disallow.
RtecEventChannelAdmin::EventChannel_var TAO_EC_Event_Channel_Holder::ec_ [private] |
EC to be destroyed.
Definition at line 207 of file EC_Lifetime_Utils.h.
Referenced by init(), and ~TAO_EC_Event_Channel_Holder().