Model Railroad System 2.2.2
|
Callback to manage a train status display. More...
#include <CallBack.h>
Public Member Functions | |
TrainDisplayCallback () | |
Constructor. More... | |
virtual | ~TrainDisplayCallback () |
Destructor. More... | |
virtual void | InitializeTrainDisplay (string name, int stationCount, int maxLength, int maxCars) const |
Initialize the train status display. More... | |
virtual void | CloseTrainDisplay () const |
Close the train display. More... | |
virtual void | GrabTrainDisplay () const |
Grab the train display. More... | |
virtual void | ReleaseTrainDisplay () const |
Release the train display. More... | |
virtual void | UpdateTrainDisplay (string currentStationName, string currentStopName, int trainLength, int numberCars, int trainTons, int trainLoads, int trainEmpties, int trainLongest, int currentStop) const |
Update the train display. More... | |
Callback to manage a train status display.
This callback is used to manage an application supplied train status display. Used in the train running methods when train runs are simulated to move cars from place place. The train status shows the train's progress and the pickups and drops it makes as it traverses its route.
@author Robert Heller \<heller\@deepsoft.com\>
|
inline |
Constructor.
The base constructor does nothing. It is presumed that a derived class might do something useful.
|
inlinevirtual |
Destructor.
The base destructor does nothing. It is presumed that a derived class might do something useful.
|
inlinevirtual |
Close the train display.
This is called when the train status display is no longer needed.
|
inlinevirtual |
Grab the train display.
This is used when the train status display needs to be `‘front and center’'.
|
inlinevirtual |
Initialize the train status display.
Set the train name, the station count, max length and the maximum number of cars. Generally, this initializes the train status display for a new train start.
name | Name of the train. |
stationCount | The station count (number of stops). |
maxLength | Maximum train length. |
maxCars | Maximum number of cars. |
|
inlinevirtual |
Release the train display.
This is used when the train status display no longer needs to be `‘front and center’'.
|
inlinevirtual |
Update the train display.
This updates the train status display when a train arrives at a station (or industry), drops cars, picks up cars and leaves a station (or industry).
currentStationName | The current station name. |
currentStopName | The current stop name. |
trainLength | The current train length. |
numberCars | The current number of cars. |
trainTons | The current number of tons. |
trainLoads | The current number of loaded cars. |
trainEmpties | The current number of empty cars. |
trainLongest | The longest the train has been. |
currentStop | The current stop number. |