Go to the source code of this file.
|
class | DPtr |
| Base class of non-shared d-pointers. More...
|
|
#define DEFINE_DPTR |
( |
|
Class | ) |
|
Value:Class::DPrivate::DPrivate(){d=new Class::Private;}\
Class::DPrivate::DPrivate(const Class::DPrivate&dp){d=new Class::Private(*(dp.d));}\
Class::DPrivate::~DPrivate(){delete d;}\
Class::DPrivate Class::DPrivate::clone()const{DPrivate r;*(r.d)=*d;return r;}\
Class::DPrivate& Class::DPrivate::operator=(const Class::DPrivate&dp)\
{if(d!=dp.d)*d=*(dp.d);return *this;}
Creates definitions for methods of the non-shared d-pointer wrapper.
This variant is not shared between instances of the containing class, but it is able to copy its content (using the contents copy constructor and assignment operator). You cannot use this variant if any of the content classes have inaccessable copy constructors or assignment operators (like Qt's QObject and its subclasses).
To be used in implementation where the actual d-pointer class is implemented.
- Parameters
-
Class | the base class within which the d-pointer was declared |