Fix weak vtables

This commit is contained in:
Roland Winklmeier
2018-08-24 15:25:47 +02:00
parent 4cf3bc580f
commit 5e38936fd2
30 changed files with 133 additions and 8 deletions

View File

@@ -197,6 +197,10 @@ namespace BlackMisc
return m_setups;
}
// pin vtables to this file
void CInterpolationSetupAware::anchor()
{ }
CInterpolationAndRenderingSetupPerCallsign CInterpolationSetupAware::getInterpolationSetupPerCallsignOrDefault(const CCallsign &callsign) const
{
if (!this->hasProvider()) { return CInterpolationAndRenderingSetupPerCallsign(); }

View File

@@ -110,6 +110,8 @@ namespace BlackMisc
//! Class which can be directly used to access an \sa IInterpolationSetupProvider object
class BLACKMISC_EXPORT CInterpolationSetupAware : public IProviderAware<IInterpolationSetupProvider>
{
virtual void anchor();
public:
//! \copydoc IInterpolationSetupProvider::getInterpolationSetupPerCallsignOrDefault
CInterpolationAndRenderingSetupPerCallsign getInterpolationSetupPerCallsignOrDefault(const Aviation::CCallsign &callsign) const;

View File

@@ -54,6 +54,9 @@ namespace BlackMisc
m_pbh = CInterpolatorPbh(m_simulationTimeFraction, situation1, situation2);
}
void CInterpolatorLinear::anchor()
{ }
CAircraftSituation CInterpolatorLinear::CInterpolant::interpolatePositionAndAltitude(const CAircraftSituation &situation, bool interpolateGndFactor) const
{
const std::array<double, 3> oldVec(m_oldSituation.getPosition().normalVectorDouble());

View File

@@ -30,6 +30,8 @@ namespace BlackMisc
//! Linear interpolator, calculation inbetween positions
class BLACKMISC_EXPORT CInterpolatorLinear : public CInterpolator<CInterpolatorLinear>
{
virtual void anchor();
public:
//! Constructor
CInterpolatorLinear(const Aviation::CCallsign &callsign,

View File

@@ -142,6 +142,10 @@ namespace BlackMisc
return true;
}
// pin vtables to this file
void CInterpolatorSpline::anchor()
{ }
CInterpolatorSpline::CInterpolant CInterpolatorSpline::getInterpolant(SituationLog &log)
{
// recalculate derivatives only if they changed

View File

@@ -27,6 +27,8 @@ namespace BlackMisc
//! Cubic spline interpolator
class BLACKMISC_EXPORT CInterpolatorSpline : public CInterpolator<CInterpolatorSpline>
{
virtual void anchor();
public:
//! Constructor
CInterpolatorSpline(const Aviation::CCallsign &callsign,

View File

@@ -24,6 +24,10 @@ namespace BlackMisc
return changed1 || changed2;
}
// pin vtables to this file
void COwnAircraftAware::anchor()
{ }
CSimulatedAircraft COwnAircraftAware::getOwnAircraft() const
{
Q_ASSERT_X(this->provider(), Q_FUNC_INFO, "No object available");

View File

@@ -111,6 +111,8 @@ namespace BlackMisc
//! Delegating class which can be directly used to access an \sa IOwnAircraftProvider instance
class BLACKMISC_EXPORT COwnAircraftAware : public IProviderAware<IOwnAircraftProvider>
{
virtual void anchor();
public:
//! Set the provider
void setOwnAircraftProvider(IOwnAircraftProvider *provider) { this->setProvider(provider); }

View File

@@ -24,6 +24,9 @@ namespace BlackMisc
{
namespace Simulation
{
IRemoteAircraftProvider::~IRemoteAircraftProvider()
{ }
const CLogCategoryList &CRemoteAircraftProvider::getLogCategories()
{
static const CLogCategoryList cats { CLogCategory::matching(), CLogCategory::network() };
@@ -756,6 +759,9 @@ namespace BlackMisc
return removedCallsign;
}
CRemoteAircraftAware::~CRemoteAircraftAware()
{ }
CSimulatedAircraftList CRemoteAircraftAware::getAircraftInRange() const
{
Q_ASSERT_X(this->provider(), Q_FUNC_INFO, "No object available");

View File

@@ -52,7 +52,7 @@ namespace BlackMisc
static constexpr int DefaultOffsetTimeMs = 6000; //!< \fixme copied from CNetworkVatlib::c_positionTimeOffsetMsec
//! Destructor
virtual ~IRemoteAircraftProvider() {}
virtual ~IRemoteAircraftProvider();
//! All remote aircraft
//! \threadsafe
@@ -449,7 +449,7 @@ namespace BlackMisc
{
public:
//! Destructor
virtual ~CRemoteAircraftAware() {}
virtual ~CRemoteAircraftAware();
//! \copydoc IRemoteAircraftProvider::getAircraftInRange
CSimulatedAircraftList getAircraftInRange() const;

View File

@@ -344,6 +344,10 @@ namespace BlackMisc
this->resetSimulationEnvironmentStatistics();
}
// pin vtables to this file
void CSimulationEnvironmentAware::anchor()
{ }
CElevationPlane CSimulationEnvironmentAware::findClosestElevationWithinRange(const ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range) const
{
if (!this->hasProvider()) { return CElevationPlane::null(); }

View File

@@ -216,6 +216,8 @@ namespace BlackMisc
//! Class which can be directly used to access an \sa ISimulationEnvironmentProvider object
class BLACKMISC_EXPORT CSimulationEnvironmentAware : public IProviderAware<ISimulationEnvironmentProvider>
{
virtual void anchor();
public:
//! Set the provider
void setSimulationEnvironmentProvider(ISimulationEnvironmentProvider *provider) { this->setProvider(provider); }