|
Model Railroad System 2.2.2
|
This class maintains information about cabs. More...
#include <Cab.h>
Public Member Functions | |
| Cab (string name_="", string color_="") | |
| Construct a new cab. More... | |
| ~Cab () | |
| Clean things up. More... | |
| const char * | Name () const |
| Return the name of the cab. More... | |
| const char * | Color () const |
| Return the color of the cab. More... | |
| Cab (const Cab &other) | |
| Copy constructor. More... | |
| Cab & | operator= (const Cab &other) |
| Assignment operator. More... | |
| ostream & | Write (ostream &stream) const |
| Write object to a stream. More... | |
| istream & | Read (istream &stream) |
| Read an object from a stream. More... | |
Private Attributes | |
| string | name |
| The name of the cab. More... | |
| string | color |
| The color of the cab. More... | |
This class maintains information about cabs.
A cab has a color and a name.
|
inline |
|
inline |
Clean things up.
|
inline |
|
inline |
Return the color of the cab.
References color.
|
inline |
Return the name of the cab.
References name.
| istream & TTSupport::Cab::Read | ( | istream & | stream | ) |
Read an object from a stream.
| stream | Stream to read from. |
| ostream & TTSupport::Cab::Write | ( | ostream & | stream | ) | const |
Write object to a stream.
| stream | Stream to write to. |
|
private |
The color of the cab.
Referenced by Cab(), Color(), and operator=().
|
private |
The name of the cab.
Referenced by Cab(), Name(), and operator=().