Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Utils / Implicit_Deactivator.h
blob20e27fc40cbd8de435d0b6c4c9455937316468bb
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Implicit_Deactivator.h
7 * @author Carlos O'Ryan <coryan@atdesk.com>
8 */
9 //=============================================================================
10 #ifndef TAO_UTILS_IMPLICIT_DEACTIVATOR_H
11 #define TAO_UTILS_IMPLICIT_DEACTIVATOR_H
12 #include /**/ "ace/pre.h"
13 #include "tao/Utils/utils_export.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "tao/PortableServer/PortableServer.h"
21 #include "ace/Auto_Functor.h"
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 namespace TAO
27 namespace Utils
29 /**
30 * @struct Implicit_Deactivation_Functor
32 * @brief Implements a functor for the Implicit_Deactivator class.
34 struct TAO_UTILS_Export Implicit_Deactivation_Functor
36 typedef PortableServer::ServantBase * argument;
38 // Deactivate an implicitly activated servant
39 void operator() (PortableServer::ServantBase * servant) noexcept;
42 /**
43 * @class Implicit_Deactivator
45 * @brief Helper class to deactivate implicitly activated servants.
48 typedef ACE_Utils::Auto_Functor<
49 PortableServer::ServantBase,
50 Implicit_Deactivation_Functor>
51 Implicit_Deactivator;
52 } // namespace Utils
53 } // namespace TAO
55 TAO_END_VERSIONED_NAMESPACE_DECL
57 #include /**/ "ace/post.h"
58 #endif /*TAO_UTILS_IMPLICIT_DEACTIVATOR_H*/