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

TMiningBot Class Reference

TMiningBot represents a mineral mining facility for a ship. More...

#include <item.h>

Inheritance diagram for TMiningBot:

Inheritance graph
[legend]
Collaboration diagram for TMiningBot:

Collaboration graph
[legend]
List of all members.

Public Methods

 TMiningBot ()
 TMiningBot (const TMiningBot &OldMiningBot)
virtual ~TMiningBot ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setMiningRate (const int2 MiningRate)
virtual int2 getMiningRate () const
virtual bool operator== (const TMiningBot &MiningBot) const
virtual TMiningBot & operator= (const TMiningBot &MiningBot)

Protected Attributes

int2 fMiningRate

Detailed Description

TMiningBot represents a mineral mining facility 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 TMiningBot is derived from TItem and can therefore be put on a ship design. TMiningBot represents a mineral mining facility for a ship. As all other items it has mass, volume and surface area. Besides that it knows its mineral mining rate. How this value is interpreted exactly is up to the rule set and of no direct concern to the TMiningBot item class. FIXME, in future it could be decided that a mining bot has different efficiencies for different mineral types. These informations would then have to be added to this class.


Constructor & Destructor Documentation

TMiningBot::TMiningBot  
 

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

TMiningBot::TMiningBot const TMiningBot &    OldMiningBot
 

This constructor creates also a mineral mining facility, but its attributes are copied from the TMiningBot object given in OldMiningBot. This method is mostly implemented to provide a copy constructor.

Parameters:
OldMiningBot  the TMiningBot object which shall be copied

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

The method getItemType returns the type of the item, in this case TItem::MININGBOT for mineral mining device.

Returns:
TItem::MININGBOT

Reimplemented from TItem.

virtual int2 TMiningBot::getMiningRate   const [virtual]
 

With the method getMiningRate you can get the mineral mining rate of the mineral mining facility.

Returns:
the mining device's mineral mining rate

virtual bool TMiningBot::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TMiningBot.

virtual bool TMiningBot::operator== const TMiningBot &    MiningBot const [virtual]
 

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

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

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

The method Save saves a TMiningBot 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 TMiningBot::setMiningRate const int2    MiningRate [virtual]
 

The method setMiningRate sets the mineral mining rate of the mineral mining device.

Parameters:
MiningRate  the mining device's new mineral mining rate


Member Data Documentation

int2 TMiningBot::fMiningRate [protected]
 

the mineral mining facility's mineral mining rate


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