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

TMineLayer Class Reference

TMineLayer represents a mine laying facility for a ship. More...

#include <item.h>

Inheritance diagram for TMineLayer:

Inheritance graph
[legend]
Collaboration diagram for TMineLayer:

Collaboration graph
[legend]
List of all members.

Public Methods

 TMineLayer ()
 TMineLayer (const TMineLayer &OldMineLayer)
virtual ~TMineLayer ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setMineLayingRate (const int2 MineLayingRate)
virtual int2 getMineLayingRate () const
virtual bool operator== (const TMineLayer &MineLayer) const
virtual TMineLayer & operator= (const TMineLayer &MineLayer)

Protected Attributes

int2 fMineLayingRate

Detailed Description

TMineLayer represents a mine laying 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 TMineLayer is derived from TItem and can therefore be put on a ship design. TMineLayer represents a mine laying facility for a ship. As all other items it has mass, volume and surface area. Besides that it knows its rate of mine laying. How this value is interpreted exactly is up to the rule set/battle engine and of no direct concern to the TMineLayer item class. FIXME, in future it could be decided that the volume/space in which mines can be layed is also important and that certain mine layer items are restricted to mines of a certain type. These informations would then have to be added to this class.


Constructor & Destructor Documentation

TMineLayer::TMineLayer  
 

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

TMineLayer::TMineLayer const TMineLayer &    OldMineLayer
 

This constructor creates also a new mine laying facility, but its attributes are copied from the TMineLayer object given in OldMineLayer. This method is mostly implemented to provide a copy constructor.

Parameters:
OldMineLayer  the TMineLayer object which shall be copied

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

The method getItemType returns the type of the item, in this case TItem::MINELAYER for mine laying device.

Returns:
TItem::MINELAYER

Reimplemented from TItem.

virtual int2 TMineLayer::getMineLayingRate   const [virtual]
 

With the method getMineLayingRate you can get the mine laying rate of the mine laying facility.

Returns:
the device's mine laying rate

virtual bool TMineLayer::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TMineLayer.

virtual bool TMineLayer::operator== const TMineLayer &    MineLayer const [virtual]
 

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

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

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

The method Save saves a TMineLayer 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 TMineLayer::setMineLayingRate const int2    MineLayingRate [virtual]
 

The method setMineLayingRate sets the rate of mine laying of the mine laying device.

Parameters:
MineLayingRate  the device's new mine laying rate


Member Data Documentation

int2 TMineLayer::fMineLayingRate [protected]
 

the mine laying facility's mine laying rate


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