Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Utils / ORB_Destroyer.h
blob694ab3d35fc26973c85bc311408e6a81b9c0ae83
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ORB_Destroyer.h
7 * @author Marina Spivak <marina@atdesk.com>
8 */
9 //=============================================================================
10 #ifndef TAO_UTILS_ORB_DESTROYER_H
11 #define TAO_UTILS_ORB_DESTROYER_H
12 #include /**/ "ace/pre.h"
13 #include "tao/Utils/utils_export.h"
15 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 # pragma once
17 #endif /* ACE_LACKS_PRAGMA_ONCE */
19 #include "tao/ORB.h"
20 #include "ace/Auto_Functor.h"
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
24 namespace TAO
26 namespace Utils
28 /**
29 * @struct ORB_Destroyer_Functor
31 * @brief Implements a functor for the ORB_Destroyer class.
33 struct TAO_UTILS_Export ORB_Destroyer_Functor
35 typedef CORBA::ORB_ptr argument;
37 /// Destroy the ORB
38 void operator() (CORBA::ORB_ptr orb) noexcept;
41 /**
42 * @class ORB_Destroyer
44 * @brief Helper class to destroy an ORB.
47 typedef ACE_Utils::Auto_Functor<
48 CORBA::ORB,
49 ORB_Destroyer_Functor>
50 ORB_Destroyer;
51 } // namespace Utils
52 } // namespace TAO
54 TAO_END_VERSIONED_NAMESPACE_DECL
56 #include /**/ "ace/post.h"
57 #endif /* TAO_UTILS_ORB_DESTROYER_H*/