Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Auto_Disconnect.h
blobb6f2325dce08a13a71f6ee70b965a90befcbe19f
1 /**
2 * @file Auto_Disconnect.h
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
6 #ifndef TAO_PERF_RTEC_AUTO_DISCONNECT_H
7 #define TAO_PERF_RTEC_AUTO_DISCONNECT_H
9 #include "tao/corba.h"
10 #include "ace/Auto_Functor.h"
12 /**
13 * @class Disconnect
15 * @brief Helper functor to call the disconnect() method of a class.
17 template<class Client>
18 class Disconnect
20 public:
21 void operator() (Client *client);
24 /**
25 * @class Auto_Disconnect
27 * @brief Automatically invoke the disconnect() operation on some
28 * RTEC client.
30 template<class Client>
31 class Auto_Disconnect : public ACE_Utils::Auto_Functor<Client,Disconnect<Client> >
33 public:
34 /// Constructor
35 /**
36 * @param client The client
38 explicit Auto_Disconnect (Client *s = 0);
40 /// Assignment operator
41 Auto_Disconnect<Client>& operator= (Client *client);
44 #if defined(__ACE_INLINE__)
45 #include "Auto_Disconnect.inl"
46 #endif /* __ACE_INLINE__ */
48 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
49 #include "Auto_Disconnect.cpp"
50 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
52 #endif /* TAO_PERF_RTEC_AUTO_DISCONNECT_H */