Go to the source code of this file.
      
        
          | #define DEFINE_SHARED_DPTR | 
          ( | 
            | 
          Class | ) | 
           | 
        
      
 
Value:Class::DPrivate::DPrivate(){d=new Class::Private;}\
 Class::DPrivate::DPrivate(const DPrivate&dp){d=dp.d;d->attach();}\
 Class::DPrivate::~DPrivate(){d->detach();}\
 Class::DPrivate Class::DPrivate::clone()const{DPrivate r;*(r.d)=*d;return r;}\
 Class::DPrivate& Class::DPrivate::operator=(const DPrivate&dp)\
 {if(d!=dp.d){d->detach();d=dp.d;d->attach();}return *this;}\
 void Class::DPrivate::decouple()\
 {if(d->currentRefCount()>1){Private *p=new Class::Private(*d);d->detach();d=p;}}
 
Defines the methods of the shared d-pointer wrapper. 
This implements the shared version of the d-pointer wrapper. 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  |