Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Timer_Queue / main_reactor.cpp
blob849c489e1d3862f63e6e7b8340b3855c9829bfcf
2 //=============================================================================
3 /**
4 * @file main_reactor.cpp
6 * Implements an reactive timer queue.
7 * This code exercises the Timer_Queue_Test_Driver class using
8 * a reactor.
10 * @author Douglas Schmidt <d.schmidt@vanderbilt.edu> && Sergio Flores-Gaitan <sergio@cs.wustl.edu>
12 //=============================================================================
14 #include "ace/OS_main.h"
15 #include "Reactor_Timer_Queue_Test.h"
16 #include "Driver.h"
17 #include <memory>
19 typedef Timer_Queue_Test_Driver <ACE_Timer_Heap,
20 Input_Handler,
21 Input_Handler::ACTION>
22 REACTOR_TIMER_QUEUE_TEST_DRIVER;
24 int
25 ACE_TMAIN (int, ACE_TCHAR *[])
27 REACTOR_TIMER_QUEUE_TEST_DRIVER *tqtd;
28 ACE_NEW_RETURN (tqtd, Reactor_Timer_Queue_Test_Driver, -1);
29 // unique ptr ensures that the driver memory is released
30 // automatically.
31 std::unique_ptr <REACTOR_TIMER_QUEUE_TEST_DRIVER> driver (tqtd);
33 return driver->run_test ();