10 class DPTR_CLASS_NAME(ClassWithDptr):public DPtr
16 DEFINE_DPTR(ClassWithDptr)
19 QString ClassWithDptr::toString()const
21 return QString("class with dptr %1").arg(d->num);
23 int ClassWithDptr::num()const{return d->num;}
24 void ClassWithDptr::setNum(int n){d->num=n;}
26 class DPTR_CLASS_NAME(ClassWithSDptr):public SharedDPtr
32 DEFINE_SHARED_DPTR(ClassWithSDptr)
34 QString ClassWithSDptr::toString()const
36 return QString("class with shared dptr %1").arg(d->num);
38 int ClassWithSDptr::num()const{return d->num;}
39 void ClassWithSDptr::setNum(int n){d->num=n;}
40 ClassWithSDptr ClassWithSDptr::clone()const
47 class DPTR_CLASS_NAME(ClassWithNDptr):public NonCopyDPtr
52 DEFINE_NONCOPY_DPTR(ClassWithNDptr)
54 QString ClassWithNDptr::toString()const
56 return d->object.metaObject()->className();