[Kstars-devel] removing KStars::privatedata class

Jasem Mutlaq mutlaqja at ikarustech.com
Wed Jul 27 05:55:19 CEST 2005


On Tuesday 26 July 2005 7:08 pm, Thomas Kabelmann wrote:
> Hi Heiko,
>
> I understand the purpose of this design pattern, but I think it's
> unnecessary in this situation. There are 2 data stored in PrivateData
> (splash, data) and both are pointer variables. For pointer variables you
> don't need an include of the class file, you just need a forward
> declaration of that class. If I'm not mistaken, this forward declaration
> saves a recompile of the KStars class if KStarsData changes. So we can
> safely pull the code from PrivateData to KStars and simplify the code. On
> the other hand, if we really should add a lot of new data directly to
> KStars class I agree with Jason, to pull all data into PrivateData, but I
> doubt, that there will be that much changes in the future.
>
> Regards,
> Thomas

I am leaning toward moving all the data to PrivateData. I often encounter this 
issue of recompiling whenever new data members are added to kstars.h since 
almost all classes include this header. Having PrivateData in a separate 
header would be a good idea.

I wonder if this can be done for DCOP functions as well? can the decelerations 
move to another class?

Cheers,
Jasem


More information about the Kstars-devel mailing list