Model Railroad System  2.2.2
Public Member Functions | Private Attributes | Friends | List of all members
FCFSupport::Industry Class Reference

The Industry class represents an industry. More...

#include <Industry.h>

Public Member Functions

 Industry ()
 Default constructor. More...
 
 Industry (Industry &other)
 Copy constructor. More...
 
Industryoperator= (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...
 
StationMyStation () 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...
 
IndustryMyMirror () 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::CarTheCar (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...
 
Stationstation
 The station this industry is at. More...
 
Industrymirror
 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...
 

Detailed Description

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\>

Constructor & Destructor Documentation

◆ Industry() [1/3]

FCFSupport::Industry::Industry ( )
inline

Default constructor.

Fill all slots with default values.

References assignLen, carsLen, carsNum, divisionControlList, emptyTypes, hazard, loadTypes, maxCarLen, mirror, name, plate, priority, reload, remLen, station, statsLen, trackLen, type, usedLen, and weightclass.

◆ Industry() [2/3]

FCFSupport::Industry::Industry ( Industry other)
inline

Copy constructor.

Initialize this industry from another existing industry.

Parameters
otherThe 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.

◆ Industry() [3/3]

FCFSupport::Industry::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 
)
inline

Full constructor.

Create a new industry from a full set of parameters.

Parameters
tThe type of industry ('Y' for yard, 'O' for offline, 'I' for online).
stStation this industry is at.
nThe name of the industry.
tlThe track length at this industry.
alThe assignable length at this industry.
pTnis industry's priority.
rCar reload flag.
hHazard code.
mMirror industry.
plMaximum clearance plate.
cMaximum weight class.
dclDivision control list.
mclMaximum car length.
ltLoaded car types accepted here.
etEmpty 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.

Member Function Documentation

◆ AssignLen()

int FCFSupport::Industry::AssignLen ( ) const
inline

Return the assignable amount of track at this industry.

References assignLen.

◆ CarsLen()

int FCFSupport::Industry::CarsLen ( ) const
inline

Return the length of all of the cars.

References carsLen.

◆ CarsNum()

int FCFSupport::Industry::CarsNum ( ) const
inline

Return the number of cars.

References carsNum.

◆ DivisionControlList()

const char* FCFSupport::Industry::DivisionControlList ( ) const
inline

This indusry's division control list.

References divisionControlList.

◆ EmptiesAccepted()

const char* FCFSupport::Industry::EmptiesAccepted ( ) const
inline

The types of empties this industry can handle.

References emptyTypes.

◆ Hazard()

char FCFSupport::Industry::Hazard ( ) const
inline

What sorts of hazardious material classes can this industry handle?

References hazard.

◆ IncrementStatsLen()

void FCFSupport::Industry::IncrementStatsLen ( int  i = 1)
inline

Increment the stats length.

References i, and statsLen.

◆ LoadsAccepted()

const char* FCFSupport::Industry::LoadsAccepted ( ) const
inline

The types of loads this industry can handle.

References loadTypes.

◆ MaxCarLen()

int FCFSupport::Industry::MaxCarLen ( ) const
inline

The maximum car length this industry can handle.

References maxCarLen.

◆ MaxPlate()

int FCFSupport::Industry::MaxPlate ( ) const
inline

Maximum clearance plate this industry can handle.

References plate.

◆ MaxWeightClass()

int FCFSupport::Industry::MaxWeightClass ( ) const
inline

Maximum weight class this industry can handle.

References weightclass.

◆ MyMirror()

Industry* FCFSupport::Industry::MyMirror ( ) const
inline

This industry's mirror industry (if any).

References mirror.

◆ MyStation()

Station* FCFSupport::Industry::MyStation ( ) const
inline

Return the industry's station.

References station.

Referenced by FCFSupport::SwitchListElement::DropStopStation().

◆ Name()

const char* FCFSupport::Industry::Name ( ) const
inline

Return the industry's name.

References name.

◆ NumberOfCars()

int FCFSupport::Industry::NumberOfCars ( ) const
inline

Return the number of cars at this industry.

References cars.

◆ operator=()

Industry& FCFSupport::Industry::operator= ( Industry other)
inline

Assignment operator.

Initialize this industry from another existing industry.

Parameters
otherThe 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.

◆ Priority()

int FCFSupport::Industry::Priority ( ) const
inline

Return this industry's priority.

References priority.

◆ Reload()

bool FCFSupport::Industry::Reload ( ) const
inline

Can this industry reload cars?

References reload.

◆ StatsLen()

int FCFSupport::Industry::StatsLen ( ) const
inline

Return the stats length.

References statsLen.

◆ TheCar()

FCFSupport::Car* FCFSupport::Industry::TheCar ( int  i) const
inline

Return the indexed car at this industry.

Parameters
iThis car index.

References cars, and i.

◆ TrackLen()

int FCFSupport::Industry::TrackLen ( ) const
inline

Return the amount of track at this industry.

References trackLen.

◆ Type()

char FCFSupport::Industry::Type ( ) const
inline

Return the type of the industry.

References type.

Friends And Related Function Documentation

◆ System

friend class System
friend

The System class is a friend.

Member Data Documentation

◆ assignLen

int FCFSupport::Industry::assignLen
private

The assignable length.

Referenced by AssignLen(), Industry(), and operator=().

◆ cars

CarVector FCFSupport::Industry::cars
private

The vector of cars at this industry.

Referenced by Industry(), NumberOfCars(), operator=(), and TheCar().

◆ carsLen

int FCFSupport::Industry::carsLen
private

The length of the cars.

Referenced by CarsLen(), Industry(), and operator=().

◆ carsNum

int FCFSupport::Industry::carsNum
private

The number of cars.

Referenced by CarsNum(), Industry(), and operator=().

◆ divisionControlList

string FCFSupport::Industry::divisionControlList
private

The division control list.

Referenced by DivisionControlList(), Industry(), and operator=().

◆ emptyTypes

string FCFSupport::Industry::emptyTypes
private

The vector of empty car type characters.

Referenced by EmptiesAccepted(), Industry(), and operator=().

◆ hazard

char FCFSupport::Industry::hazard
private

The hazard type character.

Referenced by Hazard(), Industry(), and operator=().

◆ loadTypes

string FCFSupport::Industry::loadTypes
private

The vector of loaded car type charactes.

Referenced by Industry(), LoadsAccepted(), and operator=().

◆ maxCarLen

int FCFSupport::Industry::maxCarLen
private

The maximum car length.

Referenced by Industry(), MaxCarLen(), and operator=().

◆ mirror

Industry* FCFSupport::Industry::mirror
private

The mirror industry or NULL if there is no mirror industry.

Referenced by Industry(), MyMirror(), and operator=().

◆ name

string FCFSupport::Industry::name
private

The name of the industry.

Referenced by Industry(), Name(), and operator=().

◆ plate

int FCFSupport::Industry::plate
private

The industry's clearance plate.

Referenced by Industry(), MaxPlate(), and operator=().

◆ priority

int FCFSupport::Industry::priority
private

The industry's priority.

Referenced by Industry(), operator=(), and Priority().

◆ reload

bool FCFSupport::Industry::reload
private

The reload flag.

Referenced by Industry(), operator=(), and Reload().

◆ remLen

int FCFSupport::Industry::remLen
private

The remaining length.

Referenced by Industry(), and operator=().

◆ station

Station* FCFSupport::Industry::station
private

The station this industry is at.

Referenced by Industry(), MyStation(), and operator=().

◆ statsLen

int FCFSupport::Industry::statsLen
private

The stats length.

Referenced by IncrementStatsLen(), Industry(), operator=(), and StatsLen().

◆ trackLen

int FCFSupport::Industry::trackLen
private

The track length.

Referenced by Industry(), operator=(), and TrackLen().

◆ type

char FCFSupport::Industry::type
private

The industry type.

Referenced by Industry(), operator=(), and Type().

◆ usedLen

int FCFSupport::Industry::usedLen
private

The used length.

Referenced by Industry(), and operator=().

◆ weightclass

int FCFSupport::Industry::weightclass
private

The industry's weight class.

Referenced by Industry(), MaxWeightClass(), and operator=().