refs #649, add.function getSyncronizedValues

Normally getValue should transparently sync. But this force me to make the function non-const.
This commit is contained in:
Klaus Basan
2016-05-30 15:24:11 +02:00
parent 4b8ab847a0
commit 81d88837f9
5 changed files with 32 additions and 6 deletions

View File

@@ -26,6 +26,13 @@ namespace BlackMisc
this->setCachedModels(models, simulator);
}
CAircraftModelList IMultiSimulatorModelCaches::getSyncronizedCachedModels(const CSimulatorInfo &simulator)
{
BLACK_VERIFY_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "need single simulator");
this->syncronizeCache(simulator);
return this->getCachedModels(simulator);
}
CAircraftModelList IMultiSimulatorModelCaches::getCurrentCachedModels() const
{
const CSimulatorInfo sim(this->getCurrentSimulator());
@@ -34,6 +41,13 @@ namespace BlackMisc
return this->getCachedModels(sim);
}
QDateTime IMultiSimulatorModelCaches::getSyncronizedTimestamp(const CSimulatorInfo &simulator)
{
BLACK_VERIFY_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "need single simulator");
this->syncronizeCache(simulator);
return this->getCacheTimestamp(simulator);
}
bool IMultiSimulatorModelCaches::syncronizeCurrentCache()
{
const CSimulatorInfo sim(this->getCurrentSimulator());