1 \section{\class{wxWeakRef<T>
}}\label{wxweakref
}
3 A weak reference to an object of type T, where T has type
4 \helpref{wxTrackableBase
}{wxtrackablebase
} as one of its
5 base classes (in a static or dynamic sense).
8 class MyClass: public Foo, public TrackableBase
13 typedef wxWeakRef<MyClass> MyClassRef;
16 \wxheading{Derived from
}
20 \wxheading{Include files
}
24 \wxheading{Data structures
}
26 \latexignore{\rtfignore{\wxheading{Members
}}}
29 \membersection{wxWeakRef<T>::wxWeakRef<T>
}\label{wxweakrefwxweakref
}
31 \func{}{wxWeakRef<T>
}{\param{T*
}{pobj = NULL
}}
35 \membersection{wxWeakRef<T>::
\destruct{wxWeakRef<T>
}}\label{wxweakrefdtor
}
37 \func{}{\destruct{wxWeakRef<T>
}}{\void}
41 \membersection{wxWeakRef<T>::T*
}\label{wxweakreft
}
43 \func{operator
}{T*
}{\void}
45 Returns pointer to tracked object or NULL.
47 \membersection{wxWeakRef<T>::operator->
}\label{wxweakrefoperatorderef
}
49 \func{T*
}{operator->
}{\void}
51 Returns pointer to tracked object or NULL.
53 \membersection{wxWeakRef<T>::operator=
}\label{wxweakrefoperatorassign
}
55 \func{T* operator
}{operator=
}{\param{T*
}{pobj
}}
57 Assigns pointer to trackable object to this weak reference.
59 \membersection{wxWeakRef<T>::Assign
}\label{wxweakrefassign
}
61 \func{void
}{Assign
}{\param{T*
}{pobj
}}
63 This uses static
\_cast if possible or dynamic
\_cast otherwise.
65 \membersection{wxWeakRef<T>::GetTrackable
}\label{wxweakrefgettrackable
}
67 \func{wxTrackableBase*
}{GetTrackable
}{\param{T*
}{pobj
}}
69 Returns the trackable objects to which the weak reference
70 points or NULL if it has been destroyed.
72 \membersection{wxWeakRef<T>::OnObjectDestroy
}\label{wxweakrefonobjectdestroy
}
74 \func{virtual void
}{OnObjectDestroy
}{\void}
76 Called when the tracked object is destroyed. Be default sets
77 internal pointer to NULL.