mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #863 Interpolator inheritance based on CRTP rather than virtual methods.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace BlackSimPlugin
|
||||
void setHostAddress(const QString &hostAddress);
|
||||
|
||||
//! Get interpolator
|
||||
BlackMisc::Simulation::IInterpolator *getInterpolator() { return &m_interpolator; }
|
||||
BlackMisc::Simulation::CInterpolatorLinear *getInterpolator() { return &m_interpolator; }
|
||||
|
||||
//! Set interpolation setup
|
||||
//! \threadsafe
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "simconnectdatadefinition.h"
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace BlackMisc { namespace Simulation { class IInterpolator; } }
|
||||
namespace BlackMisc { namespace Simulation { class CInterpolatorLinear; } }
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Fsx
|
||||
@@ -44,7 +44,7 @@ namespace BlackSimPlugin
|
||||
const QString &getAircraftModelString() const { return m_aircraft.getModelString(); }
|
||||
|
||||
//! Interpolator
|
||||
BlackMisc::Simulation::IInterpolator *getInterpolator() const { return m_interpolator.data(); }
|
||||
BlackMisc::Simulation::CInterpolatorLinear *getInterpolator() const { return m_interpolator.data(); }
|
||||
|
||||
//! Get current lights (requested from simulator)
|
||||
const BlackMisc::Aviation::CAircraftLights &getCurrentLightsInSimulator() const { return m_currentLightsInSim; }
|
||||
@@ -122,7 +122,7 @@ namespace BlackSimPlugin
|
||||
BlackMisc::Aviation::CAircraftLights m_currentLightsInSim { nullptr }; //!< current lights to know state for toggling
|
||||
BlackMisc::Aviation::CAircraftLights m_lightsAsSent { nullptr }; //!< lights as sent to simulator
|
||||
SIMCONNECT_PERIOD m_requestSimDataPeriod = SIMCONNECT_PERIOD_NEVER; //!< how often do we query ground elevation
|
||||
QSharedPointer<BlackMisc::Simulation::IInterpolator> m_interpolator; //!< shared pointer because CSimConnectObject can be copied
|
||||
QSharedPointer<BlackMisc::Simulation::CInterpolatorLinear> m_interpolator; //!< shared pointer because CSimConnectObject can be copied
|
||||
};
|
||||
|
||||
//! Simulator objects (aka AI aircraft)
|
||||
|
||||
Reference in New Issue
Block a user