summaryrefslogtreecommitdiff
path: root/ace/TkReactor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/TkReactor.cpp')
-rw-r--r--ace/TkReactor.cpp77
1 files changed, 40 insertions, 37 deletions
diff --git a/ace/TkReactor.cpp b/ace/TkReactor.cpp
index 5fb8b56db71..7f6ae69e320 100644
--- a/ace/TkReactor.cpp
+++ b/ace/TkReactor.cpp
@@ -5,12 +5,14 @@
ACE_RCSID(ace, TkReactor, "$Id$")
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
ACE_ALLOC_HOOK_DEFINE (ACE_TkReactor)
// Must be called with lock held
ACE_TkReactor::ACE_TkReactor (size_t size,
- int restart,
- ACE_Sig_Handler *h)
+ int restart,
+ ACE_Sig_Handler *h)
: ACE_Select_Reactor (size, restart, h),
ids_ (0),
timeout_ (0)
@@ -49,7 +51,7 @@ ACE_TkReactor::~ACE_TkReactor (void)
int
ACE_TkReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set,
- ACE_Time_Value *max_wait_time)
+ ACE_Time_Value *max_wait_time)
{
ACE_TRACE ("ACE_TkReactor::wait_for_multiple_events");
int nfound;
@@ -63,8 +65,8 @@ ACE_TkReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_s
handle_set.wr_mask_ = this->wait_set_.wr_mask_;
handle_set.ex_mask_ = this->wait_set_.ex_mask_;
nfound = TkWaitForMultipleEvents (width,
- handle_set,
- max_wait_time);
+ handle_set,
+ max_wait_time);
} while (nfound == -1 && this->handle_error () > 0);
@@ -101,7 +103,7 @@ ACE_TkReactor::TimerCallbackProc (ClientData cd)
*/
void
ACE_TkReactor::InputCallbackProc (ClientData cd,
- int /* mask */)
+ int /* mask */)
{
ACE_TkReactor_Input_Callback *callback = (ACE_TkReactor_Input_Callback *) cd;
ACE_TkReactor *self = callback->reactor_;
@@ -123,9 +125,9 @@ ACE_TkReactor::InputCallbackProc (ClientData cd,
wait_set.ex_mask_.set_bit (handle);
int result = ACE_OS::select (handle + 1,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_, &zero);
+ wait_set.rd_mask_,
+ wait_set.wr_mask_,
+ wait_set.ex_mask_, &zero);
ACE_Select_Reactor_Handle_Set dispatch_set;
@@ -133,11 +135,11 @@ ACE_TkReactor::InputCallbackProc (ClientData cd,
if (result > 0)
{
if (wait_set.rd_mask_.is_set (handle))
- dispatch_set.rd_mask_.set_bit (handle);
+ dispatch_set.rd_mask_.set_bit (handle);
if (wait_set.wr_mask_.is_set (handle))
- dispatch_set.wr_mask_.set_bit (handle);
+ dispatch_set.wr_mask_.set_bit (handle);
if (wait_set.ex_mask_.is_set (handle))
- dispatch_set.ex_mask_.set_bit (handle);
+ dispatch_set.ex_mask_.set_bit (handle);
self->dispatch (1, dispatch_set);
}
@@ -145,17 +147,17 @@ ACE_TkReactor::InputCallbackProc (ClientData cd,
int
ACE_TkReactor::TkWaitForMultipleEvents (int width,
- ACE_Select_Reactor_Handle_Set &wait_set,
- ACE_Time_Value *)
+ ACE_Select_Reactor_Handle_Set &wait_set,
+ ACE_Time_Value *)
{
// Check to make sure our handle's are all usable.
ACE_Select_Reactor_Handle_Set temp_set = wait_set;
if (ACE_OS::select (width,
- temp_set.rd_mask_,
- temp_set.wr_mask_,
- temp_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
+ temp_set.rd_mask_,
+ temp_set.wr_mask_,
+ temp_set.ex_mask_,
+ (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
return -1; // Bad file arguments...
// Instead of waiting using <select>, just use the Tk mechanism to
@@ -170,16 +172,16 @@ ACE_TkReactor::TkWaitForMultipleEvents (int width,
// Now actually read the result needed by the <Select_Reactor> using
// <select>.
return ACE_OS::select (width,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero);
+ wait_set.rd_mask_,
+ wait_set.wr_mask_,
+ wait_set.ex_mask_,
+ (ACE_Time_Value *) &ACE_Time_Value::zero);
}
int
ACE_TkReactor::register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
+ ACE_Event_Handler *handler,
+ ACE_Reactor_Mask mask)
{
ACE_TRACE ("ACE_TkReactor::register_handler_i");
@@ -267,8 +269,8 @@ ACE_TkReactor::register_handler_i (ACE_HANDLE handle,
int
ACE_TkReactor::register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
+ ACE_Event_Handler *handler,
+ ACE_Reactor_Mask mask)
{
return ACE_Select_Reactor::register_handler_i (handles,
handler,
@@ -277,7 +279,7 @@ ACE_TkReactor::register_handler_i (const ACE_Handle_Set &handles,
int
ACE_TkReactor::remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
ACE_TRACE ("ACE_TkReactor::remove_handler_i");
@@ -332,10 +334,10 @@ ACE_TkReactor::remove_TkFileHandler (ACE_HANDLE handle)
int
ACE_TkReactor::remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
+ ACE_Reactor_Mask mask)
{
return ACE_Select_Reactor::remove_handler_i (handles,
- mask);
+ mask);
}
// The following functions ensure that there is an Tk timeout for the
@@ -380,9 +382,9 @@ ACE_TkReactor::reset_timer_interval
long
ACE_TkReactor::schedule_timer (ACE_Event_Handler *event_handler,
- const void *arg,
+ const void *arg,
const ACE_Time_Value &delay,
- const ACE_Time_Value &interval)
+ const ACE_Time_Value &interval)
{
ACE_TRACE ("ACE_TkReactor::schedule_timer");
ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
@@ -402,12 +404,12 @@ ACE_TkReactor::schedule_timer (ACE_Event_Handler *event_handler,
int
ACE_TkReactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
+ int dont_call_handle_close)
{
ACE_TRACE ("ACE_TkReactor::cancel_timer");
if (ACE_Select_Reactor::cancel_timer (handler,
- dont_call_handle_close) == -1)
+ dont_call_handle_close) == -1)
return -1;
else
{
@@ -418,14 +420,14 @@ ACE_TkReactor::cancel_timer (ACE_Event_Handler *handler,
int
ACE_TkReactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
+ const void **arg,
+ int dont_call_handle_close)
{
ACE_TRACE ("ACE_TkReactor::cancel_timer");
if (ACE_Select_Reactor::cancel_timer (timer_id,
- arg,
- dont_call_handle_close) == -1)
+ arg,
+ dont_call_handle_close) == -1)
return -1;
else
{
@@ -434,3 +436,4 @@ ACE_TkReactor::cancel_timer (long timer_id,
}
}
+ACE_END_VERSIONED_NAMESPACE_DECL