Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / CSD_Strategy_Tests / TP_Test_3 / ClientApp.h
blob8160a06399533c868e86e9e90ed2d7c16b2fb1fc
1 #ifndef CLIENTAPP_H
2 #define CLIENTAPP_H
4 #include "TestAppBase.h"
5 #include "ClientEngine.h"
6 #include "ServantList_T.h"
7 #include "Callback_i.h"
8 #include "ClientTask.h"
9 #include "tao/CSD_ThreadPool/CSD_TP_Strategy.h"
10 #include "tao/ORB.h"
11 #include "ace/SString.h"
14 class ClientApp : public TestAppBase
16 public:
17 ClientApp();
18 virtual ~ClientApp();
20 protected:
21 virtual int run_i(int argc, ACE_TCHAR* argv[]);
24 private:
25 // These are all called, in order, by the run_i() method.
26 int init(int argc, ACE_TCHAR* argv[]);
27 void poa_setup();
28 void csd_setup();
29 void client_setup();
30 void poa_activate();
31 void run_clients();
32 void run_orb_event_loop();
33 bool check_validity ();
34 void cleanup();
36 // Helper methods used by the methods above.
37 int parse_args(int argc, ACE_TCHAR* argv[]);
39 int set_arg(unsigned& value,
40 const ACE_TCHAR* arg,
41 char opt,
42 const char* name,
43 int min = 0);
45 void usage_statement();
46 int arg_dependency_checks();
48 PortableServer::POA_ptr create_poa(CORBA::ORB_ptr orb,
49 const char* poa_name);
52 typedef ServantList<Callback_i> ServantListType;
54 CORBA::ORB_var orb_;
55 PortableServer::POA_var poa_;
56 TAO::CSD::TP_Strategy_Handle tp_strategy_;
58 ServantListType servants_;
60 ClientTask client_task_;
62 ACE_TString exe_name_;
64 unsigned num_servants_;
65 unsigned num_csd_threads_;
66 unsigned num_orb_threads_;
68 ACE_TString ior_;
69 unsigned client_kind_;
70 unsigned client_id_;
73 #endif