Model Railroad System
2.2.2
|
Station times class, used by the LaTeX generator methods. More...
#include <TimeTableSystem.h>
Public Member Functions | |
StationTimes (double a=-1, double d=-1, Stop::FlagType f=Stop::Transit) | |
Constructor: create an entry for a time table cell. More... | |
StationTimes (const StationTimes &other) | |
Copy constructor: create an entry for a time table cell from an existing StationTimes object. More... | |
StationTimes & | operator= (const StationTimes &other) |
Assignment operator: copy the fields from another StationTimes object. More... | |
double | Arrival () const |
Accessor for the arrival time. More... | |
double | Departure () const |
Accessor for the departure time. More... | |
Stop::FlagType | Flag () const |
Accessor for the type of stop flag. More... | |
Private Attributes | |
double | arrival |
The arrival time, in scale time units. More... | |
double | departure |
The departure time, in scale time units. More... | |
Stop::FlagType | flag |
The stop flag: Origin, Terminate, or Transit. More... | |
Station times class, used by the LaTeX generator methods.
This class holds time table information used in the code that generates the LaTeX tables. Each StationTimes item contains one table element in the form of an arrival time and a departure time. The flag member indicates if only the arrival time, departure time, or both times are valid. An originating train has no arrival time and a terminating train has no departure time.
This class is actually used to hold the information for a single cell in a formatted time table. Each cell contains an arrivial time and a departure time. Each row in the table contains the information for a specific station and each column contains the information for a single train.
|
inline |
|
inline |
Copy constructor: create an entry for a time table cell from an existing StationTimes object.
other | The other StationTimes object. |
|
inline |
Accessor for the arrival time.
References arrival.
|
inline |
Accessor for the departure time.
References departure.
|
inline |
Accessor for the type of stop flag.
References flag.
|
inline |
Assignment operator: copy the fields from another StationTimes object.
other | The other StationTimes object. |
|
private |
The arrival time, in scale time units.
Only used for trains in transit and for terminating trains.
Referenced by Arrival(), operator=(), and StationTimes().
|
private |
The departure time, in scale time units.
Only used for trains in transit and for originating trains.
Referenced by Departure(), operator=(), and StationTimes().
|
private |
The stop flag: Origin, Terminate, or Transit.
Referenced by Flag(), operator=(), and StationTimes().