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);
/// returning results. Only used by TACAN carrier search
PositionedIDVec findNavaidsByFreq(int freqKhz, FGPositioned::Filter* filt);
+ /**
+ * Given a runway and type, find the corresponding navaid (ILS / GS / OM)
+ */
+ PositionedID findNavaidForRunway(PositionedID runway, FGPositioned::Type ty);
+
/**
* given a navaid name (or similar) from apt.dat / nav.dat, find the
* corresponding airport and runway IDs.
AirwayEdgeVec airwayEdgesFrom(int network, PositionedID pos);
private:
NavDataCache();
-
+
+ friend class RebuildThread;
+ void doRebuild();
+
class NavDataCachePrivate;
std::auto_ptr<NavDataCachePrivate> d;
};