book2DriveObject Class Reference

#include <book2-drive-object.hpp>

Inheritance diagram for book2DriveObject:

Inheritance graph
[legend]
List of all members.

Detailed Description

This defines a base class for all drive elements as defined in "Starships" as part of the original Traveller boxed set.

Definition at line 39 of file book2-drive-object.hpp.

Public Member Functions

 book2DriveObject ()
char getModel ()
virtual void setModel (char m)
double getMass ()
void setMass (double m)
double getCost ()
void setCost (double c)


Constructor & Destructor Documentation

book2DriveObject::book2DriveObject (  ) 

Constructor

Definition at line 27 of file book2-drive-object.cpp.

00027                                   {
00028         cost =0;
00029         mass = 0; 
00030         model = '?';
00031 }


Member Function Documentation

double book2DriveObject::getCost (  ) 

get the drive's cost

Returns:
double value representing the cost of the drive

Definition at line 49 of file book2-drive-object.cpp.

00049                                 {
00050         return cost;
00051 }

double book2DriveObject::getMass (  ) 

get the drive's mass

Returns:
double value for the mass of the drive.

Definition at line 41 of file book2-drive-object.cpp.

Referenced by book2DriveCompartment::totalMass().

00041                                 {
00042         return mass;
00043 }

Here is the caller graph for this function:

char book2DriveObject::getModel (  ) 

Return the model number

Returns:
single character value.

Definition at line 33 of file book2-drive-object.cpp.

00033                                {
00034         return model;
00035 }

void book2DriveObject::setCost ( double  c  ) 

set the drive's cost

Parameters:
c double value representing the cost of the drive.

Definition at line 53 of file book2-drive-object.cpp.

Referenced by book2ManeuverDrive::setModel().

00053                                       {
00054         cost =c;
00055 }

Here is the caller graph for this function:

void book2DriveObject::setMass ( double  m  ) 

set the drive's mass

Parameters:
m -- double value representing the drive's mass

Definition at line 45 of file book2-drive-object.cpp.

Referenced by book2PowerPlant::setModel(), book2ManeuverDrive::setModel(), and book2JumpDrive::setModel().

00045                                       {
00046         mass =m;
00047 }

Here is the caller graph for this function:

void book2DriveObject::setModel ( char  m  )  [virtual]

Set the model number. This is a virutal member since the derived classes will overload this as needed to handle any side effects of setting the model number.

Parameters:
m single character model number

Reimplemented in book2JumpDrive, book2ManeuverDrive, and book2PowerPlant.

Definition at line 37 of file book2-drive-object.cpp.

Referenced by book2PowerPlant::setModel(), book2ManeuverDrive::setModel(), and book2JumpDrive::setModel().

00037                                      {
00038         model = m;
00039 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Fri Mar 7 16:41:18 2008 for frpuniverse by  doxygen 1.4.7