24 #ifndef OMNIEVENTS__SERVANT_H
25 #define OMNIEVENTS__SERVANT_H
32 # include <omniORB3/CORBA.h>
36 # include <omniORB4/CORBA.h>
43 #if OMNIEVENTS__DEBUG_ALL
44 # define OMNIEVENTS__DEBUG_REF_COUNTS 1
45 # define OMNIEVENTS__DEBUG_SERVANT 1
49 # define OMNIEVENTS__DEBUG_REF_COUNTS 0
52 # define OMNIEVENTS__DEBUG_SERVANT 0
55 #if OMNIEVENTS__DEBUG_REF_COUNTS
56 # define OMNIEVENTS__DEBUG_REF_COUNTS__DECL void _add_ref();void _remove_ref();
57 # define OMNIEVENTS__DEBUG_REF_COUNTS__DEFN(C) \
58 void C::_add_ref() { \
59 DB(20,#C "::_add_ref()") \
60 PortableServer::RefCountServantBase::_add_ref(); \
62 void C::_remove_ref() { \
63 DB(20,#C "::_remove_ref()") \
64 PortableServer::RefCountServantBase::_remove_ref(); \
68 # define OMNIEVENTS__DEBUG_REF_COUNTS__DECL
70 # define OMNIEVENTS__DEBUG_REF_COUNTS__DEFN(C)
74 namespace OmniEvents {
100 return T::_unchecked_narrow(obj.in());
102 return T::_narrow(obj.in());
113 class Servant :
public virtual PortableServer::ServantBase
119 #if OMNIEVENTS__DEBUG_SERVANT
120 static int _objectCount;
124 Servant(PortableServer::POA_ptr poa);
140 #endif // OMNIEVENTS__SERVANT_H