]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/weakrefdynamic.tex
set initial GTK_CAN_FOCUS value to match AcceptsFocus (fixes wxTreeCtrl text control...
[wxWidgets.git] / docs / latex / wx / weakrefdynamic.tex
1 \section{\class{wxWeakRefDynamic<T>}}\label{wxweakrefdynamic}
2
3 wxWeakRefDynamic<T> is a template class for weak references that is used in
4 the same way as wxWeakRef<T>. The only difference is that wxWeakRefDynamic
5 defaults to using \texttt{dynamic\_cast<>} for establishing the object
6 reference (while wxWeakRef defaults to \texttt{static\_cast<>}).
7
8 So, wxWeakRef will detect a type mismatch during compile time and will
9 have a little better run-time performance. The role of wxWeakRefDynamic
10 is to handle objects which derived type one does not know.
11
12 \textbf{Note:} wxWeakRef<T> selects an implementation based on the static type
13 of T. If T does not have wxTrackable statically, it defaults to to a mixed-
14 mode operation, where it uses \texttt{dynamic\_cast<>} as the last measure (if
15 available from the compiler and enabled when building wxWidgets).
16
17 For general cases, wxWeakRef<T> is the better choice.
18
19 For API documentation, see: \helpref{wxWeakRef}{wxweakref}
20
21
22 \wxheading{Derived from}
23
24 No base class
25
26 \wxheading{Include files}
27
28 <wx/weakref.h>
29
30 \wxheading{Library}
31
32 \helpref{wxCore}{librarieslist}
33
34
35 \latexignore{\rtfignore{\wxheading{Members}}}
36
37
38 \membersection{wxWeakRefDynamic::wxWeakRefDynamic}\label{wxweakrefdynamicwxweakrefdynamic}
39
40 \func{}{wxWeakRefDynamic}{\void}
41
42 TOWRITE.