ACE_XtReactor Class Reference

An object-oriented event demultiplexor and event handler dispatcher that uses the X Toolkit functions. More...

#include <XtReactor.h>

Inheritance diagram for ACE_XtReactor:

Inheritance graph
[legend]
Collaboration diagram for ACE_XtReactor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_XtReactor (XtAppContext context=0, size_t size=DEFAULT_SIZE, int restart=0, ACE_Sig_Handler *=0)
virtual ~ACE_XtReactor (void)
XtAppContext context (void) const
void context (XtAppContext)
virtual long schedule_timer (ACE_Event_Handler *event_handler, const void *arg, const ACE_Time_Value &delay, const ACE_Time_Value &interval)
virtual int reset_timer_interval (long timer_id, const ACE_Time_Value &interval)
virtual int cancel_timer (ACE_Event_Handler *handler, int dont_call_handle_close=1)
virtual int cancel_timer (long timer_id, const void **arg=0, int dont_call_handle_close=1)

Protected Member Functions

virtual int register_handler_i (ACE_HANDLE handle, ACE_Event_Handler *handler, ACE_Reactor_Mask mask)
 Register a single .

virtual int register_handler_i (const ACE_Handle_Set &handles, ACE_Event_Handler *handler, ACE_Reactor_Mask mask)
 Register a set of .

virtual int remove_handler_i (ACE_HANDLE handle, ACE_Reactor_Mask mask)
 Remove the associated with this .

virtual int remove_handler_i (const ACE_Handle_Set &handles, ACE_Reactor_Mask)
 Remove a set of .

virtual void remove_XtInput (ACE_HANDLE handle)
 Removes an Xt handle.

virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &, ACE_Time_Value *)
 Wait for events to occur.

virtual int XtWaitForMultipleEvents (int, ACE_Select_Reactor_Handle_Set &, ACE_Time_Value *)
 Wait for Xt events to occur.


Protected Attributes

XtAppContext context_
ACE_XtReactorIDids_
XtIntervalId timeout_

Private Member Functions

void reset_timeout (void)
 ACE_XtReactor (const ACE_XtReactor &)
 Deny access since member-wise won't work...

ACE_XtReactoroperator= (const ACE_XtReactor &)

Static Private Member Functions

void TimerCallbackProc (XtPointer closure, XtIntervalId *id)
void InputCallbackProc (XtPointer closure, int *source, XtInputId *id)

Detailed Description

An object-oriented event demultiplexor and event handler dispatcher that uses the X Toolkit functions.

Definition at line 59 of file XtReactor.h.


Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_XtReactor::ACE_XtReactor XtAppContext  context = 0,
size_t  size = DEFAULT_SIZE,
int  restart = 0,
ACE_Sig_Handler = 0
 

Definition at line 15 of file XtReactor.cpp.

References ACE_Select_Reactor, ACE_Reactor_Notify::close(), and ACE_Reactor_Notify::open().

00019   : ACE_Select_Reactor (size, restart, h),
00020     context_ (context),
00021     ids_ (0),
00022     timeout_ (0)
00023 {
00024   // When the ACE_Select_Reactor is constructed it creates the notify
00025   // pipe and registers it with the register_handler_i() method. The
00026   // XtReactor overloads this method BUT because the
00027   // register_handler_i occurs when constructing the base class
00028   // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i()
00029   // is called not the XtReactor register_handler_i().  This means
00030   // that the notify pipe is registered with the ACE_Select_Reactor
00031   // event handling code not the XtReactor and so notfications don't
00032   // work.  To get around this we simply close and re-opened the
00033   // notification handler in the constructor of the XtReactor.
00034 
00035 #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
00036   this->notify_handler_->close ();
00037   this->notify_handler_->open (this, 0);
00038 #endif /* ACE_MT_SAFE */
00039 }

ACE_XtReactor::~ACE_XtReactor void   )  [virtual]
 

Definition at line 41 of file XtReactor.cpp.

References ACE_XtReactorID::next_.

00042 {
00043   // Delete the remaining items in the linked list.
00044 
00045   while (this->ids_)
00046     {
00047       ACE_XtReactorID *XtID = this->ids_->next_;
00048       delete this->ids_;
00049       this->ids_ = XtID;
00050     }
00051 }

ACE_XtReactor::ACE_XtReactor const ACE_XtReactor  )  [private]
 

Deny access since member-wise won't work...


Member Function Documentation

int ACE_XtReactor::cancel_timer long  timer_id,
const void **  arg = 0,
int  dont_call_handle_close = 1
[virtual]
 

