2 #ifndef JAWS_EVENT_DISPATCHER_H
3 #define JAWS_EVENT_DISPATCHER_H
5 #include "ace/Reactor.h"
6 #include "ace/Reactor_Token_T.h"
7 #include "ace/Select_Reactor.h"
9 #include "jaws3/Export.h"
11 // We are using the Reactor in a single threaded manner,
12 // so if we are using the Select Reactor, get rid of the
15 typedef ACE_Reactor_Token_T
<ACE_Noop_Token
>
16 ACE_Select_Reactor_Noop_Token
;
18 typedef ACE_Select_Reactor_T
<ACE_Select_Reactor_Noop_Token
>
19 ACE_Select_NULL_LOCK_Reactor
;
21 #if !defined (ACE_WIN32) \
22 || !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0) \
23 || defined (ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) \
24 || defined (ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL)
26 #define ACE_REACTOR_INSTANCE_INIT \
28 ACE_Select_NULL_LOCK_Reactor *select_reactor; \
29 select_reactor = new ACE_Select_NULL_LOCK_Reactor; \
30 ACE_Reactor::instance (new ACE_Reactor (select_reactor, 1), 1); \
35 #define ACE_REACTOR_INSTANCE_INIT ACE_Reactor::instance ()
37 #endif /* ACE_WIN32 */
39 class JAWS_Event_Dispatcher
;
41 class JAWS_Export JAWS_Event_Dispatcher
44 static void end_event_loop ();
45 static void run_event_loop ();
48 #endif /* JAWS_EVENT_DISPATCHER_H */