Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / RIR_Narrow.cpp
blob84cd71f85da3f66c9300f19de8ae3eda7130ab5a
1 /**
2 * @file RIR_Narrow.cpp
4 * @author Jody Hagins <jody@atdesk.com>
5 * @author Carlos O'Ryan <coryan@uci.edu>
6 */
7 #ifndef TAO_PERF_RTEC_RIR_NARROW_CPP
8 #define TAO_PERF_RTEC_RIR_NARROW_CPP
10 #include "RIR_Narrow.h"
12 #include "tao/Environment.h"
14 #include "ace/Log_Msg.h"
16 template<class Interface> typename RIR_Narrow<Interface>::Interface_ptr
17 RIR_Narrow<Interface>::resolve (CORBA::ORB_ptr orb,
18 const char *object_id)
20 Interface_var intface;
22 try
24 CORBA::Object_var object =
25 orb->resolve_initial_references (object_id);
27 intface = Interface::_narrow (object.in ());
29 if (CORBA::is_nil (intface.in ()))
31 ACE_ERROR ((LM_ERROR,
32 "Panic - error while narrowing <%C>\n",
33 object_id));
34 ACE_OS::exit (1);
36 } catch (const CORBA::Exception& ex) {
37 ex._tao_print_exception ("Caught an exception\n");
39 return intface._retn ();
42 #endif /* TAO_PERF_RTEC_RIR_NARROW_CPP */