1 #include "ace/Event_Handler.h"
3 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
6 ACE_Event_Handler_Handle_Timeout_Upcall::
7 registration (ACE_Timer_Queue &,
8 ACE_Event_Handler *event_handler,
11 event_handler->add_reference ();
16 ACE_Event_Handler_Handle_Timeout_Upcall::
17 preinvoke (ACE_Timer_Queue &,
18 ACE_Event_Handler *event_handler,
21 const ACE_Time_Value &,
22 const void * & upcall_act)
24 bool const requires_reference_counting =
25 event_handler->reference_counting_policy ().value () ==
26 ACE_Event_Handler::Reference_Counting_Policy::ENABLED;
28 if (requires_reference_counting)
30 event_handler->add_reference ();
32 upcall_act = &this->requires_reference_counting_;
39 ACE_Event_Handler_Handle_Timeout_Upcall::
40 postinvoke (ACE_Timer_Queue & /* timer_queue */,
41 ACE_Event_Handler *event_handler,
42 const void * /* timer_act */,
43 int /* recurring_timer */,
44 const ACE_Time_Value & /* cur_time */,
45 const void *upcall_act)
47 if (upcall_act == &this->requires_reference_counting_)
49 event_handler->remove_reference ();
56 ACE_Event_Handler_Handle_Timeout_Upcall::
57 cancel_timer (ACE_Timer_Queue &,
58 ACE_Event_Handler *event_handler,
60 int requires_reference_counting)
62 if (requires_reference_counting)
63 event_handler->remove_reference ();
69 ACE_END_VERSIONED_NAMESPACE_DECL