]> git.mxchange.org Git - flightgear.git/blob - src/AIModel/performancedb.hxx
Merge commit 'refs/merge-requests/1552' of git@gitorious.org:fg/flightgear into next
[flightgear.git] / src / AIModel / performancedb.hxx
1 #ifndef PERFORMANCEDB_HXX
2 #define PERFORMANCEDB_HXX
3
4 #include <string>
5 #include <vector>
6 #include <map>
7
8 #include "performancedata.hxx"
9
10 /**
11  * Registry for performance data.
12  *
13  * Allows to store performance data for later reuse/retrieval. Just
14  * a simple map for now.
15  * 
16  * @author Thomas F�rster <t.foerster@biologie.hu-berlin.de>
17 */
18 //TODO provide std::map interface?
19 class PerformanceDB
20 {
21 public:
22     PerformanceDB();
23     ~PerformanceDB();
24
25     void registerPerformanceData(const std::string& id, PerformanceData* data);
26     void registerPerformanceData(const std::string& id, const std::string& filename);
27
28     PerformanceData* getDataFor(const std::string& id);
29     void load(SGPath path);
30
31 private:
32     std::map<std::string, PerformanceData*> _db;
33 };
34
35 #endif