diff options
Diffstat (limited to 'TAO/tao/LocalObject.inl')
-rw-r--r-- | TAO/tao/LocalObject.inl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/TAO/tao/LocalObject.inl b/TAO/tao/LocalObject.inl new file mode 100644 index 00000000000..3b84db89160 --- /dev/null +++ b/TAO/tao/LocalObject.inl @@ -0,0 +1,55 @@ +// -*- C++ -*- +// +// $Id$ + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE +CORBA::LocalObject_ptr +CORBA::LocalObject::_duplicate (CORBA::LocalObject_ptr obj) +{ + if (obj) + { + obj->_add_ref (); + } + + return obj; +} + +ACE_INLINE +CORBA::LocalObject_ptr +CORBA::LocalObject::_nil (void) +{ + return 0; +} + +ACE_INLINE +CORBA::LocalObject_ptr +CORBA::LocalObject::_narrow (CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_NOT_USED) +{ + if (obj->_is_local () != 0) + { + return CORBA::LocalObject::_duplicate ( + dynamic_cast<CORBA::LocalObject_ptr> (obj) + ); + } + + return 0; +} + +ACE_INLINE +CORBA::LocalObject::LocalObject (void) + : Object (0) +{ +} + +// ================================================================= + +ACE_INLINE +TAO_Local_RefCounted_Object::TAO_Local_RefCounted_Object (void) + : refcount_ (1) +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL |