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

TProperty Class Reference

Base class for all kind of properties. More...

#include <property.h>

Inheritance diagram for TProperty:

Inheritance graph
[legend]
Collaboration diagram for TProperty:

Collaboration graph
[legend]
List of all members.

Public Methods

 TProperty (TRace *Creator=0, TRace *Owner=0)
TRacegetCreator () const
TRacegetOwner () const
virtual bool load (TDataPackageList *in)
virtual bool save (TDataPackageList *out) const
void setCreator (TRace *creator)
void setOwner (TRace *owner)

Private Attributes

TLink< TRacefCreator
TLink< TRacefOwner

Detailed Description

Base class for all kind of properties.

Author:
Marco Krohn <marco.krohn@gmx.de>
Version:
Id:
property.h,v 1.3 2001/12/03 01:40:15 mkrohn5 Exp

Basically the TProperty class provides two links to TRace called creator and owner. The creator link points to the race which created the object, while the owner link points to the race which owns the stellar object. The owner of a stellar object is the only one which may give orders to the object. The creator is responsible for modificators such as cheap engines. Having an owner and creator allows for example giving a fleet to another race while all properties of the fleet are determined by the creator.


Constructor & Destructor Documentation

TProperty::TProperty TRace   Creator = 0,
TRace   Owner = 0
 

Initializes Creator and Owner.


Member Function Documentation

TRace* TProperty::getCreator   const
 

Returns:
The creator of the object.
See also:
SetCreator, GetOwner

TRace* TProperty::getOwner   const
 

Returns:
The owner of the object.
See also:
SetOwner, GetCreator

virtual bool TProperty::load TDataPackageList   in [virtual]
 

Loads a TProperty object. Note that classes that are derived from this class must call TProperty::Load explicitly to load the data correctly.

Parameters:
in  The list of data packages.
Returns:
true means that everything was loaded correctly, otherwise this method will return false.

Reimplemented from TLinkable.

Reimplemented in TActionObject, TFleet, TStellarObject, TSubFleet, TSystem, and TSubFleetBasic.

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

Saves TProperty by adding the data packages to the list. Note that classes that are derived from this class must call TProperty::Save explicitly to save the data correctly.

Parameters:
out  The output stream of data packages.
Returns:
true means that everything was saved correctly, otherwise this method will return false.

Reimplemented from TLinkable.

Reimplemented in TActionObject, TFleet, TStellarObject, TSubFleet, TSystem, and TSubFleetBasic.

void TProperty::setCreator TRace   creator
 

Sets the creator of the object. (Note that the creator of a object normaly never changes during game play.)

Parameters:
The  race which creates the object.
See also:
GetCreator, SetOwner

void TProperty::setOwner TRace   owner
 

Sets the owner of the object.

Parameters:
The  race which owns the object.
See also:
GetOwner, SetCreator


Member Data Documentation

TLink<TRace> TProperty::fCreator [private]
 

The creator of the object.

TLink<TRace> TProperty::fOwner [private]
 

The owner of the object.


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