#include <stobj.h>
Inheritance diagram for TStellarObject:
Public Methods | |
TStellarObject () | |
TStellarObject (const TPoint &Point) | |
virtual | ~TStellarObject () |
void | addWaypoint (const TWaypoint &waypoint) |
void | Attach (TStellarObject *pDest) |
virtual bool | canPerformAction (const TAction &action) |
virtual bool | canBeObjectInAction (const TAction &action) |
void | Detach () |
TGalaxy * | getGalaxy () const |
const string & | getName () const |
const TPoint & | getPos () const |
virtual int2 | getType () const |
virtual const string & | getTypeName () const |
const TWaypointList * | getWaypointList () const |
bool | hasWaypoint () const |
bool | insertWaypoint (const TWaypoint &waypoint, int2 insertPosition) |
virtual bool | load (TDataPackageList *in) |
bool | operator== (const TStellarObject &Src) const |
bool | operator< (const TStellarObject &Src) const |
bool | removeWaypoint (int2 waypointNumber) |
bool | replaceWaypoint (const TWaypoint &Waypoint, int2 waypointNumber) |
virtual bool | save (TDataPackageList *out) const |
void | setName (const string &sName) |
void | setPos (const TPoint &Pos) |
ostream & | Write (ostream &Stream) const |
Private Methods | |
void | setParent (TGalaxy *pGalaxy) |
Private Attributes | |
TLink< TGalaxy > | Galaxy |
TWaypoint | WP |
TWaypointList | fWaypointList |
double | dSpeed |
string | sName |
Friends | |
class | TGalaxy |
|
At the moment this method sends only a message to the log file. |
|
Adds a waypoint to the waypoint list fWaypointList.
|
|
Attaches the stellar object
|
|
Overload of TActionObject method to filter action types. Reimplemented from TActionObject. Reimplemented in TFleet. |
|
Overload of TActionObject method to filter action types. Reimplemented from TActionObject. Reimplemented in TFleet. |
|
Detaches the stellar object from another object.
|
|
|
|
|
|
|
|
Reimplemented from TLinkable. |
|
Reimplemented from TLinkable. |
|
FIXME, do we need a method like TWaypoint& getWaypoint( int2 waypointNumber ) const?
|
|
|
|
With the method insertWaypoint you can insert a waypoint in the waypoint list. The posistion in the waypoint list is identified with the number of the waypoint in the list, behind which the new waypoint shall be inserted. Example: A waypoint to be inserted at posistion 0 is always inserted at the head of the list, A waypoint to be inserted at position 1, is inserted after the head of the list, if there is already a head. Else the waypoint isn't inserted. If a list contains 3 waypoints, and you want to add a waypoint at position 3, the waypoint is inserted as tail and the list contains then 4 waypoints.
|
|
Loads a TStellarObject. Note that classes that are derived from this class must call TStellarObject::Load explicitly to load the data correctly. After loading the stellar object it will automatically inform TGalaxy (so that TGalaxy adds this object to its list).
Reimplemented from TActionObject. |
|
To compare values for sorting.
|
|
Compare stellar objects.
|
|
With removeWaypoint you can remove a waypoint from the waypoint list of the stellar object. The waypoint is identified with its number in the list. The first waypoint has the number 0. If the there is no waypoint with this number, the method returns
|
|
With replaceWaypoint you can replace a waypoint in the waypoint list of the stellar object with another waypoint. The waypoint to be replaced is identified with its number in the list. The first waypoint has the number 0. If the there is no waypoint with this number, the method returns
|
|
Saves a TStellarObject by adding the data packages to the list. Note that classes that are derived from this class must call TStellarObject::Save explicitly to save the data correctly.
Reimplemented from TActionObject. |
|
Sets the name of the stellar object.
|
|
Sets the Galaxy variable and transforms the point so that it is guranteed that the point is within the boundaries of the new galaxy. Note that this method will not (apart from the above) trigger any further actions in TGalaxy for example this will not inform the old galaxy that the parent changed. This method is called by TGalaxy::Add.
|
|
Sets the position of the stellar object in space. Note: the method calls TGalaxy::Transform to ensure that the position is within the galaxy.
|
|
Writes the class TStellarObject to a stream using the following format: "ID, Name, Pos".
|
|
The speed of the stellar object. |
|
The list of waypoints. The auto delete mode is set to |
|
All stellar objects must belong to a galaxy. This link points to the current galaxy. Only jumps between galaxies may change this link. |
|
The name of the stellar object |
|
The current "waypoint" of the fleet (this may be another stellar object). |