]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/parking.hxx
commradio: improvements for atis speech
[flightgear.git] / src / Airports / parking.hxx
index 278d9072c8ad1d746568113cfebe7538dfb119ba..92b79008430d79282963aa8d619fb45a49c60475 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 #ifndef _PARKING_HXX_
 #define _PARKING_HXX_
 
-#ifndef __cplusplus                                                          
+#ifndef __cplusplus
 # error This library requires C++
-#endif     
-
-#include STL_STRING
-#include <vector>
-
+#endif
 
+#include <simgear/compiler.h>
+#include <simgear/sg_inlines.h>
 
+#include <string>
+#include <memory> // for std::auto_ptr
 
-SG_USING_STD(string);
-SG_USING_STD(vector);
+#include "gnnode.hxx"
 
-double processPosition(const string& pos);
 
-class FGParking {
+class FGParking : public FGTaxiNode
+{
 private:
-  double latitude;
-  double longitude;
-  double heading;
-  double radius;
-  int index;
-  string parkingName;
-  string type;
-  string airlineCodes;
-  bool available;
-
-  
+  const double heading;
+  const double radius;
+  const std::string parkingName;
+  const std::string type;
+  const std::string airlineCodes;
+  const PositionedID pushBackPoint;
 
+  SG_DISABLE_COPY(FGParking);
 public:
-  FGParking() { available = true;};
-  //FGParking(FGParking &other);
-  FGParking(double lat,
-           double lon,
-           double hdg,
-           double rad,
-           int idx,
-           const string& name,
-           const string& tpe,
-           const string& codes);
-  void setLatitude (const string& lat)  { latitude    = processPosition(lat);  };
-  void setLongitude(const string& lon)  { longitude   = processPosition(lon);  };
+  FGParking(PositionedID aGuid, const SGGeod& pos,
+            double heading, double radius,
+            const std::string& name, const std::string& type,
+            const std::string& codes,
+            PositionedID pushBackNode);
+  virtual ~FGParking();
+#if 0
   void setHeading  (double hdg)  { heading     = hdg;  };
   void setRadius   (double rad)  { radius      = rad;  };
-  void setIndex    (int    idx)  { index       = idx;  };
-  void setName     (const string& name) { parkingName = name; };
-  void setType     (const string& tpe)  { type        = tpe;  };
-  void setCodes    (const string& codes){ airlineCodes= codes;};
 
-  bool isAvailable ()         { return available;};
-  void setAvailable(bool val) { available = val; };
+  void setName     (const std::string& name) { parkingName = name; };
+  void setType     (const std::string& tpe)  { type        = tpe;  };
+  void setCodes    (const std::string& codes){ airlineCodes= codes;};
+#endif
   
-  double getLatitude () { return latitude;    };
-  double getLongitude() { return longitude;   };
-  double getHeading  () { return heading;     };
-  double getRadius   () { return radius;      };
-  int    getIndex    () { return index;       };
-  string getType     () { return type;        };
-  string getCodes    () { return airlineCodes;};
-  string getName     () { return parkingName; };
+  double getHeading  () const { return heading;     };
+  double getRadius   () const { return radius;      };
 
-  bool operator< (const FGParking &other) const {return radius < other.radius; };
-};
+  std::string getType     () const { return type;        };
+  std::string getCodes    () const { return airlineCodes;};
+  std::string getName     () const { return parkingName; };
+
+  // TODO do parkings have different name and ident?
+  virtual const std::string& name() const { return parkingName; }
 
-typedef vector<FGParking> FGParkingVec;
-typedef vector<FGParking>::iterator FGParkingVecIterator;
-typedef vector<FGParking>::const_iterator FGParkingVecConstIterator;
+  int getPushBackPoint () { return pushBackPoint; };
+
+  bool operator< (const FGParking &other) const {
+    return radius < other.radius; };
+};
 
 #endif