]> git.mxchange.org Git - flightgear.git/blob - Airports/simple.hxx
Moved from ../Main/
[flightgear.git] / Airports / simple.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.1  1998/08/25 17:19:14  curt
78 // Moved from ../Main/
79 //
80 // Revision 1.7  1998/07/24 21:39:09  curt
81 // Debugging output tweaks.
82 // Cast glGetString to (char *) to avoid compiler errors.
83 // Optimizations to fgGluLookAt() by Norman Vine.
84 //
85 // Revision 1.6  1998/07/06 21:34:19  curt
86 // Added an enable/disable splash screen option.
87 // Added an enable/disable intro music option.
88 // Added an enable/disable instrument panel option.
89 // Added an enable/disable mouse pointer option.
90 // Added using namespace std for compilers that support this.
91 //
92 // Revision 1.5  1998/06/17 21:35:11  curt
93 // Refined conditional audio support compilation.
94 // Moved texture parameter setup calls to ../Scenery/materials.cxx
95 // #include <string.h> before various STL includes.
96 // Make HUD default state be enabled.
97 //
98 // Revision 1.4  1998/06/03 00:47:14  curt
99 // Updated to compile in audio support if OSS available.
100 // Updated for new version of Steve's audio library.
101 // STL includes don't use .h
102 // Small view optimizations.
103 //
104 // Revision 1.3  1998/06/01 17:54:42  curt
105 // Added Linux audio support.
106 // avoid glClear( COLOR_BUFFER_BIT ) when not using it to set the sky color.
107 // map stl tweaks.
108 //
109 // Revision 1.2  1998/05/29 20:37:22  curt
110 // Tweaked material properties & lighting a bit in GLUTmain.cxx.
111 // Read airport list into a "map" STL for dynamic list sizing and fast tree
112 // based lookups.
113 //
114 // Revision 1.1  1998/04/25 15:11:11  curt
115 // Added an command line option to set starting position based on airport ID.
116 //
117 //