The International Simutrans Forum

Development => Technical Documentation => Topic started by: isidoro on March 04, 2012, 10:55:59 PM

Title: Class diagram for ding_t
Post by: isidoro on March 04, 2012, 10:55:59 PM
This is a class diagram for ding_t.  Although it is intended for software engineers/coders, it can more o less be understood by everyone.

One of the things I learned doing it is that for ST, a runway is a track...   :D

Another question for the German people around here that also wondered while doing it: does Claudia Schiffer mean in English Claudia The Sailorette?

(http://simutrans-germany.com/files/upload/dings.png)
And a link with a .pdf...  But I would try to print it in A3 at least...  ;)
http://simutrans-germany.com/files/upload/dings.pdf.zip (http://simutrans-germany.com/files/upload/dings.pdf.zip)

Title: Re: Class diagram for ding_t
Post by: Combuijs on March 04, 2012, 11:48:12 PM
QuoteAnother question for the German people around here that also wondered while doing it: does Claudia Schiffer mean in English Claudia The Sailorette?

I'm not German, but Schiffer means someone who steers a ship, e.g. a captain, bargeman or (in sound most close) skipper.
Title: Re: Class diagram for ding_t
Post by: Ashley on March 05, 2012, 12:07:20 AM
Very useful :) How about one for the GUI classes?
Title: Re: Class diagram for ding_t
Post by: prissi on March 05, 2012, 09:17:33 AM
Schiene are all stuff, that is reservable ... In old days it was only tram and tracks.

And pumpe_t and senke_t should sync_stepable, while a lietungs should not. Only delivery of power should need constant action, transmission should be passive.

gebaeude_t is sync_steppable.
Title: Re: Class diagram for ding_t
Post by: isidoro on March 05, 2012, 01:43:50 PM
Thanks, Prissi, I will correct the errors once more feedback arrives.
Quote from: prissi on March 05, 2012, 09:17:33 AM
[...]
And pumpe_t and senke_t should sync_stepable, while a lietungs should not. Only delivery of power should need constant action, transmission should be passive.
[...]

In fact they are, since they inherit from lietung.  I only marked direct inheritance.  One question, though, all factories, attractions and city buildings use gebaude_t?


@Timothy: I agree.  When looking for abstract classes the other place where I found lots of them was in GUI elements.  Besides, Markohs would benefit for such a diagram in his CEGUI port.  Go ahead, I think it is worth the effort...


@Combuijs: my dream!  Sailing the big ocean with Claudia by my side...  Stopping here and there, now this tropical beach, then wherever,...  8)

Title: Re: Class diagram for ding_t
Post by: prissi on March 05, 2012, 01:45:21 PM
Maybe we shoudl change inheritance. I think nowadays even pumpe_t does not need sync_stepable any more.
Title: Re: Class diagram for ding_t
Post by: Dwachs on March 05, 2012, 02:01:48 PM
Indeed, only senke_t implements the sync_steppable interface, but not pumpe_t.

Quote from: isidoro on March 05, 2012, 01:43:50 PM
One question, though, all factories, attractions and city buildings use gebaude_t?
Yes. Each single tile covered by such a building carries a gebaude_t object. The code for factories is however independent of gebaude_t.
Title: Re: Class diagram for ding_t
Post by: Markohs on March 05, 2012, 02:03:42 PM
Quote from: isidoro on March 05, 2012, 01:43:50 PM
@Timothy: I agree.  When looking for abstract classes the other place where I found lots of them was in GUI elements.  Besides, Markohs would benefit for such a diagram in his CEGUI port.  Go ahead, I think it is worth the effort...

Yes indee, whould be very useful to me. I already redesigned gui_frame_t to be a gui_frame_templated and action listeners and sender are embedded there, but I think I'll need to re-design them completely soon, because I think I didn't made the correct decisions. I'd like to keep gui_frame_t, but I think it's incompatible with templated windows.
Title: Re: Class diagram for ding_t
Post by: jamespetts on March 09, 2012, 10:19:59 PM
Very interesting!