]> git.mxchange.org Git - flightgear.git/blob - Main/airports.hxx
Renamed runfg.bat.in runfgfs.bat.in
[flightgear.git] / Main / airports.hxx
1 //
2 // airports.hxx -- a really simplistic class to manage airport ID,
3 //                 lat, lon of the center of one of it's runways, and 
4 //                 elevation in feet.
5 //
6 // Written by Curtis Olson, started April 1998.
7 //
8 // Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
9 //
10 // This program is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU General Public License as
12 // published by the Free Software Foundation; either version 2 of the
13 // License, or (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 // General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 //
24 // $Id$
25 // (Log is kept at end of this file)
26
27
28 #ifndef _AIRPORTS_HXX
29 #define _AIRPORTS_HXX
30
31
32 #ifndef __cplusplus                                                          
33 # error This library requires C++
34 #endif                                   
35
36
37 #include <string>        // Standard C++ string library
38 #include <map>           // STL associative "array"
39
40 #ifdef NEEDNAMESPACESTD
41 using namespace std;
42 #endif
43
44
45 typedef struct {
46     // char id[5];
47     double longitude;
48     double latitude;
49     double elevation;
50 } fgAIRPORT;
51
52
53 class fgAIRPORTS {
54     map < string, fgAIRPORT, less<string> > airports;
55
56 public:
57
58     // Constructor
59     fgAIRPORTS( void );
60
61     // load the data
62     int load( char *file );
63
64     // search for the specified id
65     fgAIRPORT search( char *id );
66
67     // Destructor
68     ~fgAIRPORTS( void );
69
70 };
71
72
73 #endif /* _AIRPORTS_HXX */
74
75
76 // $Log$
77 // Revision 1.7  1998/07/24 21:39:09  curt
78 // Debugging output tweaks.
79 // Cast glGetString to (char *) to avoid compiler errors.
80 // Optimizations to fgGluLookAt() by Norman Vine.
81 //
82 // Revision 1.6  1998/07/06 21:34:19  curt
83 // Added an enable/disable splash screen option.
84 // Added an enable/disable intro music option.
85 // Added an enable/disable instrument panel option.
86 // Added an enable/disable mouse pointer option.
87 // Added using namespace std for compilers that support this.
88 //
89 // Revision 1.5  1998/06/17 21:35:11  curt
90 // Refined conditional audio support compilation.
91 // Moved texture parameter setup calls to ../Scenery/materials.cxx
92 // #include <string.h> before various STL includes.
93 // Make HUD default state be enabled.
94 //
95 // Revision 1.4  1998/06/03 00:47:14  curt
96 // Updated to compile in audio support if OSS available.
97 // Updated for new version of Steve's audio library.
98 // STL includes don't use .h
99 // Small view optimizations.
100 //
101 // Revision 1.3  1998/06/01 17:54:42  curt
102 // Added Linux audio support.
103 // avoid glClear( COLOR_BUFFER_BIT ) when not using it to set the sky color.
104 // map stl tweaks.
105 //
106 // Revision 1.2  1998/05/29 20:37:22  curt
107 // Tweaked material properties & lighting a bit in GLUTmain.cxx.
108 // Read airport list into a "map" STL for dynamic list sizing and fast tree
109 // based lookups.
110 //
111 // Revision 1.1  1998/04/25 15:11:11  curt
112 // Added an command line option to set starting position based on airport ID.
113 //
114 //