You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PlantUML produced using the composition flag should be
Scene--> "things" ThingScene--> "lights" LightScene--> "camera" Camera
Here are my reasons:
it should default to a simple association, because it's wrongly showing all associations as whole/part (composition, i.e., *--), many of which are not truly the semantics of composition. It's pretty hard to figure that out from static analysis of source code, I think. Edit: Furthermore, aggregation (to many) isn't really any different than an association in UML, so a simpler link is just to use --.
it could/should include navigability, since you can see it from the TypeScript code, e.g. Scene.things: Thing[]; implies one can navigate from the class Scene to one or more Thing. Edit: Hence, I suggest -->.
it could contain cardinalities on the association. However, PlantUML has trouble to show both the names of the ends, e.g., "things" Thing as above, and a cardinality such as "*" Thing. Maybe combining them?
First, thanks for making tplant! It is very useful!
The composition flag is good, but I'm suggesting the following improvements. Let me use this example from
test/Raytracer/Scene.ts
:The PlantUML produced using the composition flag should be
Here are my reasons:
*--
), many of which are not truly the semantics of composition. It's pretty hard to figure that out from static analysis of source code, I think. Edit: Furthermore, aggregation (to many) isn't really any different than an association in UML, so a simpler link is just to use--
.Scene.things: Thing[];
implies one can navigate from the class Scene to one or more Thing. Edit: Hence, I suggest-->
."things" Thing
as above, and a cardinality such as"*" Thing
. Maybe combining them?which doesn't always look so great, but is useful I think.
Edit: in cases of a single reference, e.g.
myThing: Thing
the cardinality would be "1"I'd be happy to try a PR to support some of these things (with tests, of course), if you think they're reasonable.
The text was updated successfully, but these errors were encountered: