Ref T308, performance optimized fromDatabaseJsonCaching

* maps for id/object
* caching fromDatabaseJsonCaching
* fixed CAircraftModel::fromDatabaseJson wrong prefix
This commit is contained in:
Klaus Basan
2018-08-29 02:55:28 +02:00
parent c43fba9abd
commit 260585e35c
14 changed files with 214 additions and 14 deletions

View File

@@ -80,6 +80,11 @@ namespace BlackMisc
//! Find by multiple criteria
CLivery smartLiverySelector(const CLivery &liveryPattern) const;
//! Caching version from DB data
//! \param relatedAirlines passing the airline can skip the parsing from livery
//! \remark without passing related airlines there is not much sense using this function, as most airlines/liveries have a 1:1 ratio
static CLiveryList fromDatabaseJsonCaching(const QJsonArray &array, const CAirlineIcaoCodeList &relatedAirlines = {});
};
} //namespace
} // namespace