StrongRefUnion< ExposedType > Class Template Reference

#include <refBase.h>

List of all members.


Detailed Description


template<class ExposedType> class StrongRefUnion< ExposedType >

Union of an arbitrary type with a StrongRefBase.

StrongRefBase will remain locked until the union is destructed. Handy for when the exposed class will become invalid whenever the reference becomes invalid and you want to make sure that doesn't happen.


Public Member Functions

 StrongRefUnion ()
 StrongRefUnion (const StrongRefPtr< StrongRefBase > &ref, ExposedType *ptr)
 StrongRefUnion (const Union &lock)
 StrongRefUnion (StrongRefBase *ref)
 ~StrongRefUnion ()
Unionoperator= (const Union &ptr)
void set (const StrongRefPtr< StrongRefBase > &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
bool isValid () const
ExposedType * operator-> () const
ExposedType & operator * () const
 operator ExposedType * () const
ExposedType * getPointer () const
StrongRefPtr< StrongRefBasegetRef () const

Private Types

typedef StrongRefUnion< ExposedType > Union

Private Attributes

StrongRefPtr< StrongRefBasemReference
ExposedType * mPtr


Member Typedef Documentation

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


Constructor & Destructor Documentation

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

template<class ExposedType>
StrongRefUnion< ExposedType >::StrongRefUnion ( const StrongRefPtr< StrongRefBase > &  ref,
ExposedType *  ptr 
) [inline]

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

template<class ExposedType>
StrongRefUnion< ExposedType >::StrongRefUnion ( StrongRefBase ref  )  [inline]

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


Member Function Documentation

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

template<class ExposedType>
void StrongRefUnion< ExposedType >::set ( const StrongRefPtr< StrongRefBase > &  ref,
ExposedType *  ptr 
) [inline]

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

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

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

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

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

template<class ExposedType>
bool StrongRefUnion< ExposedType >::isValid (  )  const [inline]

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

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

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

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

template<class ExposedType>
StrongRefPtr<StrongRefBase> StrongRefUnion< ExposedType >::getRef (  )  const [inline]


Member Data Documentation

template<class ExposedType>
StrongRefPtr<StrongRefBase> StrongRefUnion< ExposedType >::mReference [private]

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