template based d pointer class

Alexander Kellett lypanov at kde.org
Tue May 20 21:48:24 BST 2003


On Sat, May 17, 2003 at 04:57:00PM -0400, Ravikiran Rajagopal wrote:
> Perhaps I misunderstood Alex. I understood it as follows: let's write this 
> clever reusable template solution for this problem as it is likely to recur. 
> Since we were planning on reusing it, I thought we might as well make it 
> cleaner so that novice KDE programmers can use it too. As you note later, the 
> idea is very clever, but I thought a reusable template should guard against 
> Murphy. I like your typedefs too, very much in the spirit of MCppD.

thanks for the input btw, and sorry for the late reply. 

it was more a real quick hack to enable me to add data 
members to a realworld example (kbookmarkbar) in kdelibs,
creating the template was more an idea that came by through
boredom and i figured i may just as well share it ;-)

btw, just fyi, code is from:
http://developer.kde.org/documentation/library/kdeqt/kde3arch/devel-binarycompatibility.html

> To get slightly off-topic, I think it is time we had a Singleton template 
> anyway. At least KLibLoader could use it. I could use it in several of my 
> apps.

yup, agreed. a singleton template would be nice.

Alex




More information about the kde-core-devel mailing list