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

TTargetingComputer Class Reference

TTargetingComputer represents a targeting computer for a ship. More...

#include <item.h>

Inheritance diagram for TTargetingComputer:

Inheritance graph
[legend]
Collaboration diagram for TTargetingComputer:

Collaboration graph
[legend]
List of all members.

Public Methods

 TTargetingComputer ()
 TTargetingComputer (const TTargetingComputer &OldTargetingComputer)
virtual ~TTargetingComputer ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual void setAimingEfficiency (const int2 AimingEfficiency)
virtual int2 getAimingEfficiency () const
virtual bool operator== (const TTargetingComputer &TargetingComputer) const
virtual TTargetingComputer & operator= (const TTargetingComputer &TargetingComputer)

Protected Attributes

int2 fAimingEfficiency

Detailed Description

TTargetingComputer represents a targeting computer 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 TTargetingComputer is derived from TItem and can therefore be put on a ship design. TTargetingComputer represents a targeting computer for a ship. As all other items it has mass, volume and surface area. A targeting computer improves the aiming capabilities of the ships kinetic and energy weapons. Which effects this has exactly is decided by the rule set and of no direct concern to the TTargetingComputer item class.


Constructor & Destructor Documentation

TTargetingComputer::TTargetingComputer  
 

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

TTargetingComputer::TTargetingComputer const TTargetingComputer &    OldTargetingComputer
 

This constructor creates also a new targeting computer, but its attributes are copied from the targeting computer given in OldTargetingComputer. This method is mostly implemented to provide a copy constructor.

Parameters:
OldTargetingComputer  the TTargetingComputer object which shall be copied

virtual TTargetingComputer::~TTargetingComputer   [virtual]
 

Destructs the object. Has nothing else to do, because no memory has to be freed or similar stuff.


Member Function Documentation

virtual int2 TTargetingComputer::getAimingEfficiency   const [virtual]
 

With the method getAimingEfficiency you can get the aiming efficiency of the targeting computer.

Returns:
the targeting computer's aiming efficiency

virtual TItem::tItemType TTargetingComputer::getItemType   const [virtual]
 

The method getItemType returns the type of the item, in this case TItem::TARGETINGCOMPUTER for targeting computer.

Returns:
TItem::TARGETINGCOMPUTER

Reimplemented from TItem.

virtual bool TTargetingComputer::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TTargetingComputer.

virtual bool TTargetingComputer::operator== const TTargetingComputer &    TargetingComputer const [virtual]
 

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

Parameters:
TargetingComputer  the TTargetingComputer object which shall be compared with "*this"
Returns:
true if the TTargetingComputer objects are euqal and false if not

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

The method Save saves a TTargetingComputer 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 TTargetingComputer::setAimingEfficiency const int2    AimingEfficiency [virtual]
 

The method setAimingEfficiency sets the aiming efficiency of the targeting computer.

Parameters:
AimingEfficiency  the targeting computer's efficiency


Member Data Documentation

int2 TTargetingComputer::fAimingEfficiency [protected]
 

the aiming efficiency of the targeting computer


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