Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / Driver.h
bloba5401c3cfe531569b54155667b8bc31dac54f540
1 /* -*- C++ -*- */
2 /**
3 * @file Driver.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
8 #ifndef TAO_Notify_Tests_DRIVER_H
9 #define TAO_Notify_Tests_DRIVER_H
10 #include /**/ "ace/pre.h"
12 #include "notify_test_export.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 # pragma once
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/Service_Config.h"
19 #include "ace/Task.h"
21 #include "tao/ORB.h"
23 #include "Driver_Base.h"
25 class TAO_Notify_Tests_Command_Builder;
26 class TAO_Notify_Tests_Activation_Manager;
28 /**
29 * @class TAO_Notify_Tests_Worker
31 * @brief A Task to execute commands asynchronously.
33 class TAO_Notify_Tests_Worker : public ACE_Task_Base
35 public:
36 TAO_Notify_Tests_Worker ();
37 // ctor
39 /// Set the command builder.
40 void command_builder (TAO_Notify_Tests_Command_Builder* cmd_builder);
42 virtual int svc ();
43 // The thread entry point.
45 void shutdown ();
47 private:
48 /// The command builder
49 TAO_Notify_Tests_Command_Builder* cmd_builder_;
53 /**
54 * Run a server thread
56 * Use the ACE_Task_Base class to run server threads
58 class TAO_Notify_Tests_ORB_Run_Worker : public ACE_Task_Base
60 public:
61 TAO_Notify_Tests_ORB_Run_Worker ();
62 // ctor
64 void orb (CORBA::ORB_ptr orb);
66 /// Srt the run period.
67 void run_period (ACE_Time_Value run_period);
69 virtual int svc ();
70 // The thread entry point.
72 private:
73 /// The orb
74 CORBA::ORB_var orb_;
76 /// ORB Run Period.
77 ACE_Time_Value run_period_;
81 /**
82 * @class TAO_Notify_Tests_Driver
84 * @brief A default Application Starter.
86 class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_Driver : public TAO_Notify_Tests_Driver_Base
88 public:
89 /// Constructor
90 TAO_Notify_Tests_Driver ();
92 /// Destructor
93 ~TAO_Notify_Tests_Driver ();
95 /// Init
96 int init (int argc, ACE_TCHAR *argv[]);
98 /// Execute the commands.
99 void run ();
101 /// Shutdown
102 virtual void shutdown ();
104 protected:
105 /// Parse command line parameters.
106 int parse_args (int argc, ACE_TCHAR *argv[]);
108 /// The command builder
109 TAO_Notify_Tests_Command_Builder* cmd_builder_;
111 /// Manage activation of periodic suppliers and consumers.
112 TAO_Notify_Tests_Activation_Manager* activation_manager_;
114 /// Thread in which to run commands.
115 TAO_Notify_Tests_Worker worker_;
117 /// Thread in which to run the orb.
118 TAO_Notify_Tests_ORB_Run_Worker orb_run_worker_;
120 /// The ORB we run.
121 CORBA::ORB_var orb_;
123 /// ORB Run Period.
124 ACE_Time_Value run_period_;
126 /// The file for output
127 ACE_CString ior_output_file_;
129 /// The file for input
130 ACE_CString ior_input_file_;
132 /// Set to skip the check for multiple priority levels.
133 int skip_priority_levels_check_;
136 #include /**/ "ace/post.h"
137 #endif /* TAO_Notify_Tests_DRIVER_H */