mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 16:25:54 +08:00
Ref T111, access to own aircraft`s situation
This commit is contained in:
committed by
Mathew Sutcliffe
parent
a1357f0bd7
commit
b423a62626
@@ -26,6 +26,7 @@
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -39,7 +40,7 @@ namespace BlackMisc
|
||||
|
||||
namespace Simulation
|
||||
{
|
||||
//! For testing, thread safety not implemented in this class
|
||||
//! For testing
|
||||
class BLACKMISC_EXPORT COwnAircraftProviderDummy :
|
||||
public QObject,
|
||||
public IOwnAircraftProvider
|
||||
@@ -54,11 +55,14 @@ namespace BlackMisc
|
||||
static COwnAircraftProviderDummy *instance();
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraft
|
||||
virtual CSimulatedAircraft getOwnAircraft() const override { return this->m_ownAircraft; }
|
||||
virtual CSimulatedAircraft getOwnAircraft() const override;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraftPosition
|
||||
virtual BlackMisc::Geo::CCoordinateGeodetic getOwnAircraftPosition() const override;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraftSituation
|
||||
virtual BlackMisc::Aviation::CAircraftSituation getOwnAircraftSituation() const override;
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraftParts
|
||||
virtual BlackMisc::Aviation::CAircraftParts getOwnAircraftParts() const override;
|
||||
|
||||
@@ -95,8 +99,8 @@ namespace BlackMisc
|
||||
|
||||
private:
|
||||
BlackMisc::Simulation::CSimulatedAircraft m_ownAircraft;
|
||||
mutable QReadWriteLock m_lock; //!< lock for m_ownAircraft
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user