00001 // -*- C++ -*- 00002 // 00003 // $Id: ORB.inl 79266 2007-08-08 14:57:09Z johnnyw $ 00004 00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 // --------------------------------------------------------------------------- 00008 // ORB specific 00009 // --------------------------------------------------------------------------- 00010 00011 ACE_INLINE ACE_Time_Value * 00012 CORBA::ORB::get_timeout (void) 00013 { 00014 return this->timeout_; 00015 } 00016 00017 ACE_INLINE void 00018 CORBA::ORB::set_timeout (ACE_Time_Value *timeout) 00019 { 00020 this->timeout_ = timeout; 00021 } 00022 00023 ACE_INLINE unsigned long 00024 CORBA::ORB::_incr_refcnt (void) 00025 { 00026 return ++this->refcount_; 00027 } 00028 00029 ACE_INLINE unsigned long 00030 CORBA::ORB::_decr_refcnt (void) 00031 { 00032 unsigned long count = --this->refcount_; 00033 00034 if (count != 0) 00035 { 00036 return count; 00037 } 00038 00039 delete this; 00040 return 0; 00041 } 00042 00043 ACE_INLINE CORBA::ORB_ptr 00044 CORBA::ORB::_duplicate (CORBA::ORB_ptr obj) 00045 { 00046 if (obj) 00047 { 00048 obj->_incr_refcnt (); 00049 } 00050 00051 return obj; 00052 } 00053 00054 // Null pointers represent nil objects. 00055 00056 ACE_INLINE CORBA::ORB_ptr 00057 CORBA::ORB::_nil (void) 00058 { 00059 return 0; 00060 } 00061 00062 ACE_INLINE void 00063 CORBA::ORB::_use_omg_ior_format (CORBA::Boolean ior) 00064 { 00065 this->use_omg_ior_format_ = ior; 00066 } 00067 00068 ACE_INLINE CORBA::Boolean 00069 CORBA::ORB::_use_omg_ior_format (void) 00070 { 00071 return this->use_omg_ior_format_; 00072 } 00073 00074 ACE_INLINE TAO_ORB_Core * 00075 CORBA::ORB::orb_core (void) const 00076 { 00077 return this->orb_core_; 00078 } 00079 00080 // ************************************************************ 00081 // These are in CORBA namespace 00082 // ************************************************************ 00083 00084 ACE_INLINE CORBA::Boolean 00085 CORBA::is_nil (CORBA::ORB_ptr obj) 00086 { 00087 return obj == CORBA::ORB::_nil (); 00088 } 00089 00090 ACE_INLINE void 00091 CORBA::release (CORBA::ORB_ptr obj) 00092 { 00093 if (!CORBA::is_nil (obj)) 00094 obj->_decr_refcnt (); 00095 } 00096 00097 TAO_END_VERSIONED_NAMESPACE_DECL