diff options
Diffstat (limited to 'trunk/TAO/tao/ORB.inl')
-rw-r--r-- | trunk/TAO/tao/ORB.inl | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/trunk/TAO/tao/ORB.inl b/trunk/TAO/tao/ORB.inl new file mode 100644 index 00000000000..e4543a30593 --- /dev/null +++ b/trunk/TAO/tao/ORB.inl @@ -0,0 +1,85 @@ +// -*- C++ -*- +// +// $Id$ + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +// --------------------------------------------------------------------------- +// ORB specific +// --------------------------------------------------------------------------- + +ACE_INLINE unsigned long +CORBA::ORB::_incr_refcnt (void) +{ + return ++this->refcount_; +} + +ACE_INLINE unsigned long +CORBA::ORB::_decr_refcnt (void) +{ + unsigned long count = --this->refcount_; + + if (count != 0) + { + return count; + } + + delete this; + return 0; +} + +ACE_INLINE CORBA::ORB_ptr +CORBA::ORB::_duplicate (CORBA::ORB_ptr obj) +{ + if (obj) + { + obj->_incr_refcnt (); + } + + return obj; +} + +// Null pointers represent nil objects. + +ACE_INLINE CORBA::ORB_ptr +CORBA::ORB::_nil (void) +{ + return 0; +} + +ACE_INLINE void +CORBA::ORB::_use_omg_ior_format (CORBA::Boolean ior) +{ + this->use_omg_ior_format_ = ior; +} + +ACE_INLINE CORBA::Boolean +CORBA::ORB::_use_omg_ior_format (void) +{ + return this->use_omg_ior_format_; +} + +ACE_INLINE TAO_ORB_Core * +CORBA::ORB::orb_core (void) const +{ + return this->orb_core_; +} + +// ************************************************************ +// These are in CORBA namespace +// ************************************************************ + +ACE_INLINE CORBA::Boolean +CORBA::is_nil (CORBA::ORB_ptr obj) +{ + return obj == CORBA::ORB::_nil (); +} + +ACE_INLINE void +CORBA::release (CORBA::ORB_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_decr_refcnt (); +} + +TAO_END_VERSIONED_NAMESPACE_DECL |