]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/scopedptr.tex
typo
[wxWidgets.git] / docs / latex / wx / scopedptr.tex
CommitLineData
6d0f32dd
RR
1\section{\class{wxScopedPtr<T>}}\label{wxscopedptrtemplate}
2
3A scoped pointer template class. It is the template version of
4the old-style \helpref{scoped pointer macros}{wxscopedptr}.
5
6\wxheading{Derived from}
7
8No base class
9
10\wxheading{Include files}
11
12<ptr\_scpd.h>
13
14\wxheading{Data structures}
15
16{\small \begin{verbatim}
17typedef T element\_type
18\end{verbatim}}
19
20\latexignore{\rtfignore{\wxheading{Members}}}
21
22
23\membersection{wxScopedPtr<T>::wxScopedPtr<T>}\label{wxscopedptrtemplatewxscopedptrtemplate}
24
25\func{wxEXPLICIT}{wxScopedPtr<T>}{\param{T * }{ptr = NULL}}
26
27Constructor.
28
29\membersection{wxScopedPtr<T>::\destruct{wxScopedPtr<T>}}\label{wxscopedptrtemplatedtor}
30
31\func{}{\destruct{wxScopedPtr<T>}}{\void}
32
33Destructor.
34
35\membersection{wxScopedPtr<T>::get}\label{wxscopedptrtemplateget}
36
37\constfunc{T *}{get}{\void}
38
39Returns pointer to object or NULL.
40
41\membersection{wxScopedPtr<T>::operator*}\label{wxscopedptrtemplateoperatorptrt}
42
43\constfunc{T \&}{operator*}{\void}
44
45Returns pointer to object. If the pointer is NULL this method will
46cause an assert in debug mode.
47
48\membersection{wxScopedPtr<T>::operator->}\label{wxscopedptrtemplateoperatorderef}
49
50\constfunc{T *}{operator->}{\void}
51
52Returns pointer to object. If the pointer is NULL this method will
53cause an assert in debug mode.
54
55\membersection{wxScopedPtr<T>::release}\label{wxscopedptrtemplaterelease}
56
57\func{T*}{release}{\void}
58
59Returns pointer to object or NULL.
60
61\membersection{wxScopedPtr<T>::reset}\label{wxscopedptrtemplatereset}
62
63\func{void}{reset}{\param{T * }{ptr = NULL}}
64
65Reset pointer. Afterwards the caller is responsible for deleting
66the data contained in the scoped pointer before.
67
68\membersection{wxScopedPtr<T>::swap}\label{wxscopedptrtemplateswap}
69
70\func{void}{swap}{\param{wxScopedPtr<T> \& }{ot}}
71
72Swaps pointers.
73