Definition at line 30 of file book2-power-plant.hpp.
Public Member Functions | |
book2PowerPlant () | |
book2PowerPlant (char m) | |
virtual void | setModel (char m) |
book2PowerPlant::book2PowerPlant | ( | ) |
Non-parametized constructor.
Definition at line 56 of file book2-power-plant.cpp.
00056 : book2DriveObject(){ 00057 }
book2PowerPlant::book2PowerPlant | ( | char | m | ) |
Parametized constructor
m | model number of the drive |
Definition at line 59 of file book2-power-plant.cpp.
References setModel().
00059 : book2DriveObject(){ 00060 this->setModel(m); 00061 }
Here is the call graph for this function:
void book2PowerPlant::setModel | ( | char | m | ) | [virtual] |
Virtualized member
m | model number for the drive. |
Reimplemented from book2DriveObject.
Definition at line 63 of file book2-power-plant.cpp.
References driveRecord::cost, book2DriveObject::setMass(), and book2DriveObject::setModel().
Referenced by book2PowerPlant().
00063 { 00064 int set =0; 00065 int ix; 00066 00067 for(ix=0;ix<24;ix++){ 00068 if ( powerPlantTable[ix].model == m ) { 00069 this->setCost(powerPlantTable[ix].cost); 00070 this->setMass(powerPlantTable[ix].mass); 00071 set=1; 00072 } 00073 } 00074 if ( set == 1 ) 00075 this->book2DriveObject::setModel(m); 00076 else 00077 this->book2DriveObject::setModel('?'); 00078 00079 }
Here is the call graph for this function:
Here is the caller graph for this function: