1
// test_event_handler_t.cpp,v 4.9 2003/04/09 17:14:23 jwillemsen Exp
3
#include "ace/Event_Handler_T.h"
4
#include "ace/Log_Msg.h"
6
ACE_RCSID(Misc, test_event_handler_t, "test_event_handler_t.cpp,v 4.9 2003/04/09 17:14:23 jwillemsen Exp")
8
#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
10
class ACE_Test_Sig_Handler
13
ACE_Test_Sig_Handler (void) {}
14
virtual ACE_HANDLE get_handle (void) const { return 0; }
15
virtual void set_handle (ACE_HANDLE) {}
16
virtual int handle_async_io (ACE_HANDLE) { return 0; }
17
virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask) { return 0; }
18
virtual int signal_handler (int /* signum */,
29
typedef ACE_Event_Handler_T<ACE_Test_Sig_Handler> EH_SH;
31
// Tie the ACE_Event_Handler_T together with the methods from ACE_Test_Sig_Handler.
32
EH_SH tied_sh (new ACE_Test_Sig_Handler, 1,
33
&ACE_Test_Sig_Handler::get_handle,
34
&ACE_Test_Sig_Handler::handle_async_io,
35
&ACE_Test_Sig_Handler::shutdown,
36
&ACE_Test_Sig_Handler::signal_handler);
40
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
41
defined (ACE_HAS_GNU_REPO)
42
// The explicit instantiation is necessary with g++ 2.91.66 with
43
// -frepo, because it misses it.
44
template class ACE_Event_Handler_T<ACE_Test_Sig_Handler>;
45
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
46
#pragma instantiate ACE_Event_Handler_T<ACE_Test_Sig_Handler>
47
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
53
ACE_ERROR_RETURN ((LM_ERROR, "your platform does not support template typedefs\n"), 1);
55
#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */