Model Railroad System 2.2.2
|
This class implements each switch list element. More...
#include <SwitchList.h>
Classes | |
union | StationOrIndustry |
A const pointer to a train's stop, which can be either a station or an industry, depending on what kind of train it is. More... | |
Public Member Functions | |
SwitchListElement () | |
Default constructor. More... | |
SwitchListElement (const SwitchListElement &other) | |
Copy constructor. More... | |
SwitchListElement & | operator= (const SwitchListElement &other) |
Assignment operator. More... | |
SwitchListElement (const Industry *pickloc, const Car *pickcar, const Train *picktrain, const Train *lasttrain, const Industry *istop) | |
Constructor, given a manifest freight's stop at an industry. More... | |
SwitchListElement (const Industry *pickloc, const Car *pickcar, const Train *picktrain, const Train *lasttrain, const Station *sstop) | |
Constructor, given a local freight's stop at a station. More... | |
const Industry * | PickLocation () const |
Return the pickup location for this switch list element. More... | |
const Car * | PickCar () const |
Return the car picked up for this switch list element. More... | |
const Train * | PickTrain () const |
Return the pickup train for this switch list element. More... | |
const Train * | LastTrain () const |
Return the train train for the car this switch list element is for. More... | |
const Industry * | DropStopIndustry () const |
Return the industry this switch list element is dropping off at. More... | |
const Station * | DropStopStation () const |
Return the station this switch list element is dropping off at. More... | |
bool | DropStopEQ (int Px) const |
Is the drop stop at the stop number specified? More... | |
Private Attributes | |
const Industry * | pickLoc |
The pickup industry. More... | |
const Car * | pickCar |
The car picked up. More... | |
const Train * | pickTrain |
The train picking this car up. More... | |
const Train * | lastTrain |
The train that previously handled this car. More... | |
StationOrIndustry | dropStop |
The station or industry where this car will be dropped off at. More... | |
Friends | |
class | System |
The System class is a friend. More... | |
This class implements each switch list element.
|
inline |
|
inline |
|
inline |
Constructor, given a manifest freight's stop at an industry.
pickloc | Pickup location of car. |
pickcar | Car being picked up by this train. |
picktrain | Train picking this car up. |
lasttrain | The last train this car was on. |
istop | Where this train will drop this car. |
References dropStop, FCFSupport::SwitchListElement::StationOrIndustry::industry, lastTrain, pickCar, pickLoc, and pickTrain.
|
inline |
Constructor, given a local freight's stop at a station.
pickloc | Pickup location of car. |
pickcar | Car being picked up by this train. |
picktrain | Train picking this car up. |
lasttrain | The last train this car was on. |
sstop | Where this train will drop this car. |
References dropStop, lastTrain, pickCar, pickLoc, pickTrain, and FCFSupport::SwitchListElement::StationOrIndustry::station.
|
inline |
Is the drop stop at the stop number specified?
Px | The train's stop number we are checking against. |
References dropStop, FCFSupport::SwitchListElement::StationOrIndustry::industry, FCFSupport::Train::IndustryStop(), FCFSupport::Train::Manifest, pickTrain, FCFSupport::SwitchListElement::StationOrIndustry::station, FCFSupport::Train::StationStop(), and FCFSupport::Train::Type().
|
inline |
Return the industry this switch list element is dropping off at.
References dropStop, FCFSupport::SwitchListElement::StationOrIndustry::industry, FCFSupport::Train::Manifest, pickTrain, and FCFSupport::Train::Type().
|
inline |
Return the station this switch list element is dropping off at.
References dropStop, FCFSupport::SwitchListElement::StationOrIndustry::industry, FCFSupport::Train::Manifest, FCFSupport::Industry::MyStation(), pickTrain, FCFSupport::SwitchListElement::StationOrIndustry::station, and FCFSupport::Train::Type().
|
inline |
Return the train train for the car this switch list element is for.
References lastTrain.
|
inline |
|
inline |
Return the car picked up for this switch list element.
References pickCar.
|
inline |
Return the pickup location for this switch list element.
References pickLoc.
|
inline |
Return the pickup train for this switch list element.
References pickTrain.
|
private |
The station or industry where this car will be dropped off at.
Referenced by DropStopEQ(), DropStopIndustry(), DropStopStation(), operator=(), and SwitchListElement().
|
private |
The train that previously handled this car.
Referenced by LastTrain(), operator=(), and SwitchListElement().
|
private |
The car picked up.
Referenced by operator=(), PickCar(), and SwitchListElement().
|
private |
The pickup industry.
Referenced by operator=(), PickLocation(), and SwitchListElement().
|
private |
The train picking this car up.
Referenced by DropStopEQ(), DropStopIndustry(), DropStopStation(), operator=(), PickTrain(), and SwitchListElement().