]> git.mxchange.org Git - flightgear.git/blob - src/Airports/genrunways.cxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Airports / genrunways.cxx
1 // dump out a gdbm version of the simple airport file
2
3 #include <simgear/compiler.h>
4
5 #include STL_IOSTREAM
6
7 #include <simgear/debug/logstream.hxx>
8
9 #include "runways.hxx"
10
11 SG_USING_STD(cout);
12 SG_USING_STD(endl);
13
14 int main( int argc, char **argv ) {
15     FGRunwaysUtil runways;
16     FGRunway r;
17
18     sglog().setLogLevels( SG_ALL, SG_INFO );
19
20     if ( argc == 3 ) {
21         runways.load( argv[1] );
22         runways.dump_mk4( argv[2] );    
23     } else {
24         cout << "usage: " << argv[0] << " <in> <out>" << endl;
25         exit(-1);
26     }
27
28     cout << endl;
29
30     FGRunways runway_db( argv[2] );
31
32 #if 0
33     while ( runway_db.next( &r ) ) {
34         cout << r.id << " " << r.rwy_no << endl;
35     }
36 #endif
37
38     runway_db.search( "KMSP", &r );
39         
40     while ( r.id == "KMSP" ) {
41         cout << r.id << " " << r.rwy_no << endl;
42         runway_db.next( &r );
43     }
44
45
46 }