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