1 #include "tao/IFR_Client/IFR_BasicC.h"
3 #include "ace/OS_NS_string.h"
4 #include "ace/Log_Msg.h"
6 int ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
10 CORBA::ORB_var orb_
= CORBA::ORB_init (argc
, argv
);
12 CORBA::Object_var object
=
13 orb_
->resolve_initial_references ("InterfaceRepository");
15 CORBA::Repository_var repo_
= CORBA::Repository::_narrow (object
.in ());
18 CORBA::ContainedSeq_var interfaces
=
19 repo_
->contents (CORBA::dk_Interface
, // Any type of contained object.
20 1); // Exclude parents of interfaces.
22 CORBA::ULong length
= interfaces
->length ();
26 ACE_DEBUG ((LM_DEBUG
, "CLIENT (%P): Incorrect number of elements in IFR - length is %d\n", length
));
30 CORBA::ULong first_one
= 0;
32 CORBA::InterfaceDef_var the_interface
=
33 CORBA::InterfaceDef::_narrow (interfaces
[first_one
]);
35 CORBA::String_var name
= the_interface
->name();
37 if (ACE_OS::strcmp (name
.in(), "int"))
39 ACE_DEBUG ((LM_DEBUG
, "CLIENT (%P): Interface name has been munged - it is now %C\n",
46 catch (const CORBA::Exception
& ex
)
48 ex
._tao_print_exception ("Exception ...");