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

TRepairBot Class Reference

TRepairBot represents a repair module for a ship. More...

#include <item.h>

Inheritance diagram for TRepairBot:

Inheritance graph
[legend]
Collaboration diagram for TRepairBot:

Collaboration graph
[legend]
List of all members.

Public Methods

 TRepairBot ()
 TRepairBot (const TRepairBot &OldRepairBot)
virtual ~TRepairBot ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setRepairSpeed (const int2 RepairSpeed)
virtual int2 getRepairSpeed () const
virtual bool operator== (const TRepairBot &RepairBot) const
virtual TRepairBot & operator= (const TRepairBot &RepairBot)

Protected Attributes

int2 fRepairSpeed

Detailed Description

TRepairBot represents a repair module 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 TRepairBot is derived from TItem and can therefore be put on a ship design. TRepairBot represents the repair module of a ship. As all other items it has mass, volume and surface area. A repair module provides the possibility to the ship, to repair itself. The efficiency of the repair module is saved in the field fRepairSpeed. When and how a ship can repair itself is layed down by the rule set and of no direct concern to the TRepairBot item class.


Constructor & Destructor Documentation

TRepairBot::TRepairBot  
 

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

TRepairBot::TRepairBot const TRepairBot &    OldRepairBot
 

This constructor creates also a new repair module, but the attributes are copied from the reapir module given in OldRepairBot. Mostly implemented to provide a copy constructor.

Parameters:
OldRepairBot  the TRepairBot object which shall be copied

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

The method getItemType returns the type of the item, in this case TItem::REPAIRBOT for repair module.

Returns:
TItem::REPAIRBOT

Reimplemented from TItem.

virtual int2 TRepairBot::getRepairSpeed   const [virtual]
 

With the method getRepairSpeed you can get the efficiency of the repair module.

Returns:
the repair module's efficiency

virtual bool TRepairBot::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TRepairBot.

virtual bool TRepairBot::operator== const TRepairBot &    RepairBot const [virtual]
 

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

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

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

The method Save saves a TRepairBot 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 TRepairBot::setRepairSpeed const int2    RepairSpeed [virtual]
 

The method setRepairSpeed sets the efficiency of the repair module.

Parameters:
RepairSpeed  the repair module's efficiency


Member Data Documentation

int2 TRepairBot::fRepairSpeed [protected]
 

the efficiency of the repair module


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