#define FG_NAVDATACACHE_HXX
#include <memory>
+
+#include <simgear/misc/strutils.hxx> // for string_list
#include <Navaids/positioned.hxx>
class SGPath;
bool isRebuildRequired();
/**
- * run the cache rebuild
+ * run the cache rebuild - returns true if rebuild is complete,
+ * otherwise keep going.
*/
- void rebuild();
+ bool rebuild();
bool isCachedFileModified(const SGPath& path) const;
void stampCacheFile(const SGPath& path);
void writeStringProperty(const std::string& key, const std::string& value);
void writeDoubleProperty(const std::string& key, const double& value);
+ string_list readStringListProperty(const std::string& key);
+ void writeStringListProperty(const std::string& key, const string_list& values);
+
FGPositioned* loadById(PositionedID guid);
PositionedID insertAirport(FGPositioned::Type ty, const std::string& ident,
AirwayEdgeVec airwayEdgesFrom(int network, PositionedID pos);
private:
NavDataCache();
-
+
+ friend class RebuildThread;
+ void doRebuild();
+
class NavDataCachePrivate;
std::auto_ptr<NavDataCachePrivate> d;
};