1 \section{\class{wxScopedPtr<T>
}}\label{wxscopedptrtemplate
}
3 A scoped pointer template class. It is the template version of
4 the old-style
\helpref{scoped pointer macros
}{wxscopedptr
}.
6 \wxheading{Derived from
}
10 \wxheading{Include files
}
14 \wxheading{Data structures
}
18 typedef T element_type
22 \latexignore{\rtfignore{\wxheading{Members
}}}
25 \membersection{wxScopedPtr<T>::wxScopedPtr<T>
}\label{wxscopedptrtemplatewxscopedptrtemplate
}
27 \func{wxEXPLICIT
}{wxScopedPtr<T>
}{\param{T *
}{ptr = NULL
}}
31 \membersection{wxScopedPtr<T>::
\destruct{wxScopedPtr<T>
}}\label{wxscopedptrtemplatedtor
}
33 \func{}{\destruct{wxScopedPtr<T>
}}{\void}
37 \membersection{wxScopedPtr<T>::get
}\label{wxscopedptrtemplateget
}
39 \constfunc{T *
}{get
}{\void}
41 Returns pointer to object or NULL.
43 \membersection{wxScopedPtr<T>::operator*
}\label{wxscopedptrtemplateoperatorreft
}
45 \constfunc{T \&
}{operator*
}{\void}
47 Returns a reference to the object. If the internal pointer is NULL
48 this method will cause an assert in debug mode.
50 \membersection{wxScopedPtr<T>::operator->
}\label{wxscopedptrtemplateoperatorderef
}
52 \constfunc{T *
}{operator->
}{\void}
54 Returns pointer to object. If the pointer is NULL this method will
55 cause an assert in debug mode.
57 \membersection{wxScopedPtr<T>::release
}\label{wxscopedptrtemplaterelease
}
59 \func{T*
}{release
}{\void}
61 Releases the current pointer and returns NULL.
63 \membersection{wxScopedPtr<T>::reset
}\label{wxscopedptrtemplatereset
}
65 \func{void
}{reset
}{\param{T *
}{ptr = NULL
}}
67 Reset pointer. Afterwards the caller is responsible for deleting
68 the data contained in the scoped pointer before.
70 \membersection{wxScopedPtr<T>::swap
}\label{wxscopedptrtemplateswap
}
72 \func{void
}{swap
}{\param{wxScopedPtr<T> \&
}{ot
}}