From 7ae0649dd622013b2d29a4caf294e033e9f94543 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 26 Mar 2018 00:51:15 +0200 Subject: [PATCH] Ref T259, Ref T243 remove dummy interpolator * As there are no longer situations/parts added to the interpolator /solely provided by provider) there is no overhead anymore and no need for the dummy interpolator. * Furthermore switching the interpolator at runtime will become possible. --- src/blackmisc/simulation/interpolatordummy.h | 67 -------------------- src/blackmisc/simulation/interpolatormulti.h | 7 -- 2 files changed, 74 deletions(-) delete mode 100644 src/blackmisc/simulation/interpolatordummy.h diff --git a/src/blackmisc/simulation/interpolatordummy.h b/src/blackmisc/simulation/interpolatordummy.h deleted file mode 100644 index bbf0fd776..000000000 --- a/src/blackmisc/simulation/interpolatordummy.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2017 - * swift project Community / Contributors - * - * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level - * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, - * including this file, may be copied, modified, propagated, or distributed except according to the terms - * contained in the LICENSE file. - */ - -//! \file - -#ifndef BLACKMISC_SIMULATION_INTERPOLATORDUMMY_H -#define BLACKMISC_SIMULATION_INTERPOLATORDUMMY_H - -#include "blackmisc/aviation/aircraftparts.h" -#include "blackmisc/aviation/aircraftsituation.h" -#include "blackmisc/aviation/callsign.h" -#include "blackmisc/simulation/interpolationlogger.h" -#include "blackmisc/simulation/interpolationrenderingsetup.h" -#include "blackmisc/simulation/interpolator.h" - -namespace BlackMisc -{ - namespace Simulation - { - /*! - * Dummy interpolator which does nothing. - */ - class BLACKMISC_EXPORT CInterpolatorDummy : public QObject - { - public: - //! Constructor - CInterpolatorDummy(const BlackMisc::Aviation::CCallsign &callsign, QObject *parent) : QObject(parent) - { - this->setObjectName("CInterpolatorDummy for " + callsign.asString()); - } - - //! \copydoc CInterpolator::getInterpolatedSituation - BlackMisc::Aviation::CAircraftSituation getInterpolatedSituation( - qint64, const CInterpolationAndRenderingSetupPerCallsign &, CInterpolationStatus &) { return {}; } - - //! \copydoc CInterpolator::getInterpolatedParts - BlackMisc::Aviation::CAircraftParts getInterpolatedParts( - qint64, const CInterpolationAndRenderingSetupPerCallsign &, CPartsStatus &, bool = false) const { return {}; } - - //! \copydoc CInterpolator::addAircraftSituation - void addAircraftSituation(const BlackMisc::Aviation::CAircraftSituation &) {} - - //! \copydoc CInterpolator::hasAircraftSituations - bool hasAircraftSituations() const { return false; } - - //! \copydoc CInterpolator::addAircraftParts - void addAircraftParts(const BlackMisc::Aviation::CAircraftParts &) {} - - //! \copydoc CInterpolator::hasAircraftParts - bool hasAircraftParts() const { return false; } - - //! \copydoc CInterpolator::getInterpolatorInfo - QString getInterpolatorInfo() const { return this->objectName(); } - - //! \copydoc CInterpolator::attachLogger - void attachLogger(CInterpolationLogger *) {} - }; - } // ns -} // ns - -#endif diff --git a/src/blackmisc/simulation/interpolatormulti.h b/src/blackmisc/simulation/interpolatormulti.h index 1b014cd9f..2adc0d6be 100644 --- a/src/blackmisc/simulation/interpolatormulti.h +++ b/src/blackmisc/simulation/interpolatormulti.h @@ -14,7 +14,6 @@ #include "blackmisc/simulation/interpolatorlinear.h" #include "blackmisc/simulation/interpolatorspline.h" -#include "blackmisc/simulation/interpolatordummy.h" namespace BlackMisc { @@ -89,13 +88,7 @@ namespace BlackMisc private: Mode m_mode = ModeSpline; CInterpolatorSpline m_spline; -#ifdef QT_DEBUG - //! only in a dev.environment, otherwise replaced by low footprint dummy driver CInterpolatorLinear m_linear; -#else - //! Low footprint dummy interpolator in non-debug compile - CInterpolatorDummy m_linear; -#endif }; /**