00001 // $Id: waypoint_8h-source.html,v 1.2 2002/06/20 17:09:51 mkrohn5 Exp $ 00002 00003 // Waypoint Header File 00004 // Written by: Marco Krohn <marco.krohn@gmx.de> 00005 00006 // Copyright (C) 2001 - , Marco Krohn, <marco.krohn@gmx.de> 00007 // 00008 // This program is free software; you can redistribute it and/or modify 00009 // it under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation; either version 2, or (at your option) 00011 // any later version. 00012 // 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public License for more details. 00017 00018 #ifndef __WAYPOINT_INCLUDED 00019 #define __WAYPOINT_INCLUDED 00020 00021 #include "common/link.h" 00022 #include "common/plist.h" 00023 #include "common/point.h" 00024 00025 class TDataPackageList; 00026 class TPoint; 00027 class TStellarObject; 00028 00029 00030 00031 00032 00033 //---------------------------------------- class TWaypoint ---------------------------------------- 00034 00050 class TWaypoint 00051 { 00052 public: 00056 TWaypoint(); 00060 TWaypoint( const TWaypoint& wp ); 00064 TWaypoint( TStellarObject* stellarObject, double speed=0 ); 00070 TWaypoint( const TPoint& pos, double speed=0 ); 00071 00077 const TPoint& getPos() const; 00082 TStellarObject* getStellarObject() const; 00086 double getWantedSpeed() const; 00091 bool isStellarObject() const; 00102 bool load( TDataPackageList* in, const string& identifier, 00103 bool unique=true ); 00109 TWaypoint& operator=( const TWaypoint& wp ); 00115 bool operator==( const TWaypoint& src ) const; 00119 void reset(); 00130 bool save( TDataPackageList* out, const string& identifier, 00131 bool unique=true ) const; 00136 void setPos( const TPoint& pos ); 00141 void setStellarObject( TStellarObject* stellarObject ); 00146 void setWantedSpeed( double speed ); 00147 00148 private: 00153 TLink<TStellarObject> fLinkStObj; 00158 TPoint fPos; 00162 double fWantedSpeed; 00163 }; 00164 00165 00166 00167 00168 00169 //---------------------------------------- class TWaypointList ---------------------------------------- 00170 00180 class TWaypointList : public TPEList<TWaypoint> 00181 { 00182 }; 00183 00184 00185 00186 00187 00188 #endif // __WAYPOINT_INCLUDED