|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
Simple auto pointer providing deep copies for raw pointer. More...
#include <qwt3d_autoptr.h>
Public Member Functions | |
| ClonePtr (T *ptr=nullptr) | |
| ClonePtr (ClonePtr const &val) | |
| ClonePtr< T > & | operator= (ClonePtr const &val) |
| T * | operator-> () const |
| T & | operator* () const |
Simple auto pointer providing deep copies for raw pointer.
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.