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);
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();
void OmniEvents_Orb_shutdown(int signum)
Signal handler, sets Orb::_shutdownRequested.
T::_ptr_type string_to_(const char *oidStr)
Converts a string to a narrowed reference.
Interface for classes that wish to receive callbacks from deferred requests.
Singleton class that owns the ORB and various initial references.
PortableServer::POA_var _RootPOA
pair< CORBA::Request_ptr, Callback * > RequestCallback_t
list< RequestCallback_t > _deferredRequests
void cancelCallback(const Callback *callback)
Called by Callback objects when they are destroyed.
void shutdown(int)
Sets _shutdownRequested.
CosNaming::NamingContext_var _NameService
omni_mutex _deferredRequestsLock
PortableServer::POA_var _omniINSPOA