![]() |
Trax3 3.1.0
trax track library
|
There is an abundance of different objects provided by the trax library. Typically they are created with smart pointers, managing their lifetimes automatically. However, who is holding these smart pointers? The answer is: Collections.
The master of all collections is the ModuleCollection. It holds Module objects that in turn hold one TrackSystem and one Fleet. A TrackSystem maintains TrackCollection objects that are used to group and locate tracks inside of a TrackSystem. A frame is understood as to be relative to it's parent in the following transformation hierarchy (classes in braces do not apply a transformation):
(ModuleCollection)
|
Module ____________________________________________________________________
| |
(TrackSystem)------------------------------------------------ (Fleet)
| | | |
(TrackCollectionContainer) (ConnectorCollection) (SignalCollection) (Train)
| | | |
| (Connector) (Signal) ---------------
TrackCollection | |
| (RollingStock) (Train)
| |
| Bogie
Track |
| ChildBogie
(Curve)
The Fleet solely holds Trains, which in turn hold RollingStocks and other Trains. A RollingStock holds Bogies and WheelFrames. A Bogie can hold child Bogies, which most probably will be WheelFrames.