Cancel the single ACE_Event_Handler that matches the value (which was returned from the method). If arg is non-NULL then it will be set to point to the ``magic cookie'' argument passed in when the was registered. This makes it possible to free up the memory and avoid memory leaks. If is 0 then the method of will be invoked. Returns 1 if cancellation succeeded and 0 if the wasn't found.

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 433 of file XtReactor.cpp.

References ACE_TRACE, ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::cancel_timer(), and reset_timeout().

00436 {
00437   ACE_TRACE ("ACE_XtReactor::cancel_timer");
00438 
00439   if (ACE_Select_Reactor::cancel_timer (timer_id,
00440                                         arg,
00441                                         dont_call_handle_close) == -1)
00442     return -1;
00443   else
00444     {
00445       this->reset_timeout ();
00446       return 0;
00447     }
00448 }

int ACE_XtReactor::cancel_timer ACE_Event_Handler handler,
int  dont_call_handle_close = 1
[virtual]
 

Cancel all that match the address of . If is 0 then the method of will be invoked. Returns number of handler's cancelled.

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 417 of file XtReactor.cpp.

References ACE_TRACE, ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::cancel_timer(), and reset_timeout().

00419 {
00420   ACE_TRACE ("ACE_XtReactor::cancel_timer");
00421 
00422   if (ACE_Select_Reactor::cancel_timer (handler,
00423                                         dont_call_handle_close) == -1)
00424     return -1;
00425   else
00426     {
00427       this->reset_timeout ();
00428       return 0;
00429     }
00430 }

void ACE_XtReactor::context XtAppContext   ) 
 

Definition at line 191 of file XtReactor.cpp.

00192 {
00193   this->context_ = context;
00194 }

XtAppContext ACE_XtReactor::context void   )  const
 

Definition at line 185 of file XtReactor.cpp.

00186 {
00187   return this->context_;
00188 }

void ACE_XtReactor::InputCallbackProc XtPointer  closure,
int *  source,
XtInputId *  id
[static, private]
 

Definition at line 105 of file XtReactor.cpp.

References ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::dispatch(), ACE_Select_Reactor_Handle_Set::ex_mask_, ACE_Handle_Set::is_set(), ACE_Select_Reactor_Handle_Set::rd_mask_, ACE_OS::select(), ACE_Handle_Set::set_bit(), ACE_Select_Reactor_Impl::wait_set_, and ACE_Select_Reactor_Handle_Set::wr_mask_.

00108 {
00109   ACE_XtReactor *self = (ACE_XtReactor *) closure;
00110   ACE_HANDLE handle = (ACE_HANDLE) *source;
00111 
00112   // my copy isn't const.
00113   ACE_Time_Value zero = ACE_Time_Value::zero;
00114 
00115   ACE_Select_Reactor_Handle_Set wait_set;
00116 
00117   // Deal with one file event.
00118 
00119   // - read which kind of event
00120   if (self->wait_set_.rd_mask_.is_set (handle))
00121     wait_set.rd_mask_.set_bit (handle);
00122   if (self->wait_set_.wr_mask_.is_set (handle))
00123     wait_set.wr_mask_.set_bit (handle);
00124   if (self->wait_set_.ex_mask_.is_set (handle))
00125     wait_set.ex_mask_.set_bit (handle);
00126 
00127   int result = ACE_OS::select (*source + 1,
00128                                wait_set.rd_mask_,
00129                                wait_set.wr_mask_,
00130                                wait_set.ex_mask_, &zero);
00131 
00132   ACE_Select_Reactor_Handle_Set dispatch_set;
00133 
00134   // - Use only that one file event (removes events for other files).
00135   if (result > 0)
00136     {
00137       if (wait_set.rd_mask_.is_set (handle))
00138         dispatch_set.rd_mask_.set_bit (handle);
00139       if (wait_set.wr_mask_.is_set (handle))
00140         dispatch_set.wr_mask_.set_bit (handle);
00141       if (wait_set.ex_mask_.is_set (handle))
00142         dispatch_set.ex_mask_.set_bit (handle);
00143 
00144       self->dispatch (1, dispatch_set);
00145     }
00146 }

ACE_XtReactor& ACE_XtReactor::operator= const ACE_XtReactor  )  [private]
 

int ACE_XtReactor::register_handler_i const ACE_Handle_Set handles,
ACE_Event_Handler handler,
ACE_Reactor_Mask  mask
[protected, virtual]
 

Register a set of .

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 278 of file XtReactor.cpp.

References ACE_Reactor_Mask, and ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::register_handler_i().

00281 {
00282   return ACE_Select_Reactor::register_handler_i (handles,
00283                                                  handler,
00284                                                  mask);
00285 }

