]> git.mxchange.org Git - flightgear.git/blob - src/Traffic/TrafficMgr.hxx
Set the format default to float instead of int.
[flightgear.git] / src / Traffic / TrafficMgr.hxx
1 /* -*- Mode: C++ -*- *****************************************************
2  * TrafficMgr.hxx
3  * Written by Durk Talsma. Started May 5, 2004
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  *
20  **************************************************************************/
21
22 /**************************************************************************
23  * This file contains the class definitions for a (Top Level) traffic
24  * manager for FlightGear. 
25  **************************************************************************/
26
27 #ifndef _TRAFFICMGR_HXX_
28 #define _TRAFFICMGR_HXX_
29
30 #include <simgear/structure/subsystem_mgr.hxx>
31 #include <simgear/xml/easyxml.hxx>
32
33 #include "SchedFlight.hxx"
34 #include "Schedule.hxx"
35
36
37 class FGTrafficManager : public SGSubsystem, public XMLVisitor
38 {
39 private:
40   ScheduleVector scheduledAircraft;
41   ScheduleVectorIterator currAircraft;
42   string value;
43
44   string mdl, livery, registration, callsign, fltrules, 
45     port, timeString, departurePort, departureTime, arrivalPort, arrivalTime,
46     repeat;
47   int cruiseAlt;
48   bool heavy;
49     
50   FGScheduledFlightVec flights;
51
52 public:
53   FGTrafficManager();
54   
55   void init();
56   void update(double time);
57
58   // Some overloaded virtual XMLVisitor members
59   virtual void startXML (); 
60   virtual void endXML   ();
61   virtual void startElement (const char * name, const XMLAttributes &atts);
62   virtual void endElement (const char * name);
63   virtual void data (const char * s, int len);
64   virtual void pi (const char * target, const char * data);
65   virtual void warning (const char * message, int line, int column);
66   virtual void error (const char * message, int line, int column);
67 };
68
69 #endif