1 #ifndef PERFORMANCEDB_HXX
2 #define PERFORMANCEDB_HXX
12 * Registry for performance data.
14 * Allows to store performance data for later reuse/retrieval. Just
15 * a simple map for now.
17 * @author Thomas F�rster <t.foerster@biologie.hu-berlin.de>
19 //TODO provide std::map interface?
26 void registerPerformanceData(const std::string& id, PerformanceData* data);
27 void registerPerformanceData(const std::string& id, const std::string& filename);
30 * get performance data for an aircraft type / class. Type is specific, eg
31 * '738' or 'A319'. Class is more generic, such as 'jet_transport'.
33 PerformanceData* getDataFor(const std::string& acType, const std::string& acClass);
34 void load(const SGPath& path);
37 std::map<std::string, PerformanceData*> _db;
39 const std::string& findAlias(const std::string& acType) const;
41 typedef std::pair<std::string, std::string> StringPair;
42 /// alias list, to allow type/class names to share data. This is used to merge
43 /// related types together. Note it's ordered, and not a map since we permit
44 /// partial matches when merging - the first matching alias is used.
45 std::vector<StringPair> _aliases;