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
24 \helpref{wxSharedPtr
}{wxsharedptr
},
\helpref{wxWeakRef
}{wxweakref
}
27 \latexignore{\rtfignore{\wxheading{Members
}}}
29 \membersection{wxScopedPtr<T>::wxScopedPtr<T>
}\label{wxscopedptrtemplatewxscopedptrtemplate
}
31 \func{wxEXPLICIT
}{wxScopedPtr<T>
}{\param{T *
}{ptr = NULL
}}
35 \membersection{wxScopedPtr<T>::
\destruct{wxScopedPtr<T>
}}\label{wxscopedptrtemplatedtor
}
37 \func{}{\destruct{wxScopedPtr<T>
}}{\void}
41 \membersection{wxScopedPtr<T>::get
}\label{wxscopedptrtemplateget
}
43 \constfunc{T *
}{get
}{\void}
45 Returns pointer to object or NULL.
47 \membersection{wxScopedPtr<T>::operator*
}\label{wxscopedptrtemplateoperatorreft
}
49 \constfunc{T \&
}{operator*
}{\void}
51 Returns a reference to the object. If the internal pointer is NULL
52 this method will cause an assert in debug mode.
54 \membersection{wxScopedPtr<T>::operator->
}\label{wxscopedptrtemplateoperatorderef
}
56 \constfunc{T *
}{operator->
}{\void}
58 Returns pointer to object. If the pointer is NULL this method will
59 cause an assert in debug mode.
61 \membersection{wxScopedPtr<T>::release
}\label{wxscopedptrtemplaterelease
}
63 \func{T*
}{release
}{\void}
65 Releases the current pointer and returns it.
67 \membersection{wxScopedPtr<T>::reset
}\label{wxscopedptrtemplatereset
}
69 \func{void
}{reset
}{\param{T *
}{ptr = NULL
}}
71 Reset pointer. Afterwards the caller is responsible for deleting
72 the data contained in the scoped pointer before.
74 \membersection{wxScopedPtr<T>::swap
}\label{wxscopedptrtemplateswap
}
76 \func{void
}{swap
}{\param{wxScopedPtr<T> \&
}{ot
}}