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

TSPWeaponLauncher Class Reference

TSPWeaponLauncher represents a SP weapon launcher for a ship. More...

#include <item.h>

Inheritance diagram for TSPWeaponLauncher:

Inheritance graph
[legend]
Collaboration diagram for TSPWeaponLauncher:

Collaboration graph
[legend]
List of all members.

Public Methods

 TSPWeaponLauncher ()
 TSPWeaponLauncher (const TSPWeaponLauncher &OldSPWeaponLauncher)
virtual ~TSPWeaponLauncher ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setLaunchRate (const int2 LaunchRate)
virtual int2 getLaunchRate () const
virtual bool operator== (const TSPWeaponLauncher &SPWeaponLauncher) const
virtual TSPWeaponLauncher & operator= (const TSPWeaponLauncher &SPWeaponLauncher)

Protected Attributes

int2 fLaunchRate

Detailed Description

TSPWeaponLauncher represents a SP weapon launcher 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 TSPWeaponLauncher is derived from TItem and can therefore be put on a ship design. TSPWeaponLauncher represents a SP weapon launcher for a ship. As all other items it has mass, volume and a surface area. Besides that it has also a rate of launching for SP weapons. How this value is interpreted exactly is up to the rule set/battle engine and of no direct concern to the TSPWeaponLauncher item class. FIXME, in future it could be decided that SP weapon launcher can only launch SP weapons of a certain type. This information would then have to be added to this class.


Constructor & Destructor Documentation

TSPWeaponLauncher::TSPWeaponLauncher  
 

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

TSPWeaponLauncher::TSPWeaponLauncher const TSPWeaponLauncher &    OldSPWeaponLauncher
 

This constructor creates also a SP weapon launcher, but its attributes are copied from the TSPWeaponLauncher object given in OldSPWeaponLauncher. This method is mostly implemented to provide a copy constructor.

Parameters:
OldSPWeaponLauncher  the TSPWeaponLauncher object to be copied

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

The method getItemType returns the type of the item, in this case TItem::SPWEAPONLAUNCHER for SP weapon launcher.

Returns:
TItem::SPWEAPONLAUNCHER

Reimplemented from TItem.

virtual int2 TSPWeaponLauncher::getLaunchRate   const [virtual]
 

With the method getLaunchRate you can get the launching rate if the SP weapon launcher.

Returns:
the SP weapon launcher's launching rate

virtual bool TSPWeaponLauncher::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TSPWeaponLauncher.

virtual bool TSPWeaponLauncher::operator== const TSPWeaponLauncher &    SPWeaponLauncher const [virtual]
 

With the method operator== you can compare two TSPWeaponLauncher objects. This is of course the expected behaviour of "operator==".

Parameters:
SPWeaponLauncher  the TSPWeaponLauncher object which shall be compared with "*this"
Returns:
true if the TSPWeaponLauncher objects are equal and false if not

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

The method Save saves a TSPWeaponLauncher 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 TSPWeaponLauncher::setLaunchRate const int2    LaunchRate [virtual]
 

The method setLaunchRate sets the launching rate of the SP weapon launcher.

Parameters:
LaunchRate  the SP weapon launcher's new launching rate


Member Data Documentation

int2 TSPWeaponLauncher::fLaunchRate [protected]
 

the SP weapon launcher's SP weapon launching rate


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