summaryrefslogtreecommitdiff
path: root/TAO/tao/ORB.inl
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-27 20:54:56 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-27 20:54:56 +0000
commit1df3b4414122de77b38400ee34a5997d633dcc2c (patch)
tree030efd5e63c2010505194526b2c136aa0e0649e3 /TAO/tao/ORB.inl
parent30102243920c57c8c73120186ef6f23d00357499 (diff)
downloadATCD-1df3b4414122de77b38400ee34a5997d633dcc2c.tar.gz
Thu Jul 27 20:50:17 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/ORB.inl')
-rw-r--r--TAO/tao/ORB.inl85
1 files changed, 85 insertions, 0 deletions
diff --git a/TAO/tao/ORB.inl b/TAO/tao/ORB.inl
new file mode 100644
index 00000000000..e4543a30593
--- /dev/null
+++ b/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