1 /* -*- Mode: C++ -*- *****************************************************
3 * Written by Durk Talsma. Started May 5, 2004
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.
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.
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.
20 **************************************************************************/
22 /**************************************************************************
23 * This file contains the class definitions for a (Top Level) traffic
24 * manager for FlightGear.
25 **************************************************************************/
27 #ifndef _TRAFFICMGR_HXX_
28 #define _TRAFFICMGR_HXX_
30 #include <simgear/structure/subsystem_mgr.hxx>
31 #include <simgear/xml/easyxml.hxx>
33 #include "SchedFlight.hxx"
34 #include "Schedule.hxx"
37 class FGTrafficManager : public SGSubsystem, public XMLVisitor
40 ScheduleVector scheduledAircraft;
41 ScheduleVectorIterator currAircraft;
44 string mdl, livery, registration, callsign, fltrules,
45 port, timeString, departurePort, departureTime, arrivalPort, arrivalTime,
50 FGScheduledFlightVec flights;
56 void update(double time);
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);