Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Event_Dispatcher.h
blob6fb71ce353f1d95333d0f93a66a4c853dea5263c
1 /* -*- c++ -*- */
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
13 // big reactor lock.
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 \
27 do { \
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); \
31 } while (0)
33 #else
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
43 public:
44 static void end_event_loop ();
45 static void run_event_loop ();
48 #endif /* JAWS_EVENT_DISPATCHER_H */