template based d pointer class

Alexander Kellett lypanov at kde.org
Tue May 20 21:54:05 BST 2003


On Sat, May 17, 2003 at 03:35:27PM -0400, Ravikiran Rajagopal wrote:
>   A nitpick: instead of the #define, it would be better to add a private const 
> member function. See http://www.gotw.ca/gotw/012.htm for a similarly flavored 
> example.

this was just a simplifying hack, d-> is the usual accessor for
private pointers, and d() doesn't seem nearly so bad as BlahPrivate::d(this)
everytime one wishes to access a data member.

>   Anyway, are there any classes with publicly available API without 
> d-pointers?

yup ;-)

Alex




More information about the kde-core-devel mailing list