Move aircraft matching out of simulator plugins

All model matching will be done simulator independent in
CContextSimulator. The simulator specific part is kept in the model
set.
This also caused the signal modelMatchingCompleted to be renamed to
aircraftRenderingChanged, since the name wasn't accurate anymore.
Both getInstalledModels(), getInstalledModelsCount() and iconForModel()
were removed from the ISimulator interface.

refs #765
This commit is contained in:
Roland Winklmeier
2016-09-11 20:18:26 +02:00
parent 079c790aa7
commit fb3df51013
14 changed files with 98 additions and 128 deletions

View File

@@ -12,6 +12,7 @@
#ifndef BLACKCORE_CONTEXT_CONTEXTSIMULATOR_IMPL_H
#define BLACKCORE_CONTEXT_CONTEXTSIMULATOR_IMPL_H
#include "blackcore/aircraftmatcher.h"
#include "blackcore/blackcoreexport.h"
#include "blackcore/context/contextsimulator.h"
#include "blackcore/corefacadeconfig.h"
@@ -25,6 +26,8 @@
#include "blackmisc/pq/time.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/simulation/aircraftmodellist.h"
#include "blackmisc/simulation/aircraftmodelsetloader.h"
#include "blackmisc/simulation/remoteaircraftprovider.h"
#include "blackmisc/simulation/simulatorplugininfo.h"
#include "blackmisc/simulation/simulatorplugininfolist.h"
#include "blackmisc/simulation/simulatorsetup.h"
@@ -52,6 +55,7 @@ namespace BlackCore
//! Network simulator concrete implementation
class BLACKCORE_EXPORT CContextSimulator :
public IContextSimulator,
public BlackMisc::Simulation::CRemoteAircraftAware, // gain access to in memory remote aircraft data
public BlackMisc::CIdentifiable
{
Q_OBJECT
@@ -209,6 +213,9 @@ namespace BlackCore
BlackCore::CWeatherManager m_weatherManager { this };
BlackMisc::CSetting<BlackCore::Application::TEnabledSimulators> m_enabledSimulators { this, &CContextSimulator::restoreSimulatorPlugins };
bool m_initallyAddAircrafts = false;
BlackCore::CAircraftMatcher m_modelMatcher; //!< Model matcher
BlackMisc::Simulation::CAircraftModelSetLoader m_modelSetLoader { this }; //!< load model set from caches
};
} // namespace
} // namespace