Debian Codegraph @

src/Navaids/navdb.hxx

raw symbols SCIP
1 /*
2 * SPDX-FileCopyrightText: Copyright (C) 2004 Curtis L. Olson - http://www.flightgear.org/~curt
3 * SPDX_FileComment: top level navaids management routines
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #pragma once
8
9 #include <simgear/compiler.h>
10 #include <simgear/math/SGGeod.hxx>
11 #include <Navaids/NavDataCache.hxx>
12 #include <Navaids/positioned.hxx>
13
14 #include <map>
15 #include <string>
16 #include <tuple>
17
18 // forward decls
19 class FGTACANList;
20 class SGPath;
21
22 namespace flightgear
23 {
24
25 class NavLoader {
26 public:
27 // load and initialize the navigational databases
28 void loadNav(const NavDataCache::SceneryLocation& sceneryLocation,
29 std::size_t bytesReadSoFar,
30 std::size_t totalSizeOfAllDatFiles);
31
32 void loadCarrierNav(const SGPath& path);
33
34 bool loadTacan(const SGPath& path, FGTACANList *channellist);
35
36 private:
37 // Maps (type, ident, name) tuples already loaded to their locations.
38 std::multimap<std::tuple<FGPositioned::Type, std::string, std::string>,
39 SGGeod> _loadedNavs;
40
41 PositionedID processNavLine(const std::string& line,
42 const std::string& utf8Path,
43 unsigned int lineNum,
44 FGPositioned::Type type = FGPositioned::INVALID,
45 unsigned int version = 810);
46 };
47
48 } // of namespace flightgear
49