diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 13:56:48 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 13:56:48 +0000 |
commit | c4078c377d74290ebe4e66da0b4975da91732376 (patch) | |
tree | 1816ef391e42a07929304908ac0e21f4c2f6cb7b /ACE/ace/Based_Pointer_T.inl | |
parent | 700d1c1a6be348c6c70a2085e559baeb8f4a62ea (diff) | |
download | ATCD-c4078c377d74290ebe4e66da0b4975da91732376.tar.gz |
swap in externals for ACE and TAO
Diffstat (limited to 'ACE/ace/Based_Pointer_T.inl')
-rw-r--r-- | ACE/ace/Based_Pointer_T.inl | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/ACE/ace/Based_Pointer_T.inl b/ACE/ace/Based_Pointer_T.inl deleted file mode 100644 index 5fb2c985f40..00000000000 --- a/ACE/ace/Based_Pointer_T.inl +++ /dev/null @@ -1,139 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -#define ACE_COMPUTE_BASED_POINTER(P) (((char *) (P) - (P)->base_offset_) + (P)->target_) -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template <class CONCRETE> ACE_INLINE CONCRETE * -ACE_Based_Pointer<CONCRETE>::operator->(void) -{ - ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator->"); - return reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); -} - -template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer_Basic<CONCRETE>::operator = (CONCRETE *rhs) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator ="); - if (rhs == 0) - // Store a value of <target_> that indicate "NULL" pointer. - this->target_ = -1; - else - this->target_ = ((char *) rhs - - ((char *) this - this->base_offset_)); -} - -template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer<CONCRETE>::operator = (CONCRETE *rhs) -{ - ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator ="); - if (rhs == 0) - // Store a value of <target_> that indicate "NULL" pointer. - this->target_ = -1; - else - this->target_ = ((char *) rhs - - ((char *) this - this->base_offset_)); -} - -template <class CONCRETE> ACE_INLINE CONCRETE& -ACE_Based_Pointer_Basic<CONCRETE>::operator *(void) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator *"); - return *reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); -} - -template <class CONCRETE> ACE_INLINE CONCRETE * -ACE_Based_Pointer_Basic<CONCRETE>::addr (void) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::addr"); - - if (this->target_ == -1) - return 0; - else - return reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); -} - -template <class CONCRETE> ACE_INLINE -ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *() const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *()"); - - return this->addr (); -} - -template <class CONCRETE> ACE_INLINE CONCRETE& -ACE_Based_Pointer_Basic<CONCRETE>::operator [] (int index) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator []"); - CONCRETE *c = - reinterpret_cast<CONCRETE *> (ACE_COMPUTE_BASED_POINTER (this)); - return c[index]; -} - -template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer_Basic<CONCRETE>::operator += (int index) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator +="); - this->base_offset_ += (index * sizeof (CONCRETE)); -} - -template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator == (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator =="); - return ACE_COMPUTE_BASED_POINTER (this) == ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator != (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator !="); - return !(*this == rhs); -} - -template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator < (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator <"); - return ACE_COMPUTE_BASED_POINTER (this) < ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator <="); - return ACE_COMPUTE_BASED_POINTER (this) <= ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator > (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator >"); - return ACE_COMPUTE_BASED_POINTER (this) > ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template <class CONCRETE> ACE_INLINE bool -ACE_Based_Pointer_Basic<CONCRETE>::operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator >="); - return ACE_COMPUTE_BASED_POINTER (this) >= ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer_Basic<CONCRETE>::operator= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator="); - *this = rhs.addr (); -} - -template <class CONCRETE> ACE_INLINE void -ACE_Based_Pointer<CONCRETE>::operator= (const ACE_Based_Pointer<CONCRETE> &rhs) -{ - ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator="); - *this = rhs.addr (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL |