Debian Codegraph @

src/Airports/airportdynamicsmanager.hxx

raw symbols SCIP
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 <[email protected]>
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 // Subsystem API.
42 void init() override;
43 void reinit() override;
44 void shutdown() override;
45 void update(double dt) override;
46
47 // Subsystem identification.
48 static const char* staticSubsystemClassId() { return "airport-dynamics"; }
49
50 static FGAirportDynamicsRef find(const std::string& icao);
51
52 static FGAirportDynamicsRef find(const FGAirportRef& apt);
53
54 FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
55
56 private:
57 typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
58 ICAODynamicsDict m_dynamics;
59 };
60
61 } // of namespace
62
63 #endif // AIRPORTDYNAMICSMANAGER_H