blob: b6f2325dce08a13a71f6ee70b965a90befcbe19f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/**
* @file Auto_Disconnect.h
*
* @author Carlos O'Ryan <coryan@uci.edu>
*/
#ifndef TAO_PERF_RTEC_AUTO_DISCONNECT_H
#define TAO_PERF_RTEC_AUTO_DISCONNECT_H
#include "tao/corba.h"
#include "ace/Auto_Functor.h"
/**
* @class Disconnect
*
* @brief Helper functor to call the disconnect() method of a class.
*/
template<class Client>
class Disconnect
{
public:
void operator() (Client *client);
};
/**
* @class Auto_Disconnect
*
* @brief Automatically invoke the disconnect() operation on some
* RTEC client.
*/
template<class Client>
class Auto_Disconnect : public ACE_Utils::Auto_Functor<Client,Disconnect<Client> >
{
public:
/// Constructor
/**
* @param client The client
*/
explicit Auto_Disconnect (Client *s = 0);
/// Assignment operator
Auto_Disconnect<Client>& operator= (Client *client);
};
#if defined(__ACE_INLINE__)
#include "Auto_Disconnect.inl"
#endif /* __ACE_INLINE__ */
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "Auto_Disconnect.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
#endif /* TAO_PERF_RTEC_AUTO_DISCONNECT_H */
|