Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / System_Time_Policy_Strategy.cpp
blob7f72324b9063d3749fe4f1bace879d8fb400f049
1 #include "tao/System_Time_Policy_Strategy.h"
3 #include "ace/Timer_Heap_T.h"
4 #include "ace/Event_Handler_Handle_Timeout_Upcall.h"
6 #if (TAO_HAS_TIME_POLICY == 1)
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 ACE_Time_Policy_T<ACE_System_Time_Policy> TAO_System_Time_Policy_Strategy::time_policy_;
12 TAO_System_Time_Policy_Strategy::~TAO_System_Time_Policy_Strategy ()
16 ACE_Timer_Queue * TAO_System_Time_Policy_Strategy::create_timer_queue ()
18 ACE_Timer_Queue * tmq = nullptr;
20 typedef ACE_Timer_Heap_T<ACE_Event_Handler *,
21 ACE_Event_Handler_Handle_Timeout_Upcall,
22 ACE_SYNCH_RECURSIVE_MUTEX,
23 ACE_System_Time_Policy> timer_queue_type;
24 ACE_NEW_RETURN (tmq, timer_queue_type (), nullptr);
26 return tmq;
29 void
30 TAO_System_Time_Policy_Strategy::destroy_timer_queue (ACE_Timer_Queue *tmq)
32 delete tmq;
35 ACE_Dynamic_Time_Policy_Base * TAO_System_Time_Policy_Strategy::get_time_policy ()
37 return &time_policy_;
41 ACE_STATIC_SVC_DEFINE (TAO_System_Time_Policy_Strategy,
42 ACE_TEXT ("TAO_SYSTEM_TIME_POLICY"),
43 ACE_SVC_OBJ_T,
44 &ACE_SVC_NAME (TAO_System_Time_Policy_Strategy),
45 ACE_Service_Type::DELETE_THIS |
46 ACE_Service_Type::DELETE_OBJ,
49 ACE_FACTORY_DEFINE (TAO, TAO_System_Time_Policy_Strategy)
51 TAO_END_VERSIONED_NAMESPACE_DECL
53 #endif /* TAO_HAS_TIME_POLICY */