int ACE_XtReactor::register_handler_i ACE_HANDLE  handle,
ACE_Event_Handler handler,
ACE_Reactor_Mask  mask
[protected, virtual]
 

Register a single .

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 197 of file XtReactor.cpp.

References ACE_ASSERT, ACE_BIT_ENABLED, ACE_NEW_RETURN, ACE_NOTSUP_RETURN, ACE_Reactor_Mask, ACE_SET_BITS, ACE_TRACE, ACE_XtReactorID::handle_, ACE_XtReactorID::id_, ACE_XtReactorID::next_, and ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::register_handler_i().

00200 {
00201   ACE_TRACE ("ACE_XtReactor::register_handler_i");
00202 
00203   // Make sure we have a valid context
00204   ACE_ASSERT (this->context_ != 0);
00205 
00206   int result = ACE_Select_Reactor::register_handler_i (handle,
00207                                                        handler, mask);
00208   if (result == -1)
00209     return -1;
00210 
00211   int condition = 0;
00212 
00213 #if !defined ACE_WIN32
00214   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
00215     ACE_SET_BITS (condition, XtInputReadMask);
00216   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
00217     ACE_SET_BITS (condition, XtInputWriteMask);
00218   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
00219     ACE_SET_BITS (condition, XtInputExceptMask);
00220   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
00221     ACE_SET_BITS (condition, XtInputReadMask);
00222   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)){
00223       ACE_SET_BITS (condition, XtInputWriteMask); // connected, you may write
00224       ACE_SET_BITS (condition, XtInputReadMask);  // connected, you have data/err
00225   }
00226 #else
00227   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
00228     ACE_SET_BITS (condition, XtInputReadWinsock);
00229   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
00230     ACE_SET_BITS (condition, XtInputWriteWinsock);
00231   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
00232     ACE_NOTSUP_RETURN(-1);
00233   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
00234     ACE_SET_BITS (condition, XtInputReadWinsock);
00235   if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)){
00236       ACE_SET_BITS (condition, XtInputWriteWinsock); // connected, you may write
00237       ACE_SET_BITS (condition, XtInputReadWinsock);  // connected, you have data/err
00238   }
00239 #endif /* !ACE_WIN32 */
00240 
00241   if (condition != 0)
00242     {
00243       ACE_XtReactorID *XtID = this->ids_;
00244 
00245       while(XtID)
00246         {
00247           if (XtID->handle_ == handle)
00248             {
00249               ::XtRemoveInput (XtID->id_);
00250 
00251               XtID->id_ = ::XtAppAddInput (this->context_,
00252                                            (int) handle,
00253                                            (XtPointer) condition,
00254                                            InputCallbackProc,
00255                                            (XtPointer) this);
00256               return 0;
00257             }
00258           else
00259             XtID = XtID->next_;
00260         }
00261 
00262       ACE_NEW_RETURN (XtID,
00263                       ACE_XtReactorID,
00264                       -1);
00265       XtID->next_ = this->ids_;
00266       XtID->handle_ = handle;
00267       XtID->id_ = ::XtAppAddInput (this->context_,
00268                                   (int) handle,
00269                                   (XtPointer) condition,
00270                                   InputCallbackProc,
00271                                   (XtPointer) this);
00272       this->ids_ = XtID;
00273     }
00274   return 0;
00275 }

int ACE_XtReactor::remove_handler_i const ACE_Handle_Set handles,
ACE_Reactor_Mask 
[protected, virtual]
 

Remove a set of .

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 343 of file XtReactor.cpp.

References ACE_Reactor_Mask, and ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::remove_handler_i().

00345 {
00346   return ACE_Select_Reactor::remove_handler_i (handles,
00347                                                mask);
00348 }

int ACE_XtReactor::remove_handler_i ACE_HANDLE  handle,
ACE_Reactor_Mask  mask
[protected, virtual]
 

Remove the associated with this .

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 288 of file XtReactor.cpp.

References ACE_Reactor_Mask, ACE_TRACE, ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::remove_handler_i(), and remove_XtInput().

00290 {
00291   ACE_TRACE ("ACE_XtReactor::remove_handler_i");
00292 
00293   // In the registration phase we registered first with
00294   // ACE_Select_Reactor and then with X.  Now we are now doing things
00295   // in reverse order.
00296 
00297   // First clean up the corresponding X11Input.
00298   this->remove_XtInput (handle);
00299 
00300   // Now let the reactor do its work.
00301   return ACE_Select_Reactor::remove_handler_i (handle,
00302                                                mask);
00303 }

void ACE_XtReactor::remove_XtInput ACE_HANDLE  handle  )  [protected, virtual]
 

