]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/weakref.tex
typo
[wxWidgets.git] / docs / latex / wx / weakref.tex
1 \section{\class{wxWeakRef<T>}}\label{wxweakref}
2
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).
6
7 \begin{verbatim}
8 class MyClass: public Foo, public TrackableBase
9 {
10 // whatever
11 }
12
13 typedef wxWeakRef<MyClass> MyClassRef;
14 \end{verbatim}
15
16 \wxheading{Derived from}
17
18 wxTrackerNode
19
20 \wxheading{Include files}
21
22 <weakref.h>
23
24 \wxheading{Data structures}
25
26 \latexignore{\rtfignore{\wxheading{Members}}}
27
28
29 \membersection{wxWeakRef<T>::wxWeakRef<T>}\label{wxweakrefwxweakref}
30
31 \func{}{wxWeakRef<T>}{\param{T* }{pobj = NULL}}
32
33 Constructor.
34
35 \membersection{wxWeakRef<T>::\destruct{wxWeakRef<T>}}\label{wxweakrefdtor}
36
37 \func{}{\destruct{wxWeakRef<T>}}{\void}
38
39 Destructor.
40
41 \membersection{wxWeakRef<T>::T*}\label{wxweakreft}
42
43 \func{operator}{T*}{\void}
44
45 Returns pointer to tracked object or NULL.
46
47 \membersection{wxWeakRef<T>::operator->}\label{wxweakrefoperatorderef}
48
49 \func{T*}{operator->}{\void}
50
51 Returns pointer to tracked object or NULL.
52
53 \membersection{wxWeakRef<T>::operator=}\label{wxweakrefoperatorassign}
54
55 \func{T* operator}{operator=}{\param{T* }{pobj}}
56
57 Assigns pointer to trackable object to this weak reference.
58
59 \membersection{wxWeakRef<T>::Assign}\label{wxweakrefassign}
60
61 \func{void}{Assign}{\param{T* }{pobj}}
62
63 This uses static\_cast if possible or dynamic\_cast otherwise.
64
65 \membersection{wxWeakRef<T>::GetTrackable}\label{wxweakrefgettrackable}
66
67 \func{wxTrackableBase*}{GetTrackable}{\param{T* }{pobj}}
68
69 Returns the trackable objects to which the weak reference
70 points or NULL if it has been destroyed.
71
72 \membersection{wxWeakRef<T>::OnObjectDestroy}\label{wxweakrefonobjectdestroy}
73
74 \func{virtual void}{OnObjectDestroy}{\void}
75
76 Called when the tracked object is destroyed. Be default sets
77 internal pointer to NULL.
78