refs #619, allow to directly manipulate cache in loader

This commit is contained in:
Klaus Basan
2016-03-22 08:04:17 +01:00
parent 6fdddf8f93
commit 5dc976caca
2 changed files with 43 additions and 4 deletions

View File

@@ -91,11 +91,20 @@ namespace BlackMisc
//! Shutdown
void gracefulShutdown();
//! Create a loader
//! Create a loader and syncronize caches
static std::unique_ptr<IAircraftModelLoader> createModelLoader(const BlackMisc::Simulation::CSimulatorInfo &simInfo);
//! Merge with DB data if possible
static bool mergeWithDbData(BlackMisc::Simulation::CAircraftModelList &modelsFromSimulator, const BlackMisc::Simulation::CAircraftModelList &dbModels);
static bool mergeWithDbData(BlackMisc::Simulation::CAircraftModelList &modelsFromSimulator, const BlackMisc::Simulation::CAircraftModelList &dbModels, bool force = false);
public slots:
//! Set cache from outside, this should only be used in special cases.
//! But it allows to modify data elsewhere nd update the cache with manipulated data.
BlackMisc::CStatusMessage replaceCacheWithModelData(const CAircraftModelList &models, const CSimulatorInfo &simulator = CSimulatorInfo());
//! Set cache from outside, this should only be used in special cases.
//! But it allows to modify data elsewhere nd update the cache with manipulated data.
BlackMisc::CStatusMessage replaceOrAddModelsInCache(const CAircraftModelList &models, const CSimulatorInfo &simulator = CSimulatorInfo());
signals:
//! Parsing is finished