// $Id$
-#ifndef _AIRPORTS_HXX
-#define _AIRPORTS_HXX
+#ifndef _SIMPLE_HXX
+#define _SIMPLE_HXX
#ifndef __cplusplus
#endif
-#include <gdbm.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <simgear/compiler.h>
-#ifdef FG_HAVE_STD_INCLUDES
-# include <istream>
-#elif defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-# include <iostream.h>
-#elif defined( __BORLANDC__ )
-# include <iostream>
-#else
-# include <istream.h>
-#endif
-
#include STL_STRING
#include <set>
-FG_USING_STD(string);
-FG_USING_STD(set);
-
-#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-FG_USING_STD(istream);
-#endif
+// Forward declarations.
+class c4_Storage;
+class c4_View;
+SG_USING_STD(string);
+SG_USING_STD(set);
class FGAirport {
};
-inline istream&
-operator >> ( istream& in, FGAirport& a )
-{
- return in >> a.id >> a.longitude >> a.latitude >> a.elevation;
-}
-
class FGAirports {
private:
- GDBM_FILE dbf;
+ c4_Storage *storage;
+ c4_View *vAirport;
public:
// search for the specified id.
// Returns true if successful, otherwise returns false.
// On success, airport data is returned thru "airport" pointer.
- // "airport" is not changed if "id" is not found.
+ // "airport" is not changed if "apt" is not found.
bool search( const string& id, FGAirport* airport ) const;
FGAirport search( const string& id ) const;
};
class FGAirportsUtil {
public:
-#ifdef FG_NO_DEFAULT_TEMPLATE_ARGS
+#ifdef SG_NO_DEFAULT_TEMPLATE_ARGS
typedef set< FGAirport, less< FGAirport > > container;
#else
typedef set< FGAirport > container;
// load the data
int load( const string& file );
- // save the data in gdbm format
- bool dump_gdbm( const string& file );
+ // save the data in metakit format
+ bool dump_mk4( const string& file );
// search for the specified id.
// Returns true if successful, otherwise returns false.
};
-#endif /* _AIRPORTS_HXX */
+#endif // _SIMPLE_HXX