OWBI1::COWIntrusiveReference< T > Class Template Reference

COWIntrusiveReference. More...

#include <OWBI1_COWIntrusiveReference.hpp>

Collaboration diagram for OWBI1::COWIntrusiveReference< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T element_type
typedef T *this_type::* unspecified_bool_type

Public Member Functions

 COWIntrusiveReference ()
 COWIntrusiveReference (T *p, bool addRef=true)
template<class U>
 COWIntrusiveReference (COWIntrusiveReference< U > const &rhs)
 COWIntrusiveReference (COWIntrusiveReference const &rhs)
 ~COWIntrusiveReference ()
template<class U>
COWIntrusiveReferenceoperator= (COWIntrusiveReference< U > const &rhs)
COWIntrusiveReferenceoperator= (COWIntrusiveReference const &rhs)
COWIntrusiveReferenceoperator= (T *rhs)
const T * getPtr () const
const T & operator * () const
const T * operator-> () const
T & operator * ()
T * operator-> ()
 operator unspecified_bool_type () const
bool operator! () const
void swap (COWIntrusiveReference &rhs)

Private Types

typedef COWIntrusiveReference this_type

Private Member Functions

void getWriteLock ()

Private Attributes

T * m_pObj

Friends

class COWIntrusiveReference

Detailed Description

template<class T>
class OWBI1::COWIntrusiveReference< T >

COWIntrusiveReference.

A smart pointer that uses intrusive reference counting.

Relies on unqualified calls to

void COWIntrusiveReferenceAddRef(T* p); void COWIntrusiveReferenceRelease(T* p); bool COWIntrusiveReferenceUnique(T* p); T* COWIntrusiveReferenceClone(T* p);

(p != 0)

The object is responsible for destroying itself.

If you want your class to be managed by COWIntrusiveReference, you can derive it from COWIntrusiveCountableBase, or write your own set of functions.

Definition at line 89 of file OWBI1_COWIntrusiveReference.hpp.


Member Typedef Documentation

template<class T>
typedef T OWBI1::COWIntrusiveReference< T >::element_type
 

Definition at line 94 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
typedef COWIntrusiveReference OWBI1::COWIntrusiveReference< T >::this_type [private]
 

Definition at line 92 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
typedef T* this_type::* OWBI1::COWIntrusiveReference< T >::unspecified_bool_type
 

Definition at line 173 of file OWBI1_COWIntrusiveReference.hpp.


Constructor & Destructor Documentation

template<class T>
OWBI1::COWIntrusiveReference< T >::COWIntrusiveReference  )  [inline]
 

Definition at line 96 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
OWBI1::COWIntrusiveReference< T >::COWIntrusiveReference T *  p,
bool  addRef = true
[inline]
 

Definition at line 99 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
template<class U>
OWBI1::COWIntrusiveReference< T >::COWIntrusiveReference COWIntrusiveReference< U > const &  rhs  )  [inline]
 

Definition at line 103 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
OWBI1::COWIntrusiveReference< T >::COWIntrusiveReference COWIntrusiveReference< T > const &  rhs  )  [inline]
 

Definition at line 107 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
OWBI1::COWIntrusiveReference< T >::~COWIntrusiveReference  )  [inline]
 

Definition at line 111 of file OWBI1_COWIntrusiveReference.hpp.


Member Function Documentation

template<class T>
const T* OWBI1::COWIntrusiveReference< T >::getPtr  )  const [inline]
 

Definition at line 130 of file OWBI1_COWIntrusiveReference.hpp.

Referenced by OWBI1::operator!=(), and OWBI1::operator==().

template<class T>
void OWBI1::COWIntrusiveReference< T >::getWriteLock  )  [inline, private]
 

Definition at line 197 of file OWBI1_COWIntrusiveReference.hpp.

Referenced by OWBI1::COWIntrusiveReference< PARMData >::operator *(), and OWBI1::COWIntrusiveReference< PARMData >::operator->().

template<class T>
T& OWBI1::COWIntrusiveReference< T >::operator *  )  [inline]
 

Definition at line 153 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
const T& OWBI1::COWIntrusiveReference< T >::operator *  )  const [inline]
 

Definition at line 135 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
OWBI1::COWIntrusiveReference< T >::operator unspecified_bool_type  )  const [inline]
 

Definition at line 174 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
bool OWBI1::COWIntrusiveReference< T >::operator!  )  const [inline]
 

Definition at line 179 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
T* OWBI1::COWIntrusiveReference< T >::operator->  )  [inline]
 

Definition at line 163 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
const T* OWBI1::COWIntrusiveReference< T >::operator->  )  const [inline]
 

Definition at line 144 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
COWIntrusiveReference& OWBI1::COWIntrusiveReference< T >::operator= T *  rhs  )  [inline]
 

Definition at line 125 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
COWIntrusiveReference& OWBI1::COWIntrusiveReference< T >::operator= COWIntrusiveReference< T > const &  rhs  )  [inline]
 

Definition at line 120 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
template<class U>
COWIntrusiveReference& OWBI1::COWIntrusiveReference< T >::operator= COWIntrusiveReference< U > const &  rhs  )  [inline]
 

Definition at line 115 of file OWBI1_COWIntrusiveReference.hpp.

template<class T>
void OWBI1::COWIntrusiveReference< T >::swap COWIntrusiveReference< T > &  rhs  )  [inline]
 

Definition at line 184 of file OWBI1_COWIntrusiveReference.hpp.

Referenced by OWBI1::COWIntrusiveReference< PARMData >::operator=(), OWBI1::String::swap(), and OWBI1::swap().


Friends And Related Function Documentation

template<class T>
friend class COWIntrusiveReference [friend]
 

Definition at line 193 of file OWBI1_COWIntrusiveReference.hpp.


Member Data Documentation

template<class T>
T* OWBI1::COWIntrusiveReference< T >::m_pObj [private]
 

Definition at line 206 of file OWBI1_COWIntrusiveReference.hpp.

Referenced by OWBI1::COWIntrusiveReference< PARMData >::COWIntrusiveReference(), OWBI1::COWIntrusiveReference< PARMData >::getPtr(), OWBI1::COWIntrusiveReference< PARMData >::getWriteLock(), OWBI1::COWIntrusiveReference< PARMData >::operator *(), OWBI1::COWIntrusiveReference< PARMData >::operator unspecified_bool_type(), OWBI1::COWIntrusiveReference< PARMData >::operator!(), OWBI1::COWIntrusiveReference< PARMData >::operator->(), OWBI1::COWIntrusiveReference< PARMData >::swap(), and OWBI1::COWIntrusiveReference< PARMData >::~COWIntrusiveReference().


The documentation for this class was generated from the following file:
Generated on Thu Feb 9 09:18:25 2006 for openwbem by  doxygen 1.4.6