Author Topic: UMLS diagram  (Read 1740 times)

0 Members and 1 Guest are viewing this topic.

Offline dndimitr

UMLS diagram
« on: June 26, 2014, 12:12:22 PM »
Have you got any UMLS diagram ? I would like to see the connections between the classes ( class diagram) ....

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4543
  • Total likes: 163
  • Helpful: 106
  • Languages: EN, NO
Re: UMLS diagram
« Reply #1 on: June 26, 2014, 04:34:02 PM »
Simutrans is a hobbyist project. No time for such things. Not to mention that UML programs tend to be expensive, difficult to use, or both.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8685
  • Total likes: 294
  • Helpful: 228
  • Languages: De,EN,JP
Re: UMLS diagram
« Reply #2 on: June 26, 2014, 09:13:27 PM »
And the core of simutrans is as old as the original UML spec ...

Offline dndimitr

Re: UMLS diagram
« Reply #3 on: June 26, 2014, 09:42:31 PM »
Ok you are right !!!

I have got an exercise that I must do UML diagram for open source project !!!
I know that is difficult to find an existance uml diagram so if you have got time I would like to help me to find the next three files:

1) Which .c / .h files are used for map
2) Which .c / .h files are used for dialog boxes ( when player click somewhere on the map)
3) Which .c / .h files are used for time that there is left-bottom.

Thank you in advance !!!

Offline DrSuperGood

Re: UMLS diagram
« Reply #4 on: June 27, 2014, 02:46:38 AM »
I think welt_t is used to represent the actual map session and so can sort of be considered a super type.

The game is also not fully object orientated I think, with it forcing singletons in cases such as welt_t (no having many sessions open at once in the same process?).

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4543
  • Total likes: 163
  • Helpful: 106
  • Languages: EN, NO
Re: UMLS diagram
« Reply #5 on: June 27, 2014, 04:41:39 AM »
Simutrans has much that isn't object oriented, but I wouldn't say that singletons are part of the reason.

1) simworld.c/h contains karte_t is what defines the map itself (karte means map) and a few more things. It's the most central class of all. This class is also at the boundary between the procedural part of Simutrans and the object oriented part.
2) All dialogs should be in the gui directory. I believe simwin.c/h is the starting point.
3) I don't think there are any specific files dealing with just the time. I would expect that the value is in karte_t somewhere. Drawing it on screen is probably done together with the rest of the status bar, which might not be a class at all. (If it is a class, it is not done in an object oriented fashion with regards to the time.)