TAO_EC_ORB_Holder Class Reference

Utility for automatically destroying the ORB. More...

#include <EC_Lifetime_Utils.h>

Collaboration diagram for TAO_EC_ORB_Holder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_EC_ORB_Holder (void)
 Constructor. No-op.
 ~TAO_EC_ORB_Holder (void)
 Destructor. If holding an ORB, destroy it.
void init (CORBA::ORB_var orb_var)

Private Member Functions

TAO_EC_ORB_Holderoperator= (const TAO_EC_ORB_Holder &rhs)
 Disallow.
 TAO_EC_ORB_Holder (const TAO_EC_ORB_Holder &rhs)
 Disallow.

Private Attributes

CORBA::ORB_var orb_
 ORB to be destroyed.

Detailed Description

Utility for automatically destroying the ORB.

Holds a reference to an ORB, and calls destroy() on it in the destructor.

Definition at line 148 of file EC_Lifetime_Utils.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_EC_ORB_Holder::TAO_EC_ORB_Holder ( void   ) 

Constructor. No-op.

Definition at line 112 of file EC_Lifetime_Utils.inl.

00113   : orb_ ()
00114 {
00115 }

ACE_INLINE TAO_EC_ORB_Holder::~TAO_EC_ORB_Holder ( void   ) 

Destructor. If holding an ORB, destroy it.

Definition at line 118 of file EC_Lifetime_Utils.inl.

References CORBA::is_nil(), and orb_.

00119 {
00120   if (!CORBA::is_nil (this->orb_.in ()))
00121   {
00122     try
00123       {
00124         this->orb_->destroy ();
00125       }
00126     catch (const CORBA::Exception&)
00127       {
00128         // Ignore.
00129       }
00130   }
00131 }

TAO_EC_ORB_Holder::TAO_EC_ORB_Holder ( const TAO_EC_ORB_Holder rhs  )  [private]

Disallow.


Member Function Documentation

ACE_INLINE void TAO_EC_ORB_Holder::init ( CORBA::ORB_var  orb_var  ) 

Set the ORB to be destroyed in destructor to <orb_var>. If TAO_EC_ORB_Holder already held an orb prior to invocation of this method, that orb is NOT destroyed.

Definition at line 134 of file EC_Lifetime_Utils.inl.

References orb_.

00135 {
00136   this->orb_ = orb_var;
00137 }

TAO_EC_ORB_Holder& TAO_EC_ORB_Holder::operator= ( const TAO_EC_ORB_Holder rhs  )  [private]

Disallow.


Member Data Documentation

CORBA::ORB_var TAO_EC_ORB_Holder::orb_ [private]

ORB to be destroyed.

Definition at line 171 of file EC_Lifetime_Utils.h.

Referenced by init(), and ~TAO_EC_ORB_Holder().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:44:31 2010 for TAO_RTEvent by  doxygen 1.4.7