Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

TFuelTank Class Reference

TFuelTank represents the fuel tank for a ship. More...

#include <item.h>

Inheritance diagram for TFuelTank:

Inheritance graph
[legend]
Collaboration diagram for TFuelTank:

Collaboration graph
[legend]
List of all members.

Public Methods

 TFuelTank ()
 TFuelTank (const TFuelTank &OldFuelTank)
virtual ~TFuelTank ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setTankCapacity (const int2 Capacity)
virtual int2 getTankCapacity () const
virtual bool operator== (const TFuelTank &FuelTank) const
virtual TFuelTank & operator= (const TFuelTank &FuelTank)

Protected Attributes

int2 fTankCapacity

Detailed Description

TFuelTank represents the fuel tank for a ship.

Author:
Ralf Laue
Version:
Id:
item.h,v 1.34 2002/04/02 22:33:08 prolator Exp
See also:
TShipDesign
The class TFuelTank is derived from TItem and can therefore be put on a ship design. TFuelTank represents the fuel tank of a ship. As all other items it has mass, volume and surface area. Additionally it can hold an amount of anti matter (that's the fuel). With increasing tech level the containment technology gets better and more antimatter can be stored per ton of fuel tank. How this is exactly handled and what one unit of fuel is worth, is up to rule set/battle engine and of no direct concern of TFuleTank


Constructor & Destructor Documentation

TFuelTank::TFuelTank  
 

This constructor generates a new TFuelTank object with all properties resetted. This means you have to set all properties like name and mass afterwards with help of the respective set<something> methods.

TFuelTank::TFuelTank const TFuelTank &    OldFuelTank
 

This constructor creates also a new fuel tank, but the attributes are copied from the fuel tank given in OldFuelTank. Mostly implemented to provide a copy constructor.

Parameters:
OldFuelTank  the fuel tank which shall be copied

virtual TFuelTank::~TFuelTank   [virtual]
 

Destructs the object. Has nothing else to do, because no memory has to be freed or similar stuff.


Member Function Documentation

virtual TItem::tItemType TFuelTank::getItemType   const [virtual]
 

The method getItemType returns the type of the item, in this case TItem::FUELTANK for fuel tank.

Returns:
TItem::FUELTANK

Reimplemented from TItem.

virtual int2 TFuelTank::getTankCapacity   const [virtual]
 

With the method getTankCapacity you can get the size/storage capacity for the fuel tank.

Returns:
the fuel tank's storage capacity for anti matter

virtual bool TFuelTank::load TDataPackageList   in [virtual]
 

The method Load loads a TFuelTank object from the data packages in the list.

Parameters:
in  the list of data packages
Returns:
true means that everything was loaded correctly, otherwise this method will return false.
See also:
TLinkable

Reimplemented from TItem.

virtual TFuelTank& TFuelTank::operator= const TFuelTank &    FuelTank [virtual]
 

This is the assignment operator for TFuelTank.

virtual bool TFuelTank::operator== const TFuelTank &    FuelTank const [virtual]
 

With the method operator== you can compare two TFuelTank objects. This is of course the behaviour one would expect from "operator==".

Parameters:
FuelTank  the fuel tank object which shall be compared with "*this"
Returns:
true if the fuel tank objects are equal, false if not

virtual bool TFuelTank::save TDataPackageList   out const [virtual]
 

The method Save saves a TFuelTank object by adding the data packages to the list.

Parameters:
out  the output stream of data packages
Returns:
true means that everything was saved correctly, otherwise this method will return false.
See also:
TLinkable

Reimplemented from TItem.

virtual void TFuelTank::setTankCapacity const int2    Capacity [virtual]
 

The method setTankCapacity sets the size/storage capacity for the fuel tank.

Parameters:
Capacity  the fuel tank's storage capacity for anti matter


Member Data Documentation

int2 TFuelTank::fTankCapacity [protected]
 

the capacity of the fuel tank object


The documentation for this class was generated from the following file:
Generated on Thu Jun 20 18:13:22 2002 for Stellar Legacy by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001