Definition at line 30 of file book2-jump-drive.hpp.
Public Member Functions | |
book2JumpDrive () | |
book2JumpDrive (char m) | |
virtual void | setModel (char m) |
book2JumpDrive::book2JumpDrive | ( | char | m | ) |
Variant style constructor.
m | -- model number for the drive. |
Definition at line 58 of file book2-jump-drive.cpp.
References setModel().
00058 : book2DriveObject (){ 00059 00060 this->setModel(m); 00061 }
Here is the call graph for this function:
void book2JumpDrive::setModel | ( | char | m | ) | [virtual] |
virtualized member; set the drive model.
m | -- model number for the drive. |
Reimplemented from book2DriveObject.
Definition at line 63 of file book2-jump-drive.cpp.
References driveRecord::cost, book2DriveObject::setMass(), and book2DriveObject::setModel().
Referenced by book2JumpDrive().
00063 { 00064 this->book2DriveObject::setModel (m); // Invoke the base class's method. 00065 int ix; 00066 int set=0; 00067 00068 for(ix=0;ix<24;ix++){ // search the table for the model number 00069 if ( jumpDriveTable[ix].model == m ){ // if found... 00070 this->setCost(jumpDriveTable[ix].cost); // set the cost 00071 this->setMass(jumpDriveTable[ix].mass); // set the tonnage 00072 set = 1; 00073 } 00074 } 00075 00076 if ( set == 0 ) 00077 this->book2DriveObject::setModel('?'); 00078 00079 00080 }
Here is the call graph for this function:
Here is the caller graph for this function: