Model Railroad System
2.2.1
|
The Industry class represents an industry. More...
#include <Industry.h>
Public Member Functions | |
Industry () | |
Default constructor. More... | |
Industry (Industry &other) | |
Copy constructor. More... | |
Industry & | operator= (Industry &other) |
Assignment operator. More... | |
Industry (char t, Station *st, const char *n, int tl, int al, int p, bool r, char h, Industry *m, int pl, int c, const char *dcl, int mcl, const char *lt, const char *et) | |
Full constructor. More... | |
char | Type () const |
Return the type of the industry. More... | |
Station * | MyStation () const |
Return the industry's station. More... | |
const char * | Name () const |
Return the industry's name. More... | |
int | TrackLen () const |
Return the amount of track at this industry. More... | |
int | AssignLen () const |
Return the assignable amount of track at this industry. More... | |
int | Priority () const |
Return this industry's priority. More... | |
bool | Reload () const |
Can this industry reload cars? More... | |
char | Hazard () const |
What sorts of hazardious material classes can this industry handle? More... | |
Industry * | MyMirror () const |
This industry's mirror industry (if any). More... | |
int | MaxPlate () const |
Maximum clearance plate this industry can handle. More... | |
int | MaxWeightClass () const |
Maximum weight class this industry can handle. More... | |
const char * | DivisionControlList () const |
This indusry's division control list. More... | |
int | MaxCarLen () const |
The maximum car length this industry can handle. More... | |
const char * | LoadsAccepted () const |
The types of loads this industry can handle. More... | |
const char * | EmptiesAccepted () const |
The types of empties this industry can handle. More... | |
FCFSupport::Car * | TheCar (int i) const |
Return the indexed car at this industry. More... | |
int | NumberOfCars () const |
Return the number of cars at this industry. More... | |
void | IncrementStatsLen (int i=1) |
Increment the stats length. More... | |
int | CarsNum () const |
Return the number of cars. More... | |
int | CarsLen () const |
Return the length of all of the cars. More... | |
int | StatsLen () const |
Return the stats length. More... | |
Private Attributes | |
CarVector | cars |
The vector of cars at this industry. More... | |
Station * | station |
The station this industry is at. More... | |
Industry * | mirror |
The mirror industry or NULL if there is no mirror industry. More... | |
string | name |
The name of the industry. More... | |
string | loadTypes |
The vector of loaded car type charactes. More... | |
string | emptyTypes |
The vector of empty car type characters. More... | |
string | divisionControlList |
The division control list. More... | |
int | trackLen |
The track length. More... | |
int | assignLen |
The assignable length. More... | |
int | priority |
The industry's priority. More... | |
int | plate |
The industry's clearance plate. More... | |
int | weightclass |
The industry's weight class. More... | |
int | maxCarLen |
The maximum car length. More... | |
int | carsNum |
The number of cars. More... | |
int | carsLen |
The length of the cars. More... | |
int | statsLen |
The stats length. More... | |
int | usedLen |
The used length. More... | |
int | remLen |
The remaining length. More... | |
bool | reload |
The reload flag. More... | |
char | type |
The industry type. More... | |
char | hazard |
The hazard type character. More... | |
Friends | |
class | System |
The System class is a friend. More... | |
The Industry class represents an industry.
There are several types of industries, including yards, on line industries, and off line industries. An industry has track where cars can be spotted for storage, loading, and unloading. On-line industries and yards have this trackage on the layout. off line industries have this trackage either in the form of a hidden staging yard or don't have any real trackage at all.
An industry takes specific loaded and empty car types, has a maximum weight and clearance plate, in at a specific station and has a division control list. Some industries are mirrors of others and some industries can re-load cars.
@author Robert Heller \<heller\@deepsoft.com\>
|
inline |
|
inline |
Copy constructor.
Initialize this industry from another existing industry.
other | The other industry. |
References assignLen, cars, carsLen, carsNum, divisionControlList, emptyTypes, hazard, loadTypes, maxCarLen, mirror, name, plate, priority, reload, remLen, station, statsLen, trackLen, type, usedLen, and weightclass.
|
inline |
Full constructor.
Create a new industry from a full set of parameters.
t | The type of industry ('Y' for yard, 'O' for offline, 'I' for online). |
st | Station this industry is at. |
n | The name of the industry. |
tl | The track length at this industry. |
al | The assignable length at this industry. |
p | Tnis industry's priority. |
r | Car reload flag. |
h | Hazard code. |
m | Mirror industry. |
pl | Maximum clearance plate. |
c | Maximum weight class. |
dcl | Division control list. |
mcl | Maximum car length. |
lt | Loaded car types accepted here. |
et | Empty car type accepted here. |
References assignLen, carsLen, carsNum, divisionControlList, emptyTypes, hazard, loadTypes, maxCarLen, mirror, name, plate, priority, reload, remLen, station, statsLen, trackLen, type, usedLen, and weightclass.
|
inline |
Return the assignable amount of track at this industry.
References assignLen.
|
inline |
Return the length of all of the cars.
References carsLen.
|
inline |
Return the number of cars.
References carsNum.
|
inline |
This indusry's division control list.
References divisionControlList.
|
inline |
The types of empties this industry can handle.
References emptyTypes.
|
inline |
What sorts of hazardious material classes can this industry handle?
References hazard.
|
inline |
|
inline |
The types of loads this industry can handle.
References loadTypes.
|
inline |
The maximum car length this industry can handle.
References maxCarLen.
|
inline |
Maximum clearance plate this industry can handle.
References plate.
|
inline |
Maximum weight class this industry can handle.
References weightclass.
|
inline |
This industry's mirror industry (if any).
References mirror.
|
inline |
Return the industry's station.
References station.
Referenced by FCFSupport::SwitchListElement::DropStopStation().
|
inline |
Return the industry's name.
References name.
|
inline |
Return the number of cars at this industry.
References cars.
Assignment operator.
Initialize this industry from another existing industry.
other | The other industry. |
References assignLen, cars, carsLen, carsNum, divisionControlList, emptyTypes, hazard, loadTypes, maxCarLen, mirror, name, plate, priority, reload, remLen, station, statsLen, trackLen, type, usedLen, and weightclass.
|
inline |
Return this industry's priority.
References priority.
|
inline |
Can this industry reload cars?
References reload.
|
inline |
Return the stats length.
References statsLen.
|
inline |
|
inline |
Return the amount of track at this industry.
References trackLen.
|
inline |
Return the type of the industry.
References type.
|
private |
The assignable length.
Referenced by AssignLen(), Industry(), and operator=().
|
private |
The vector of cars at this industry.
Referenced by Industry(), NumberOfCars(), operator=(), and TheCar().
|
private |
The length of the cars.
Referenced by CarsLen(), Industry(), and operator=().
|
private |
The number of cars.
Referenced by CarsNum(), Industry(), and operator=().
|
private |
The division control list.
Referenced by DivisionControlList(), Industry(), and operator=().
|
private |
The vector of empty car type characters.
Referenced by EmptiesAccepted(), Industry(), and operator=().
|
private |
The hazard type character.
Referenced by Hazard(), Industry(), and operator=().
|
private |
The vector of loaded car type charactes.
Referenced by Industry(), LoadsAccepted(), and operator=().
|
private |
The maximum car length.
Referenced by Industry(), MaxCarLen(), and operator=().
|
private |
The mirror industry or NULL if there is no mirror industry.
Referenced by Industry(), MyMirror(), and operator=().
|
private |
The name of the industry.
Referenced by Industry(), Name(), and operator=().
|
private |
The industry's clearance plate.
Referenced by Industry(), MaxPlate(), and operator=().
|
private |
The industry's priority.
Referenced by Industry(), operator=(), and Priority().
|
private |
The reload flag.
Referenced by Industry(), operator=(), and Reload().
|
private |
The remaining length.
Referenced by Industry(), and operator=().
|
private |
The station this industry is at.
Referenced by Industry(), MyStation(), and operator=().
|
private |
The stats length.
Referenced by IncrementStatsLen(), Industry(), operator=(), and StatsLen().
|
private |
The track length.
Referenced by Industry(), operator=(), and TrackLen().
|
private |
The industry type.
Referenced by Industry(), operator=(), and Type().
|
private |
The used length.
Referenced by Industry(), and operator=().
|
private |
The industry's weight class.
Referenced by Industry(), MaxWeightClass(), and operator=().