Model Railroad System
2.2.1
|
The Station class implements a single station. More...
#include <Station.h>
Public Member Functions | |
Station () | |
Default constructor. More... | |
Station (const Station &other) | |
Copy constructor, copy from another station instance. More... | |
Station & | operator= (Station &other) |
Assignment operator, copy from another station instance. More... | |
Station (const char *n, Division *d, const char *c) | |
Full constructor. More... | |
~Station () | |
Destructor. More... | |
const char * | Name () const |
Return the station's name. More... | |
Division * | MyDivision () const |
Return the station's division. More... | |
const char * | Comment () const |
Return the station's comment. More... | |
int | NumberOfIndustries () const |
Return the number of industries at this station. More... | |
FCFSupport::Industry * | TheIndustry (int i) const |
Return the Ith industry at this station. More... | |
int | AppendIndustry (FCFSupport::Industry *industry) |
Append an industry to this station's list of industries. More... | |
Private Attributes | |
string | name |
The station's name. More... | |
string | comment |
The station's comment. More... | |
Division * | division |
The station's division. More... | |
vector< Industry * > | industries |
The list of industries at this station. More... | |
Friends | |
class | System |
The System class is a friend. More... | |
The Station class implements a single station.
A station exists within a division and contains a number of industries.
A Station has a name, a comment, it belongs to a division, and has a list of industries.
|
inline |
|
inline |
Copy constructor, copy from another station instance.
other | The other station instance. |
References comment, division, industries, and name.
|
inline |
|
inline |
Destructor.
|
inline |
Append an industry to this station's list of industries.
industry | The industry to append. |
References industries.
|
inline |
Return the station's comment.
References comment.
|
inline |
Return the station's division.
References division.
|
inline |
Return the station's name.
References name.
|
inline |
Return the number of industries at this station.
References industries.
Assignment operator, copy from another station instance.
other | The other station instance. |
References comment, division, industries, and name.
|
inline |
Return the Ith industry at this station.
i | The industry index. |
References i, and industries.
|
private |
The station's comment.
Referenced by Comment(), operator=(), and Station().
|
private |
The station's division.
Referenced by MyDivision(), operator=(), and Station().
|
private |
The list of industries at this station.
Referenced by AppendIndustry(), NumberOfIndustries(), operator=(), Station(), and TheIndustry().
|
private |
The station's name.
Referenced by Name(), operator=(), and Station().