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

TSTLEngine Class Reference

TSTLEngine represents the STL engine for a ship. More...

#include <item.h>

Inheritance diagram for TSTLEngine:

Inheritance graph
[legend]
Collaboration diagram for TSTLEngine:

Collaboration graph
[legend]
List of all members.

Public Methods

 TSTLEngine ()
 TSTLEngine (const TSTLEngine &OldSTLEngine)
virtual ~TSTLEngine ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setSTLPower (const int2 STLPower)
virtual int2 getSTLPower () const
virtual bool operator== (const TSTLEngine &STLEngine) const
virtual TSTLEngine & operator= (const TSTLEngine &STLEngine)

Protected Attributes

int2 fSTLEnginePower

Detailed Description

TSTLEngine represents the STL 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 TSTLEngine is derived from TItem and can therefore be put on a ship design. It represents a STL engine and has - additionally to the properties of an item - a value for its power for STL flight (STL means "slower 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 keep the data.


Constructor & Destructor Documentation

TSTLEngine::TSTLEngine  
 

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

TSTLEngine::TSTLEngine const TSTLEngine &    OldSTLEngine
 

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

Parameters:
OldSTLEngine  the STL engine which shall be copied

virtual TSTLEngine::~TSTLEngine   [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 TSTLEngine::getItemType   const [virtual]
 

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

Returns:
TItem::STLENGINE

Reimplemented from TItem.

virtual int2 TSTLEngine::getSTLPower   const [virtual]
 

With the method getSTLPower you can get the power for STL flight of the STL engine.

Returns:
the engine's power for STL flight

virtual bool TSTLEngine::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TSTLEngine.

virtual bool TSTLEngine::operator== const TSTLEngine &    STLEngine const [virtual]
 

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

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

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

The method Save saves a TSTLEngine 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 TSTLEngine::setSTLPower const int2    STLPower [virtual]
 

The method setSTLPower sets the power for STL flight of the STL engine.

Parameters:
STLPower  the engine's new power for STL flight


Member Data Documentation

int2 TSTLEngine::fSTLEnginePower [protected]
 

the power for STL flight of the engine


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