#include <fleet.h>
Inheritance diagram for TFleet:
Public Methods | |
TFleet (const TPoint &Pos=0) | |
virtual | ~TFleet () |
virtual void | Add (TSubFleet *pSubFleet) |
virtual bool | canPerformAction (const TAction &action) |
virtual bool | canBeObjectInAction (const TAction &action) |
TOSVal | getNumberOfShips () const |
double | getSpeed () const |
virtual int2 | getType () const |
virtual const string & | getTypeName () const |
virtual bool | load (TDataPackageList *in) |
virtual bool | Remove (TSubFleet *pSubFleet) |
virtual bool | save (TDataPackageList *out) const |
void | setSpeed (double speed) |
virtual bool | TransferSubFleet (TSubFleet *pSubFleet, TFleet *pNewFleet) |
Protected Attributes | |
double | fSpeed |
TPList< TSubFleet > | fSubFleets |
|
Initializes the fleet with a position in space and sets the current speed to 0.
|
|
Deletes all subfleets. |
|
Adds a subfleet to the fleet. Note: TFleet is now responsible for the subfleet in the sense that it will delete the TSubFleet object when the desturtor is called. Also note that no check is performed to prevent that a sub fleet is added twice. |
|
Overload of TActionObject method to filter action types. Reimplemented from TStellarObject. |
|
Overload of TActionObject method to filter action types. Reimplemented from TStellarObject. |
|
|
|
|
|
Reimplemented from TStellarObject. |
|
Reimplemented from TStellarObject. |
|
The method Load loads a TFleet object from the data packages in the list.
Reimplemented from TStellarObject. |
|
This method removes a subfleet from the fleet. It will also delete the subfleet.
|
|
The method Save saves a TFleet by adding the data packages to the list.
Reimplemented from TStellarObject. |
|
Sets the current speed of the fleet. The value is only stored during fleet movement. Actually the fleet tries to move with the speed given by the waypoint list, but under some circumstances (e.g. mine fields) the current speed can be different of the wanted speed.
|
|
This method moves the subfleet given as parameter from this fleet to the fleet given as second parameter. The method will return
|
|
Current speed of the fleet |
|
List of all subfleets. |