24 #ifndef OMNIEVENTS__ORB_H
25 #define OMNIEVENTS__ORB_H
34 # include <omniORB3/CORBA.h>
38 # include <omniORB4/CORBA.h>
42 # define IFELSE_OMNIORB4(omniORB4_code,default_code) omniORB4_code
43 # define IF_OMNIORB4(omniORB4_code) omniORB4_code
45 # define IFELSE_OMNIORB4(omniORB4_code,default_code) default_code
46 # define IF_OMNIORB4(omniORB4_code)
50 {if(omniORB::trace(l)){omniORB::logger log("omniEvents: ");log<<x<<"\n";}}
52 #define NP_MINORSTRING(systemException) \
53 ((systemException).NP_minorString()?(systemException).NP_minorString():"??")
55 #define AS_STR_2(x) #x
56 #define AS_STR_1(x) AS_STR_2(x)
58 #define HERE __FILE__ ":" AS_STR_1(__LINE__)
77 Orb():_shutdownRequested(false){}
93 PortableServer::Current_ptr _POACurrent;
97 void resolveInitialReferences();
109 void deferredRequest(CORBA::Request_ptr req,
Callback* callback=NULL);
112 void cancelCallback(
const Callback* callback);
117 void reportObjectFailure(
119 CORBA::Object_ptr obj,
134 CORBA::Object_var obj =Orb::inst()._orb->string_to_object(oidStr);
135 if(CORBA::is_nil(obj.in()))
136 throw CORBA::BAD_PARAM();
139 typename T::_var_type result =T::_unchecked_narrow(obj);
141 typename T::_var_type result =T::_narrow(obj);
143 if(CORBA::is_nil(result.in()))
144 throw CORBA::BAD_PARAM();
146 return result._retn();
151 #endif // OMNIEVENTS__ORB_H