git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
82 lines
1.9 KiB
TeX
82 lines
1.9 KiB
TeX
\section{\class{wxSharedPtr<T>}}\label{wxsharedptr}
|
|
|
|
A smart pointer with non-intrusive reference counting.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
No base class
|
|
|
|
\wxheading{Include files}
|
|
|
|
<ptr\_shrd.h>
|
|
|
|
\wxheading{Data structures}
|
|
|
|
{\small%
|
|
\begin{verbatim}
|
|
typedef T element_type
|
|
\end{verbatim}
|
|
}%
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
\membersection{wxSharedPtr<T>::wxSharedPtr<T>}\label{wxsharedptrwxsharedptr}
|
|
|
|
\func{wxEXPLICIT}{wxSharedPtr<T>}{\param{T* }{ptr = NULL}}
|
|
|
|
\func{}{wxSharedPtr<T>}{\param{const wxSharedPtr<T>\& }{tocopy}}
|
|
|
|
Constructors.
|
|
|
|
\membersection{wxSharedPtr<T>::\destruct{wxSharedPtr<T>}}\label{wxsharedptrdtor}
|
|
|
|
\func{}{\destruct{wxSharedPtr<T>}}{\void}
|
|
|
|
Destructor.
|
|
|
|
\membersection{wxSharedPtr<T>::get}\label{wxsharedptrget}
|
|
|
|
\constfunc{T*}{get}{\void}
|
|
|
|
Returns pointer to its object or NULL.
|
|
|
|
\membersection{wxSharedPtr<T>::operator*}\label{wxsharedptroperatorreft}
|
|
|
|
\constfunc{T\&}{operator*}{\void}
|
|
|
|
Returns a reference to the object. If the internal pointer is NULL this
|
|
method will cause an assert in debug mode.
|
|
|
|
\membersection{wxSharedPtr<T>::operator->}\label{wxsharedptroperatorderef}
|
|
|
|
\constfunc{T*}{operator->}{\void}
|
|
|
|
Returns pointer to its object or NULL.
|
|
|
|
\membersection{wxSharedPtr<T>::operator=}\label{wxsharedptroperatorassign}
|
|
|
|
\func{wxSharedPtr<T>\& operator}{operator=}{\param{const wxSharedPtr<T>\& }{tocopy}}
|
|
|
|
Assignment operator.
|
|
|
|
\membersection{wxSharedPtr<T>::unique}\label{wxsharedptrunique}
|
|
|
|
\constfunc{bool}{unique}{\void}
|
|
|
|
Returns true if this is the only pointer pointing to its object.
|
|
|
|
\membersection{wxSharedPtr<T>::use\_count}\label{wxsharedptruse\_count}
|
|
|
|
\constfunc{long}{use\_count}{\void}
|
|
|
|
Returns the number of pointers pointing to its object.
|
|
|
|
\membersection{wxSharedPtr<T>::reset}\label{wxsharedptrreset}
|
|
|
|
\func{void}{reset}{\param{T * }{ptr = NULL}}
|
|
|
|
Reset pointer to {\it ptr}. Afterwards the caller is responsible
|
|
for deleting the data contained in the pointer before.
|
|
|