]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/FlightHistory.hxx
Interim windows build fix
[flightgear.git] / src / Aircraft / FlightHistory.hxx
index f4e0e8d036e75d788057d499212e773839ddbe1b..4f23bc9330f5dee2cfa0ef82f7fa8aca6080e686 100644 (file)
 
 typedef std::vector<SGGeod> SGGeodVec;
 
+class PagedPathForHistory : public SGReferenced {
+public:
+       PagedPathForHistory() : last_seen(0) {}
+       virtual ~PagedPathForHistory() {}
+       SGGeodVec path;
+       time_t last_seen;
+};
+typedef SGSharedPtr<PagedPathForHistory> PagedPathForHistory_ptr;
+
 const unsigned int SAMPLE_BUCKET_WIDTH = 1024;
 
 /**
@@ -52,11 +61,19 @@ public:
     virtual void reinit();
     virtual void update(double dt);
     
+    PagedPathForHistory_ptr pagedPathForHistory(size_t max_entries, size_t newerThan = 0) const;
     /**
      * retrieve the path, collapsing segments shorter than
      * the specified minimum length
      */
     SGGeodVec pathForHistory(double minEdgeLengthM = 50.0) const;
+
+    /**
+     * clear the history
+     */
+
+    void clear();
+
 private:
     /**
      * @class A single data sample in the history system.
@@ -68,7 +85,7 @@ private:
         /// heading, pitch and roll can be recorded at lower precision
         /// than a double - actually 16 bits might be sufficient
         float heading, pitch, roll;
-        int simTimeMSec;
+        size_t simTimeMSec;
     };
     
     
@@ -103,10 +120,9 @@ private:
   
     void allocateNewBucket();
     
-    void clear();
     void capture();
   
     size_t currentMemoryUseBytes() const;
 };
 
-#endif
\ No newline at end of file
+#endif