Ref T27, made isAircraftInRange context and provider function

Based on clang warnings and RW's comment now pure virtual and context and provider function
This commit is contained in:
Klaus Basan
2017-06-29 18:10:26 +02:00
committed by Mathew Sutcliffe
parent 1400f38aa9
commit ec844fd438
9 changed files with 26 additions and 12 deletions

View File

@@ -16,12 +16,6 @@ namespace BlackMisc
{
namespace Simulation
{
bool IRemoteAircraftProvider::isAircraftInRange(const CCallsign &callsign) const
{
if (callsign.isEmpty()) { return false; }
return this->getAircraftInRange().containsCallsign(callsign);
}
CSimulatedAircraftList CRemoteAircraftAware::getAircraftInRange() const
{
Q_ASSERT_X(this->m_remoteAircraftProvider, Q_FUNC_INFO, "No object available");

View File

@@ -69,9 +69,8 @@ namespace BlackMisc
virtual BlackMisc::Aviation::CCallsignSet getAircraftInRangeCallsigns() const = 0;
//! Is aircraft in range?
//! \remark convenience function with default implementation
//! \threadsafe
virtual bool isAircraftInRange(const BlackMisc::Aviation::CCallsign &callsign) const;
virtual bool isAircraftInRange(const BlackMisc::Aviation::CCallsign &callsign) const = 0;
//! Current snapshot
//! \threadsafe