[Kstars-devel] Refactor of the moons handling classes

Médéric Boquien mboquien at free.fr
Thu Aug 6 06:21:23 CEST 2009


Hello,

I think the situation with the classes handling the Jupiter and Saturn classes 
is not satisfying.
* the jupitermoonscomponent.* and saturnmoonscomponent.* files are basically 
copies of each other with only small details that are different,
* same for jupitermoons.* and saturnmoons.* except for the method calculating 
the position of the satellites which are of course planet-specific.
In addition to the code duplication, which is nefarious it makes adding the 
moons of other planets cumbersome.
As patches are better than just whining i have attached a patch which should 
improve the situation. Here is what it does mainly:
* it removes JupiterMoonsComponent and the SaturnMoonsComponent classes and 
replaces them with a PlanetMoonsComponent class,
* it factors the sharable code of JupiterMoons and SaturnMoons into a new base 
class PlanetMoons. Only the code specific to the calculation of the location 
of the satellites is left into the subclasses.
As i am not very good at C++ i would appreciate if someone could have a look 
before i commit it.

Thanks,

Médéric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: satellites.patch.gz
Type: application/x-gzip
Size: 8868 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20090806/0e01f884/attachment.gz 


More information about the Kstars-devel mailing list