[6916] Fixed typos in spell checking code.
[getmangos.git] / dep / ACE_wrappers / ace / Msg_WFMO_Reactor.h
blob3c1eadd5b40ac62a648791483ca89e3bcc50ccdf
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Msg_WFMO_Reactor.h
7 * $Id: Msg_WFMO_Reactor.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Beskrovny Evgeny <evgeny_beskrovny@icomverse.com>
10 * @author Irfan Pyarali <irfan@cs.wustl.edu>
12 //=============================================================================
15 #ifndef ACE_MSG_WFMO_REACTOR_H
16 #define ACE_MSG_WFMO_REACTOR_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/ACE_export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO)
27 #include "ace/WFMO_Reactor.h"
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 /**
32 * @class ACE_Msg_WFMO_Reactor
34 * @brief An OO event demultiplexor and event handler dispatcher for
35 * Win32 <MsgWaitForMultipleObjects>.
37 * The ACE_Msg_WFMO_Reactor is an OO event demultiplexor and
38 * event handler Reactor. It differs from <ACE_WFMO_Reactor> by
39 * its ability to react on Windows messages. It is needed when
40 * the task should serve also as a COM/DCOM server.
42 class ACE_Export ACE_Msg_WFMO_Reactor : public ACE_WFMO_Reactor
44 public:
45 // = Initialization and termination methods.
46 /// Initialize <ACE_Msg_WFMO_Reactor> with the default size.
47 ACE_Msg_WFMO_Reactor (ACE_Sig_Handler * = 0,
48 ACE_Timer_Queue * = 0);
50 /**
51 * Initialize <ACE_Msg_WFMO_Reactor> with size @a size. Two slots will be
52 * added to the @a size parameter which will store handles used for
53 * internal management purposes.
55 ACE_Msg_WFMO_Reactor (size_t size,
56 int unused = 0,
57 ACE_Sig_Handler * = 0,
58 ACE_Timer_Queue * = 0);
60 /// Close down the ACE_Msg_WFMO_Reactor and release all of its resources.
61 virtual ~ACE_Msg_WFMO_Reactor (void);
63 /**
64 * This event loop driver blocks for up to @a max_wait_time before
65 * returning. It will return earlier if timer events, I/O events,
66 * window events, or signal events occur. Note that @a max_wait_time
67 * can be 0, in which case this method blocks indefinitely until
68 * events occur.
70 * @a max_wait_time is decremented to reflect how much time this call
71 * took. For instance, if a time value of 3 seconds is passed to
72 * handle_events and an event occurs after 2 seconds,
73 * @a max_wait_time will equal 1 second. This can be used if an
74 * application wishes to handle events for some fixed amount of
75 * time.
77 * <MsgWaitForMultipleObjects> is used as the demultiplexing call
79 * Returns the total number of ACE_Event_Handlers that were
80 * dispatched, 0 if the @a max_wait_time elapsed without dispatching
81 * any handlers, or -1 if an error occurs.
83 * The only difference between <alertable_handle_events> and
84 * <handle_events> is that in the alertable case, MWMO_ALERTABLE is
85 * passed to <MsgWaitForMultipleObjects> for the <bAlertable>
86 * option.
88 virtual int handle_events (ACE_Time_Value *max_wait_time = 0);
89 virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0);
91 /**
92 * This method is just like the one above, except the
93 * @a max_wait_time value is a reference and can therefore never be
94 * NULL.
96 virtual int handle_events (ACE_Time_Value &max_wait_time);
97 virtual int alertable_handle_events (ACE_Time_Value &max_wait_time);
99 protected:
100 /// Wait for timer and I/O events to occur.
101 virtual DWORD wait_for_multiple_events (int timeout,
102 int alertable);
104 /// Check for activity on remaining handles.
105 virtual DWORD poll_remaining_handles (DWORD index);
107 /// Dispatches window messages.
108 virtual int dispatch_window_messages (void);
111 ACE_END_VERSIONED_NAMESPACE_DECL
113 #if defined (__ACE_INLINE__)
114 #include "ace/Msg_WFMO_Reactor.inl"
115 #endif /* __ACE_INLINE__ */
117 #endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
119 #include /**/ "ace/post.h"
120 #endif /* ACE_MSG_WFMO_REACTOR_H */