diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-18 13:49:25 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-18 13:49:25 +0000 |
commit | 9f5f8644acc8166e862610106ef6f1ef32c494e7 (patch) | |
tree | a10713baf4c90622ca3ef7d5bb1501ae0b150e86 | |
parent | 5e24ad54c30f199b18989add0a850777ea62def9 (diff) | |
download | ATCD-9f5f8644acc8166e862610106ef6f1ef32c494e7.tar.gz |
reordered inline methods to avoid use before definition. Fixed a few
ACE_TRACE comments.
-rw-r--r-- | ace/Auto_Ptr.i | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/ace/Auto_Ptr.i b/ace/Auto_Ptr.i index a686fe3fece..74281c2dc88 100644 --- a/ace/Auto_Ptr.i +++ b/ace/Auto_Ptr.i @@ -17,6 +17,31 @@ ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> &rhs) ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr"); } +template<class X> ACE_INLINE X * +ACE_Auto_Basic_Ptr<X>::get (void) const +{ + ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::get"); + return this->p_; +} + +template<class X> ACE_INLINE X * +ACE_Auto_Basic_Ptr<X>::release (void) +{ + ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release"); + X *old = this->p_; + this->p_ = 0; + return old; +} + +template<class X> ACE_INLINE void +ACE_Auto_Basic_Ptr<X>::reset (X *p) +{ + ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::reset"); + if (this->get () != p) + delete this->get (); + this->p_ = p; +} + template<class X> ACE_INLINE ACE_Auto_Basic_Ptr<X> & ACE_Auto_Basic_Ptr<X>::operator= (ACE_Auto_Basic_Ptr<X> &rhs) { @@ -42,31 +67,6 @@ ACE_Auto_Basic_Ptr<X>::operator *() const return *this->get (); } -template<class X> ACE_INLINE X * -ACE_Auto_Basic_Ptr<X>::get (void) const -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::get"); - return this->p_; -} - -template<class X> ACE_INLINE X * -ACE_Auto_Basic_Ptr<X>::release (void) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release"); - X *old = this->p_; - this->p_ = 0; - return old; -} - -template<class X> ACE_INLINE void -ACE_Auto_Basic_Ptr<X>::reset (X *p) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release"); - if (this->get () != p) - delete this->get (); - this->p_ = p; -} - #if !defined (ACE_HAS_STANDARD_CPP_LIBRARY) || \ (ACE_HAS_STANDARD_CPP_LIBRARY == 0) @@ -93,6 +93,31 @@ ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr (X *p) ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr"); } +template<class X> ACE_INLINE X * +ACE_Auto_Basic_Array_Ptr<X>::get (void) const +{ + ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::get"); + return this->p_; +} + +template<class X> ACE_INLINE X * +ACE_Auto_Basic_Array_Ptr<X>::release (void) +{ + ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::release"); + X *old = this->p_; + this->p_ = 0; + return old; +} + +template<class X> ACE_INLINE void +ACE_Auto_Basic_Array_Ptr<X>::reset (X *p) +{ + ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::reset"); + if (this->get () != p) + delete [] this->get (); + this->p_ = p; +} + template<class X> ACE_INLINE ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr (ACE_Auto_Basic_Array_Ptr<X> &rhs) : p_ (rhs.release ()) @@ -131,31 +156,6 @@ ACE_Auto_Basic_Array_Ptr<X>::operator[](int i) const return array[i]; } -template<class X> ACE_INLINE X * -ACE_Auto_Basic_Array_Ptr<X>::get (void) const -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::get"); - return this->p_; -} - -template<class X> ACE_INLINE X * -ACE_Auto_Basic_Array_Ptr<X>::release (void) -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::release"); - X *old = this->p_; - this->p_ = 0; - return old; -} - -template<class X> ACE_INLINE void -ACE_Auto_Basic_Array_Ptr<X>::reset (X *p) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release"); - if (this->get () != p) - delete [] this->get (); - this->p_ = p; -} - template<class X> ACE_INLINE ACE_Auto_Array_Ptr<X>::ACE_Auto_Array_Ptr (X *p) : ACE_Auto_Basic_Array_Ptr<X> (p) |