1 # include "Collocation_Tester.h"
2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT ("file://test.ior");
7 parse_args (int argc
, ACE_TCHAR
*argv
[])
9 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
12 while ((c
= get_opts ()) != -1)
16 ior
= get_opts
.opt_arg ();
21 ACE_ERROR_RETURN ((LM_ERROR
,
28 // Indicates successful parsing of the command line
32 int ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
37 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
, "TAO");
39 if (parse_args (argc
, argv
) != 0)
42 CORBA::Object_var object
= orb
->string_to_object (ior
);
44 if (CORBA::is_nil (object
.in ()))
46 ACE_DEBUG ((LM_DEBUG
, "Invalid IOR file\n"));
50 Collocation_Tester
tester (object
.in ());
53 catch (const CORBA::Exception
& ex
)
55 ex
._tao_print_exception ("CORBA Exception Raised");