diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-07-28 08:28:33 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-07-28 08:28:33 +0000 |
commit | a7a3f30094c389870b4e1f817d7cca6c0b663e19 (patch) | |
tree | 287c236baa7aef12a87a7bee2623ab698da6a411 /TAO/tao/PortableServer | |
parent | 207a63b15f4f6d7d3b66eb3a906ad00438e277e3 (diff) | |
download | ATCD-a7a3f30094c389870b4e1f817d7cca6c0b663e19.tar.gz |
ChangeLogTag:Thu Jul 28 00:43:34 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/PortableServer')
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 32 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.h | 2 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.i | 34 |
3 files changed, 38 insertions, 30 deletions
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index 21b6fa6a8df..9c635d8f45b 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -336,7 +336,7 @@ TAO_ServantBase::_add_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) void TAO_ServantBase::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) { - const CORBA::ULong new_count = --this->ref_count_; + long const new_count = --this->ref_count_; if (new_count == 0) delete this; @@ -345,18 +345,10 @@ TAO_ServantBase::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) CORBA::ULong TAO_ServantBase::_refcount_value (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const { - return this->ref_count_.value (); + return static_cast<CORBA::ULong> (this->ref_count_.value ()); } -TAO_ServantBase_var::TAO_ServantBase_var (void) - : ptr_ (0) -{ -} - -TAO_ServantBase_var::TAO_ServantBase_var (TAO_ServantBase *p) - : ptr_ (p) -{ -} +// ------------------------------------------------------------------- TAO_ServantBase_var::TAO_ServantBase_var (const TAO_ServantBase_var &b) : ptr_ (b.ptr_) @@ -447,24 +439,6 @@ TAO_ServantBase_var::operator= (const TAO_ServantBase_var &b) return *this; } -TAO_ServantBase * -TAO_ServantBase_var::operator->() const -{ - return this->ptr_; -} - -TAO_ServantBase * -TAO_ServantBase_var::in (void) const -{ - return this->ptr_; -} - -TAO_ServantBase *& -TAO_ServantBase_var::inout (void) -{ - return this->ptr_; -} - TAO_ServantBase *& TAO_ServantBase_var::out (void) { diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h index 4a3551cee74..e0ded5cd97d 100644 --- a/TAO/tao/PortableServer/Servant_Base.h +++ b/TAO/tao/PortableServer/Servant_Base.h @@ -163,7 +163,7 @@ protected: protected: /// Reference counter. - ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> ref_count_; + ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> ref_count_; /// The operation table for this servant. It is initialized by the /// most derived class. diff --git a/TAO/tao/PortableServer/Servant_Base.i b/TAO/tao/PortableServer/Servant_Base.i index b48403a8e3c..a0f38b795a9 100644 --- a/TAO/tao/PortableServer/Servant_Base.i +++ b/TAO/tao/PortableServer/Servant_Base.i @@ -2,8 +2,42 @@ // // $Id$ + +ACE_INLINE +TAO_ServantBase_var::TAO_ServantBase_var (void) + : ptr_ (0) +{ +} + +ACE_INLINE +TAO_ServantBase_var::TAO_ServantBase_var (TAO_ServantBase *p) + : ptr_ (p) +{ +} + +ACE_INLINE TAO_ServantBase * +TAO_ServantBase_var::operator->() const +{ + return this->ptr_; +} + +ACE_INLINE TAO_ServantBase * +TAO_ServantBase_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE TAO_ServantBase *& +TAO_ServantBase_var::inout (void) +{ + return this->ptr_; +} + +// ------------------------------------------------------------------- + ACE_INLINE u_long TAO_Servant_Hash::operator () (PortableServer::Servant servant) const { return static_cast<u_long> (reinterpret_cast<ptrdiff_t> (servant)); } + |