DynWeakRef< T > Struct Template Reference
[Templates for DynI and friends]

#include <DynWeakRef.hpp>

Inheritance diagram for DynWeakRef< T >:

List of all members.

Public Member Functions

 DynWeakRef ()
 DynWeakRef (T *pt)
 DynWeakRef (DynWeakRef &dop)
DynWeakRefoperator= (T *pt)
DynWeakRefoperator= (DynWeakRef< T > &dop)
DynWeakRefAssign (T *pt)
 operator T * ()
 operator T & ()
T & operator* ()
T * operator-> ()
T * Get ()
bool IsOk ()
bool Release ()

Protected Member Functions

bool InternalAssign (T *pt)
void InternalRelease ()
virtual bool docall OnNotify (NotifierI *pni, int evt, NotifDataI *pnd)

Protected Attributes

T * m_pt


Detailed Description

template<class T>
struct DynWeakRef< T >

This is a weak reference to an object implementing NotifierI, so we can safely track when the object is destroyed.

Constructor & Destructor Documentation

template<class T>
DynWeakRef< T >::DynWeakRef (  )  [inline, explicit]

Constructor. Initialized to empty state.

template<class T>
DynWeakRef< T >::DynWeakRef ( T *  pt  )  [inline, explicit]

Constructor, one argument.

Parameters:
pt The DynObj we want to track. Should implement NotifierI.

template<class T>
DynWeakRef< T >::DynWeakRef ( DynWeakRef< T > &  dop  )  [inline, explicit]

Constructor, one argument.

Parameters:
dop The DynObj we want to track. Should implement NotifierI.


Member Function Documentation

template<class T>
DynWeakRef& DynWeakRef< T >::operator= ( T *  pt  )  [inline]

Assignment operator.

Parameters:
pt The DynObj we want to track. Should implement NotifierI.

template<class T>
DynWeakRef& DynWeakRef< T >::operator= ( DynWeakRef< T > &  dop  )  [inline]

Assignment operator.

Parameters:
dop The DynObj we want to track. Should implement NotifierI.

template<class T>
DynWeakRef& DynWeakRef< T >::Assign ( T *  pt  )  [inline]

Assignment function.

Parameters:
pt The DynObj we want to track. Should implement NotifierI.

template<class T>
DynWeakRef< T >::operator T * (  )  [inline]

Access raw pointer.

template<class T>
DynWeakRef< T >::operator T & (  )  [inline]

Access as reference.

template<class T>
T& DynWeakRef< T >::operator* (  )  [inline]

Access as reference.

template<class T>
T* DynWeakRef< T >::operator-> (  )  [inline]

Access raw pointer.

template<class T>
T* DynWeakRef< T >::Get (  )  [inline]

Access raw pointer.

template<class T>
bool DynWeakRef< T >::IsOk (  )  [inline]

Do we have an object now?

template<class T>
bool DynWeakRef< T >::Release (  )  [inline]

Release our tracking of this object


The documentation for this struct was generated from the following file:

Generated on Sun Feb 15 16:35:57 2009 for DynObj by  doxygen 1.5.6