Code Documentary

Where to find stuff

Simulator classes: classes.h contains the class definitions for all the Simulator classes (Simulator, TrackSegment, TrackRange, Train, TrainCar, TurnOut, Sensor). This was done to eliminate a large number of include/definition problems during compilation that were not being resolved by forward-declarations. However, each of the actual classes is contained in its own .cpp file.

Graphical classes: simwin.h contains class definitions for CMainWin and CApp. simwin.cpp contains the class code for these two classes, as well as the global logprint() function. tracksdisplay.h and .cpp contain the classes TrackDisplay, SensorDisplay, and TurnOutDisplay.

Miscellaneous: The ConfigReader class in in configreader.h/.cpp. dll_api.h/.cpp provides a rough implementation of the external API, which simply retrieves the simulator from the CMainWin instance and calls its API functions. ids.h and junk2.rc are for for the windows menus and messages.

How the system initializes

How the system runs

How a train moves