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

TColonizer Class Reference

TColonizer represents the colonization module, which can be put on a ship design. More...

#include <item.h>

Inheritance diagram for TColonizer:

Inheritance graph
[legend]
Collaboration diagram for TColonizer:

Collaboration graph
[legend]
List of all members.

Public Methods

 TColonizer ()
 TColonizer (const TColonizer &OldColonizer)
virtual ~TColonizer ()
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
virtual TItem::tItemType getItemType () const
virtual bool operator== (const TColonizer &Colonizer) const
virtual TColonizer & operator= (const TColonizer &Colonizer)

Detailed Description

TColonizer represents the colonization module, which can be put on a ship design.

Author:
Ralf Laue
Version:
Id:
item.h,v 1.34 2002/04/02 22:33:08 prolator Exp
See also:
TShipDesign
The class TColonizer is derived from TItem and can therefore be put on a ship design. TColonizer represents a colonization maodule, which can be put on a ship. As all other items it has mass, volume and surface area. A colonization module has no extra fields. It just enables the ship to colonize a planet. How and whether more colonization modules do a better job than one alone, depends on the rule set and is of no concern for the TColonizer item class.


Constructor & Destructor Documentation

TColonizer::TColonizer  
 

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

TColonizer::TColonizer const TColonizer &    OldColonizer
 

This constructor creates also a new TColonizer object, but the attributes are copied from the TColonizer object given in OldColonizer. Mostly implemented to provide a copy constructor.

Parameters:
OldColonizer  the TColonizer object which shall be copied

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

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

Returns:
TItem::COLONIZER

Reimplemented from TItem.

virtual bool TColonizer::load TDataPackageList   in [virtual]
 

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

This is the assignment operator for TColonizer.

virtual bool TColonizer::operator== const TColonizer &    Colonizer const [virtual]
 

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

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

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

The method Save saves a TColonizer 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.


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