00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ORB_Destroyer.h 00006 * 00007 * $Id: ORB_Destroyer.h 77151 2007-02-15 13:24:41Z johnnyw $ 00008 * 00009 * @author Marina Spivak <marina@atdesk.com> 00010 */ 00011 //============================================================================= 00012 #ifndef TAO_UTILS_ORB_DESTROYER_H 00013 #define TAO_UTILS_ORB_DESTROYER_H 00014 #include /**/ "ace/pre.h" 00015 #include "tao/Utils/utils_export.h" 00016 00017 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00018 # pragma once 00019 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00020 00021 #include "tao/ORB.h" 00022 #include "ace/Auto_Functor.h" 00023 00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00025 00026 namespace TAO 00027 { 00028 namespace Utils 00029 { 00030 00031 /** 00032 * @struct ORB_Destroyer_Functor 00033 * 00034 * @brief Implements a functor for the ORB_Destroyer class. 00035 */ 00036 struct TAO_UTILS_Export ORB_Destroyer_Functor 00037 { 00038 typedef CORBA::ORB_ptr argument; 00039 00040 /// Destroy the ORB 00041 void operator() (CORBA::ORB_ptr orb) throw (); 00042 }; 00043 00044 /** 00045 * @class ORB_Destroyer 00046 * 00047 * @brief Helper class to destroy an ORB. 00048 * 00049 */ 00050 typedef ACE_Utils::Auto_Functor< 00051 CORBA::ORB, 00052 ORB_Destroyer_Functor> 00053 ORB_Destroyer; 00054 00055 } // namespace Utils 00056 } // namespace TAO 00057 00058 TAO_END_VERSIONED_NAMESPACE_DECL 00059 00060 #include /**/ "ace/post.h" 00061 #endif /* TAO_UTILS_ORB_DESTROYER_H*/