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

TFTLEngine Class Reference

TFTLEngine represents the FTL engine for a ship. More...

#include <item.h>

Inheritance diagram for TFTLEngine:

Inheritance graph
[legend]
Collaboration diagram for TFTLEngine:

Collaboration graph
[legend]
List of all members.

Public Methods

 TFTLEngine ()
 TFTLEngine (const TFTLEngine &OldFTLEngine)
virtual ~TFTLEngine ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setFTLPower (const int2 FTLPower)
virtual int2 getFTLPower () const
virtual bool operator== (const TFTLEngine &FTLEngine) const
virtual TFTLEngine & operator= (const TFTLEngine &FTLEngine)

Protected Attributes

int2 fFTLEnginePower

Detailed Description

TFTLEngine represents the FTL engine 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 TFTLEngine is derived from TItem and can therefore be put on a ship design. It represents a FTL engine and has - additionally to the properties of an item - a value for its power for FTL flight (FTL means "faster than light"). What this value exactly means is up to the rule set/battle engine and of no direct concern of th the class TSTLEngine as it is only a class to hold the data.


Constructor & Destructor Documentation

TFTLEngine::TFTLEngine  
 

This constructor generates a new FTL engine 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.

TFTLEngine::TFTLEngine const TFTLEngine &    OldFTLEngine
 

This constructor creates also a new FTL engine, but the attributes are copied from the FTL engine given in OldFTLEngine. Mostly implemented to provide a copy constructor.

Parameters:
OldFTLEngine  the FTL engine which shall be copied

virtual TFTLEngine::~TFTLEngine   [virtual]
 

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


Member Function Documentation

virtual int2 TFTLEngine::getFTLPower   const [virtual]
 

With the method getFTLPower you can get the power for FTL flight of the FTL engine.

Returns:
the engine's power for FTL flight

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

The method getItemType returns the type of the item, in this case TItem::FTLENGINE for FTL engine.

Returns:
TItem::FTLENGINE

Reimplemented from TItem.

virtual bool TFTLEngine::load TDataPackageList   in [virtual]
 

The method Load loads a TFTLEngine 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 TFTLEngine& TFTLEngine::operator= const TFTLEngine &    FTLEngine [virtual]
 

This is the assignment operator for TFTLEngine.

virtual bool TFTLEngine::operator== const TFTLEngine &    FTLEngine const [virtual]
 

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

Parameters:
FTLEngine  the FTL engine which shall be compared with "*this"
Returns:
true if then FTL engines are equal, false if not

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

The method Save saves a TFTLEngine 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 TFTLEngine::setFTLPower const int2    FTLPower [virtual]
 

The method setFTLPower sets the power for FTL flight of the FTL engine.

Parameters:
FTLPower  the engine's new power for FTL flight


Member Data Documentation

int2 TFTLEngine::fFTLEnginePower [protected]
 

the power for FTL flight of the engine


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