WeakRefUnion< ExposedType > Class Template Reference

#include <refBase.h>

List of all members.


Detailed Description


template<class ExposedType> class WeakRefUnion< ExposedType >

Union of an arbitrary type with a WeakRefBase.

The exposed type will remain accessible so long as the WeakRefBase is not cleared. Once it is cleared, accessing the exposed type will result in a NULL pointer.


Public Member Functions

 WeakRefUnion ()
 WeakRefUnion (const WeakRefPtr< WeakRefBase > &ref, ExposedType *ptr)
 WeakRefUnion (const Union &lock)
 WeakRefUnion (WeakRefBase *ref)
 ~WeakRefUnion ()
Unionoperator= (const Union &ptr)
void set (const WeakRefPtr< WeakRefBase > &ref, ExposedType *ptr)
bool operator== (const ExposedType *t) const
bool operator!= (const ExposedType *t) const
bool operator== (const Union &t) const
bool operator!= (const Union &t) const
bool isNull () const
ExposedType * getPointer () const
ExposedType * operator-> () const
ExposedType & operator * () const
 operator ExposedType * () const
WeakRefPtr< WeakRefBasegetRef () const

Private Types

typedef WeakRefUnion< ExposedType > Union

Private Attributes

WeakRefPtr< WeakRefBasemWeakReference
ExposedType * mPtr


Member Typedef Documentation

template<class ExposedType>
typedef WeakRefUnion<ExposedType> WeakRefUnion< ExposedType >::Union [private]


Constructor & Destructor Documentation

template<class ExposedType>
WeakRefUnion< ExposedType >::WeakRefUnion (  )  [inline]

template<class ExposedType>
WeakRefUnion< ExposedType >::WeakRefUnion ( const WeakRefPtr< WeakRefBase > &  ref,
ExposedType *  ptr 
) [inline]

template<class ExposedType>
WeakRefUnion< ExposedType >::WeakRefUnion ( const Union lock  )  [inline]

template<class ExposedType>
WeakRefUnion< ExposedType >::WeakRefUnion ( WeakRefBase ref  )  [inline]

template<class ExposedType>
WeakRefUnion< ExposedType >::~WeakRefUnion (  )  [inline]


Member Function Documentation

template<class ExposedType>
Union& WeakRefUnion< ExposedType >::operator= ( const Union ptr  )  [inline]

template<class ExposedType>
void WeakRefUnion< ExposedType >::set ( const WeakRefPtr< WeakRefBase > &  ref,
ExposedType *  ptr 
) [inline]

template<class ExposedType>
bool WeakRefUnion< ExposedType >::operator== ( const ExposedType *  t  )  const [inline]

template<class ExposedType>
bool WeakRefUnion< ExposedType >::operator!= ( const ExposedType *  t  )  const [inline]

template<class ExposedType>
bool WeakRefUnion< ExposedType >::operator== ( const Union t  )  const [inline]

template<class ExposedType>
bool WeakRefUnion< ExposedType >::operator!= ( const Union t  )  const [inline]

template<class ExposedType>
bool WeakRefUnion< ExposedType >::isNull (  )  const [inline]

template<class ExposedType>
ExposedType* WeakRefUnion< ExposedType >::getPointer (  )  const [inline]

template<class ExposedType>
ExposedType* WeakRefUnion< ExposedType >::operator-> (  )  const [inline]

template<class ExposedType>
ExposedType& WeakRefUnion< ExposedType >::operator * (  )  const [inline]

template<class ExposedType>
WeakRefUnion< ExposedType >::operator ExposedType * (  )  const [inline]

template<class ExposedType>
WeakRefPtr<WeakRefBase> WeakRefUnion< ExposedType >::getRef (  )  const [inline]


Member Data Documentation

template<class ExposedType>
WeakRefPtr<WeakRefBase> WeakRefUnion< ExposedType >::mWeakReference [private]

template<class ExposedType>
ExposedType* WeakRefUnion< ExposedType >::mPtr [private]