]> git.mxchange.org Git - flightgear.git/blob - src/Airports/airportdynamicsmanager.hxx
Interim windows build fix
[flightgear.git] / src / Airports / airportdynamicsmanager.hxx
1 // airportdynamicsmanager.hxx - manager for dynamic (changeable)
2 // part of airport state
3 //
4 // Written by James Turner, started December 2015
5 //
6 // Copyright (C) 2015 James Turner <zakalawe@mac.com>
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21
22 #ifndef AIRPORTDYNAMICSMANAGER_H
23 #define AIRPORTDYNAMICSMANAGER_H
24
25 #include <simgear/structure/subsystem_mgr.hxx>
26 #include <simgear/structure/SGSharedPtr.hxx>
27
28 #include <map>
29
30 #include "airports_fwd.hxx"
31
32 namespace flightgear
33 {
34
35 class AirportDynamicsManager : public SGSubsystem
36 {
37 public:
38     AirportDynamicsManager();
39     virtual ~AirportDynamicsManager();
40
41     virtual void init();
42     virtual void shutdown();
43     virtual void update (double dt);
44     virtual void reinit();
45
46     static FGAirportDynamicsRef find(const std::string& icao);
47
48     static FGAirportDynamicsRef find(const FGAirportRef& apt);
49
50     FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
51
52     static const char* subsystemName() { return "airport-dynamics"; }
53 private:
54     typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
55     ICAODynamicsDict m_dynamics;
56 };
57
58 } // of namespace
59
60 #endif // AIRPORTDYNAMICSMANAGER_H