Removes an Xt handle.

Definition at line 306 of file XtReactor.cpp.

References ACE_TRACE, ACE_XtReactorID::handle_, ACE_XtReactorID::id_, and ACE_XtReactorID::next_.

Referenced by remove_handler_i().

00307 {
00308   ACE_TRACE ("ACE_XtReactor::remove_XtInput");
00309 
00310   ACE_XtReactorID *XtID = this->ids_;
00311 
00312   if (XtID)
00313     {
00314       if (XtID->handle_ == handle)
00315         {
00316           ::XtRemoveInput (XtID->id_);
00317           this->ids_ = XtID->next_;
00318           delete XtID;
00319           return;
00320         }
00321 
00322       ACE_XtReactorID *NextID = XtID->next_;
00323 
00324       while (NextID)
00325         {
00326           if (NextID->handle_ == handle)
00327             {
00328               ::XtRemoveInput(NextID->id_);
00329               XtID->next_ = NextID->next_;
00330               delete NextID;
00331               return;
00332             }
00333           else
00334             {
00335               XtID = NextID;
00336               NextID = NextID->next_;
00337             }
00338         }
00339     }
00340 }

void ACE_XtReactor::reset_timeout void   )  [private]
 

This method ensures there's an Xt timeout for the first timeout in the Reactor's Timer_Queue.

Definition at line 354 of file XtReactor.cpp.

References ACE_ASSERT, ACE_Timer_Queue_T< TYPE, FUNCTOR, ACE_LOCK >::calculate_timeout(), and ACE_Time_Value::msec().

Referenced by cancel_timer(), schedule_timer(), and TimerCallbackProc().

00355 {
00356   // Make sure we have a valid context
00357   ACE_ASSERT (this->context_ != 0);
00358 
00359   if (timeout_)
00360     ::XtRemoveTimeOut (timeout_);
00361   timeout_ = 0;
00362 
00363   ACE_Time_Value *max_wait_time =
00364     this->timer_queue_->calculate_timeout (0);
00365 
00366   if (max_wait_time)
00367     timeout_ = ::XtAppAddTimeOut (this->context_,
00368                                   max_wait_time->msec (),
00369                                   TimerCallbackProc,
00370                                   (XtPointer) this);
00371 }

int ACE_XtReactor::reset_timer_interval long  timer_id,
const ACE_Time_Value interval
[virtual]
 

Resets the interval of the timer represented by to , which is specified in relative time to the current . If is equal to <ACE_Time_Value::zero>, the timer will become a non-rescheduling timer. Returns 0 if successful, -1 if not.

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 375 of file XtReactor.cpp.

References ACE_GUARD_RETURN, ACE_Select_Reactor_Token, and ACE_TRACE.

00377 {
00378   ACE_TRACE ("ACE_XtReactor::reset_timer_interval");
00379   ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
00380 
00381   int const result = ACE_Select_Reactor::timer_queue_->reset_interval
00382     (timer_id,
00383      interval);
00384 
00385   if (result == -1)
00386     return -1;
00387   else
00388     {
00389       this->reset_timeout ();
00390       return result;
00391     }
00392 }

long ACE_XtReactor::schedule_timer ACE_Event_Handler event_handler,
const void *  arg,
const ACE_Time_Value delay,
const ACE_Time_Value interval
[virtual]
 

Schedule an ACE_Event_Handler that will expire after an amount of time. The return value of this method, a timer_id value, uniquely identifies the event_handler in the ACE_Reactor's internal list of timers. This timer_id value can be used to cancel the timer with the cancel_timer() call.

See also:
cancel_timer()

reset_timer_interval()

Parameters:
event_handler Event handler to schedule on reactor
arg Argument passed to the handle_timeout() method of event_handler
delay Time interval after which the timer will expire
interval Time interval after which the timer will be automatically rescheduled
Returns:
-1 on failure, a timer_id value on success

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 395 of file XtReactor.cpp.

References ACE_GUARD_RETURN, ACE_Select_Reactor_Token, ACE_TRACE, reset_timeout(), and ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::schedule_timer().

00399 {
00400   ACE_TRACE ("ACE_XtReactor::schedule_timer");
00401   ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
00402 
00403   long const result = ACE_Select_Reactor::schedule_timer (event_handler,
00404                                                           arg,
00405                                                           delay,
00406                                                           interval);
00407   if (result == -1)
00408     return -1;
00409   else
00410     {
00411       this->reset_timeout ();
00412       return result;
00413     }
00414 }

void ACE_XtReactor::TimerCallbackProc XtPointer  closure,
XtIntervalId *  id
[static, private]
 

