[Kstars-devel] skycomponents: update vs. updatePlanets vs. updateMoons

Thomas Kabelmann thomas.kabelmann at gmx.de
Sun Oct 23 20:23:12 CEST 2005


Hi Jason,

it's right, that a lot of components don't need updateMoons() and 
updatePlanets(). So it's a little bit overhead of having these mehtods in all 
components, but it wouldn't hurt that much. But I agree with you, that only 
SolarSystem needs this functionality and we can add it to these components 
only. Same is for trails. What I dislike is to know explicitly more than 1 
component from KStars/KStarsData/SkyMap. We should know the root composite 
and delegate all requests to this composite. Currently this composite is the 
SkyComposite. So with your idea of just adding trails and 
updateMoons()/updatePlanets() to the SolarSystem I would suggest following 
idea:

The SkyComposite knows all methods which it's children know. But it should 
also know which children understand the request to avoid an overhead. For 
expample, it knows the interface updateMoons() and updatePlanets(), but it's 
just delegates the request to the SolarSystemComposite, as nobody else would 
need this update methods. So knowing here explicitly the SolarSystemComposite 
is much better than knowing it in 3 classes (KStars, KStarsData and SkyMap).

What do you think about this approach?

Regards,
Thomas


More information about the Kstars-devel mailing list