X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/328f5751e8a06727b137189fe04891a9f43bfc8b..628e155d8c70da0f962289cf1e1dea3699255707:/interface/ptr_shrd.h?ds=sidebyside diff --git a/interface/ptr_shrd.h b/interface/ptr_shrd.h index 52ad2b2c93..e6fc1dbf03 100644 --- a/interface/ptr_shrd.h +++ b/interface/ptr_shrd.h @@ -1,36 +1,37 @@ ///////////////////////////////////////////////////////////////////////////// // Name: ptr_shrd.h -// Purpose: documentation for wxSharedPtr class +// Purpose: interface of wxSharedPtr // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// /** - @class wxSharedPtrT @wxheader{ptr_shrd.h} - A smart pointer with non-intrusive reference counting. It is modeled - after @b boost::shared_ptr and can be used with STL containers - and wxVector - unlike @b std::auto_ptr - and wxScopedPtr. + A smart pointer with non-intrusive reference counting. It is modeled after + @c boost::shared_ptr and can be used with STL containers and wxVector - + unlike @c std::auto_ptr and wxScopedPtr. @library{wxbase} - @category{FIXME} + @category{smartpointers} - @seealso - wxScopedPtr, wxWeakRef, wxObjectDataPtr + @see wxScopedPtr, wxWeakRef, wxObjectDataPtr */ +template class wxSharedPtr { public: - //@{ /** - Constructors. + Constructor. + + Creates shared pointer from the raw pointer @a ptr and takes ownership + of it. */ - wxSharedPtrT(T* ptr = NULL); - wxSharedPtrT(const wxSharedPtr& tocopy); - //@} + wxSharedPtr(T* ptr = NULL); + + /// Copy constructor. + wxSharedPtr(const wxSharedPtr& tocopy); /** Destructor. @@ -51,8 +52,8 @@ public: operator unspecified_bool_type() const; /** - Returns a reference to the object. If the internal pointer is @NULL this - method will cause an assert in debug mode. + Returns a reference to the object. If the internal pointer is @NULL + this method will cause an assert in debug mode. */ T operator*() const; @@ -83,3 +84,4 @@ public: */ long use_count() const; }; +