X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..9ce43bfae9c8245d620c9bd7cca50b8fa9d88e38:/docs/latex/wx/scpdptr.tex diff --git a/docs/latex/wx/scpdptr.tex b/docs/latex/wx/scpdptr.tex index 844aefbe2f..31a3056998 100644 --- a/docs/latex/wx/scpdptr.tex +++ b/docs/latex/wx/scpdptr.tex @@ -1,4 +1,4 @@ -\section{wxScopedPtr}\label{wxscopedptr} +\section{\class{wxScopedPtr}}\label{wxscopedptr} This is a simple scoped smart pointer implementation that is similar to the \urlref{Boost}{http://www.boost.org} smart pointers but rewritten to @@ -71,11 +71,20 @@ legal name. Creates the smart pointer with the given pointer or none if NULL. On compilers that support it, this uses the explicit keyword. +\membersection{wxScopedPtr::release} + +\func{T *}{release}{\void} + +Returns the currently hold pointer and resets the smart pointer object to +{\tt NULL}. After a call to this function the caller is responsible for +deleting the pointer. + + \membersection{wxScopedPtr::reset} \func{\void}{reset}{\param{T}{ p * = NULL}} -Deletes the currently held pointer and sets it to 'p' or to NULL if no +Deletes the currently held pointer and sets it to {\it p} or to NULL if no arguments are specified. This function does check to make sure that the pointer you are assigning is not the same pointer that is already stored. @@ -87,9 +96,9 @@ This operator works like the standard C++ pointer operator to return the object being pointed to by the pointer. If the pointer is NULL or invalid this will crash. -\membersection{wxScopedPtr::operator -\>} +\membersection{wxScopedPtr::operator -$>$} % TODO -\func{const T*}{operator -\>}{\void} +\func{const T*}{operator -$>$}{\void} % TODO This operator works like the standard C++ pointer operator to return the pointer in the smart pointer or NULL if it is empty. @@ -103,8 +112,8 @@ there is none. \membersection{wxScopedPtr::swap} -\func{\void}{swap}{\param{wxScopedPtr}{ \& ot}} +\func{\void}{swap}{\param{wxScopedPtr}{ \& other}} -Swap the pointer inside the smart pointer with 'ot'. The pointer being swapped -must be of the same type (hence the same class name). +Swap the pointer inside the smart pointer with {\it other}. The pointer being +swapped must be of the same type (hence the same class name).