Simple Auto pointer providing deep copies for raw pointer. More...
#include <qwt3d_autoptr.h>
Public Member Functions | |
qwt3d_ptr (T *ptr=0) | |
~qwt3d_ptr () | |
qwt3d_ptr (qwt3d_ptr const &val) | |
qwt3d_ptr< T > & | operator= (qwt3d_ptr const &val) |
T * | operator-> () const |
T & | operator* () const |
Requirements:
virtual T* T::clone() const;
T::destroy() const; virtual ~T() private/protected
clone() is necessary for the pointer to preserve polymorphic behaviour. The pointer requires also heap based objects with regard to the template argument in order to be able to get ownership and control over destruction.