Definition at line 89 of file XtReactor.cpp.

References ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::dispatch(), reset_timeout(), and timeout_.

00090 {
00091   ACE_XtReactor *self = (ACE_XtReactor *) closure;
00092   self->timeout_ = 0;
00093 
00094   // Deal with any timer events
00095   ACE_Select_Reactor_Handle_Set handle_set;
00096   self->dispatch (0, handle_set);
00097   self->reset_timeout ();
00098 }

int ACE_XtReactor::wait_for_multiple_events ACE_Select_Reactor_Handle_Set ,
ACE_Time_Value
[protected, virtual]
 

Wait for events to occur.

Reimplemented from ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >.

Definition at line 57 of file XtReactor.cpp.

References ACE_TRACE, ACE_Timer_Queue_T< TYPE, FUNCTOR, ACE_LOCK >::calculate_timeout(), ACE_Select_Reactor_Handle_Set::ex_mask_, ACE_Select_Reactor_T< ACE_SELECT_REACTOR_TOKEN >::handle_error(), ACE_Select_Reactor_Handler_Repository::max_handlep1(), ACE_Select_Reactor_Handle_Set::rd_mask_, ACE_Handle_Set::sync(), ACE_Select_Reactor_Handle_Set::wr_mask_, and XtWaitForMultipleEvents().

00059 {
00060   ACE_TRACE ("ACE_XtReactor::wait_for_multiple_events");
00061   int nfound;
00062 
00063   do
00064     {
00065       max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time);
00066 
00067       size_t width = this->handler_rep_.max_handlep1 ();
00068       handle_set.rd_mask_ = this->wait_set_.rd_mask_;
00069       handle_set.wr_mask_ = this->wait_set_.wr_mask_;
00070       handle_set.ex_mask_ = this->wait_set_.ex_mask_;
00071       nfound = XtWaitForMultipleEvents (width,
00072                                         handle_set,
00073                                         max_wait_time);
00074 
00075     } while (nfound == -1 && this->handle_error () > 0);
00076 
00077   if (nfound > 0)
00078     {
00079 #if !defined (ACE_WIN32)
00080       handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ());
00081       handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ());
00082       handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ());
00083 #endif /* ACE_WIN32 */
00084     }
00085   return nfound; // Timed out or input available
00086 }

int ACE_XtReactor::XtWaitForMultipleEvents int  ,
ACE_Select_Reactor_Handle_Set ,
ACE_Time_Value
[protected, virtual]
 

Wait for Xt events to occur.

Definition at line 149 of file XtReactor.cpp.

References ACE_ASSERT, ACE_Select_Reactor_Handle_Set::ex_mask_, ACE_Select_Reactor_Handler_Repository::max_handlep1(), ACE_Select_Reactor_Handle_Set::rd_mask_, ACE_OS::select(), and ACE_Select_Reactor_Handle_Set::wr_mask_.

Referenced by wait_for_multiple_events().

00152 {
00153   // Make sure we have a valid context
00154   ACE_ASSERT (this->context_ != 0);
00155 
00156   // Check to make sure our handle's are all usable.
00157   ACE_Select_Reactor_Handle_Set temp_set = wait_set;
00158 
00159   if (ACE_OS::select (width,
00160                       temp_set.rd_mask_,
00161                       temp_set.wr_mask_,
00162                       temp_set.ex_mask_,
00163                       (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
00164     return -1; // Bad file arguments...
00165 
00166   // Instead of waiting using <select>, just use the Xt mechanism to
00167   // wait for a single event.
00168 
00169   // Wait for something to happen.
00170   ::XtAppProcessEvent (this->context_, XtIMAll);
00171 
00172   // Reset the width, in case it changed during the upcalls.
00173   width = this->handler_rep_.max_handlep1 ();
00174 
00175   // Now actually read the result needed by the <Select_Reactor> using
00176   // <select>.
00177   return ACE_OS::select (width,
00178                          wait_set.rd_mask_,
00179                          wait_set.wr_mask_,
00180                          wait_set.ex_mask_,
00181                          (ACE_Time_Value *) &ACE_Time_Value::zero);
00182 }


Member Data Documentation

XtAppContext ACE_XtReactor::context_ [protected]
 

Definition at line 118 of file XtReactor.h.

ACE_XtReactorID* ACE_XtReactor::ids_ [protected]
 

Definition at line 119 of file XtReactor.h.

XtIntervalId ACE_XtReactor::timeout_ [protected]
 

Definition at line 120 of file XtReactor.h.

Referenced by TimerCallbackProc().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:33:34 2006 for ACE by doxygen 1.3.6