]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/scopedptr.tex
mention some more changes
[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
0155f164
RR
16{\small%
17\begin{verbatim}
18typedef T element_type
19\end{verbatim}
20}%
6d0f32dd
RR
21
22\latexignore{\rtfignore{\wxheading{Members}}}
23
24
25\membersection{wxScopedPtr<T>::wxScopedPtr<T>}\label{wxscopedptrtemplatewxscopedptrtemplate}
26
27\func{wxEXPLICIT}{wxScopedPtr<T>}{\param{T * }{ptr = NULL}}
28
29Constructor.
30
31\membersection{wxScopedPtr<T>::\destruct{wxScopedPtr<T>}}\label{wxscopedptrtemplatedtor}
32
33\func{}{\destruct{wxScopedPtr<T>}}{\void}
34
35Destructor.
36
37\membersection{wxScopedPtr<T>::get}\label{wxscopedptrtemplateget}
38
39\constfunc{T *}{get}{\void}
40
41Returns pointer to object or NULL.
42
9dd5ff5b 43\membersection{wxScopedPtr<T>::operator*}\label{wxscopedptrtemplateoperatorreft}
6d0f32dd
RR
44
45\constfunc{T \&}{operator*}{\void}
46
9dd5ff5b
RR
47Returns a reference to the object. If the internal pointer is NULL
48this method will cause an assert in debug mode.
6d0f32dd
RR
49
50\membersection{wxScopedPtr<T>::operator->}\label{wxscopedptrtemplateoperatorderef}
51
52\constfunc{T *}{operator->}{\void}
53
54Returns pointer to object. If the pointer is NULL this method will
55cause an assert in debug mode.
56
57\membersection{wxScopedPtr<T>::release}\label{wxscopedptrtemplaterelease}
58
59\func{T*}{release}{\void}
60
9dd5ff5b 61Releases the current pointer and returns NULL.
6d0f32dd
RR
62
63\membersection{wxScopedPtr<T>::reset}\label{wxscopedptrtemplatereset}
64
65\func{void}{reset}{\param{T * }{ptr = NULL}}
66
67Reset pointer. Afterwards the caller is responsible for deleting
68the data contained in the scoped pointer before.
69
70\membersection{wxScopedPtr<T>::swap}\label{wxscopedptrtemplateswap}
71
72\func{void}{swap}{\param{wxScopedPtr<T> \& }{ot}}
73
74Swaps pointers.
75