2 #include "Foo_A_ClientEngine.h"
4 #include "TestAppExceptionC.h"
5 #include "ace/Get_Opt.h"
6 #include "ace/Log_Msg.h"
10 : TestAppBase("TP_Test_1_Client")
15 ClientApp::~ClientApp()
21 ClientApp::run_i(int argc
, ACE_TCHAR
* argv
[])
23 // Initialize the ORB before parsing our own args.
24 CORBA::ORB_var orb
= CORBA::ORB_init(argc
, argv
);
26 // Parse the command-line args for this application.
27 // * Returns -1 if problems are encountered.
28 // * Returns 1 if the usage statement was explicitly requested.
29 // * Returns 0 otherwise.
30 int result
= this->parse_args(argc
, argv
);
35 // Convert the IOR string to a Foo_A object reference.
36 Foo_A_var foo
= RefHelper
<Foo_A
>::string_to_ref(orb
.in(),
39 // Create the appropriate client "engine" object.
40 Foo_A_ClientEngine
engine(foo
.in());
42 // Execute the client algorithm
43 result
= engine
.execute() ? 0 : -1;
50 ClientApp::parse_args(int argc
, ACE_TCHAR
* argv
[])
52 ACE_Get_Opt
get_opts(argc
, argv
, ACE_TEXT("i:"));
56 while ((c
= get_opts()) != -1)
61 this->ior_
= get_opts
.opt_arg();
66 "(%P|%t) usage: %s -i <ior_string>\n",
72 "(%P|%t) usage: %s -i <ior_string>\n",