X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef36734a79b4ee5a6c70308659e32c627cffaae1..242019eef3fdcdb12b5310da67af3ef6d15e0f58:/docs/latex/wx/objectdataptr.tex diff --git a/docs/latex/wx/objectdataptr.tex b/docs/latex/wx/objectdataptr.tex index 7ff5cc1984..d75a1bf10c 100644 --- a/docs/latex/wx/objectdataptr.tex +++ b/docs/latex/wx/objectdataptr.tex @@ -23,9 +23,11 @@ No base class \wxheading{Data structures} -{\small \begin{verbatim} -typedef T element\_type -\end{verbatim}} +{\small% +\begin{verbatim} +typedef T element_type +\end{verbatim} +}% \wxheading{Example} @@ -60,6 +62,7 @@ class MyCar { public: MyCar( int price ); + MyCar( const MyCar& data ); bool operator == ( const MyCar& car ) const; bool operator != (const MyCar& car) const { return !(*this == car); } @@ -82,6 +85,11 @@ MyCar::MyCar( int price ) m_data.get()->SetPrice( price ); } +MyCar::MyCar( const MyCar& car ) +{ + m_data.reset( car.m_data.get() ); +} + bool MyCar::operator == ( const MyCar& car ) const { if (m_data.get() == car.m_data.get()) return true;