X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a555dcf20af4068c6d964c19fd7b0e851114d68..b8737371e220ef1920e6a3d2aed88c4bc2b04daf:/interface/wx/weakref.h diff --git a/interface/wx/weakref.h b/interface/wx/weakref.h index a94b65f656..6e988f0e12 100644 --- a/interface/wx/weakref.h +++ b/interface/wx/weakref.h @@ -3,12 +3,11 @@ // Purpose: interface of wxWeakRefDynamic, wxWeakRef // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** - wxWeakRefDynamic is a template class for weak references that is used in the same way as wxWeakRef. The only difference is that wxWeakRefDynamic defaults to using @c dynamic_cast for establishing the object reference @@ -28,10 +27,10 @@ For API documentation, see: wxWeakRef. @tparam T - @todo docme + The type to which the smart pointer points to. @nolibrary - @category{misc} + @category{smartpointers} */ template class wxWeakRefDynamic @@ -92,10 +91,10 @@ public: @endcode @tparam T - @todo docme + The type to which the smart pointer points to. @nolibrary - @category{misc} + @category{smartpointers} @see wxSharedPtr, wxScopedPtr */ @@ -103,6 +102,9 @@ template class wxWeakRef : public wxTrackerNode { public: + /// Type of the element stored by this reference. + typedef T element_type; + /** Constructor. The weak reference is initialized to @e pobj. */ @@ -116,7 +118,7 @@ public: /** Destructor. */ - ~wxWeakRef(); + virtual ~wxWeakRef(); /** Called when the tracked object is destroyed. Be default sets @@ -154,11 +156,10 @@ public: T& operator*() const; /** - Smart pointer member access. - Returns a pointer to the tracked object. + Smart pointer member access. Returns a pointer to the tracked object. If the internal pointer is @NULL this method will cause an assert in debug mode. */ - T* operator-(); + T* operator->(); /** Releases the currently tracked object and starts tracking @e pobj.