[Kstars-devel] SkyPoint/SkyObject refactoring

Akarsh Simha akarshsimha at gmail.com
Thu May 28 14:22:47 CEST 2009


> I think that SkyPoint class should not be superclass of SkyObject. Instead it 
> should be its data member. 
> 
> It could be justified by following arguments. SkyObject  _is_  _not_ really a 
> SkyPoint it is a some entity which has some celestial coordinate.  Moreover 
> SkyPoint doesn't define any virtual methods except for updateCoords and so 
> doesn't define any part of SkyObject's API. And last point is SkyPoint is used 
> on its own without regard to SkyObject family.
> 
> Cons: This is and extensive change.
> 
> Any comment/suggestions/whatever ? 

I don't see why (from KStars' point of view) a SkyObject is not a
SkyPoint (with some dimensions and extra attributes). I wonder if it
is worth all the effort to tackle this. SkyObject is comfortably
extending SkyPoint, right?

Moreover, the code will become much more complicated if a SkyObject
has a SkyPoint rather than inheriting from it. We will need to call
SkyObject::point()->ra() for instance, or reimplement a host of
functions. I don't think the change is worth the effort.

Regards
Akarsh


More information about the Kstars-devel mailing list