mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #369, thread safe access to aircraft parts, situations
This commit is contained in:
@@ -22,9 +22,14 @@ namespace BlackMisc
|
||||
class IOwnAircraftProviderReadOnly
|
||||
{
|
||||
public:
|
||||
//! Own aircraft
|
||||
//! Own aircraft as reference
|
||||
//! \note in memory, not thread safe!
|
||||
virtual const CSimulatedAircraft &ownAircraft() const = 0;
|
||||
|
||||
//! Own aircraft as copy
|
||||
//! \note not hread safe!
|
||||
virtual BlackMisc::Simulation::CSimulatedAircraft getOwnAircraft() const = 0;
|
||||
|
||||
//! Destructor
|
||||
virtual ~IOwnAircraftProviderReadOnly() {}
|
||||
};
|
||||
@@ -67,6 +72,9 @@ namespace BlackMisc
|
||||
//! \copydoc IOwnAircraftProvider::ownAircraft
|
||||
virtual CSimulatedAircraft &ownAircraft() { return this->m_ownAircraft; }
|
||||
|
||||
//! \copydoc IOwnAircraftProvider::getOwnAircraft
|
||||
virtual CSimulatedAircraft getOwnAircraft() const { return this->m_ownAircraft; }
|
||||
|
||||
public slots:
|
||||
//! \copydoc IOwnAircraftProvider::updateCockpit
|
||||
virtual bool updateCockpit(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2, const BlackMisc::Aviation::CTransponder &transponder, const QString &originator) override;
|
||||
|
||||
@@ -30,9 +30,17 @@ namespace BlackMisc
|
||||
//! All situation (per callsign, time history)
|
||||
virtual const BlackMisc::Aviation::CAircraftSituationList &renderedAircraftSituations() const = 0;
|
||||
|
||||
//! Rendered aircraft situations (history) as copy
|
||||
//! \threadsafe
|
||||
virtual BlackMisc::Aviation::CAircraftSituationList getRenderedAircraftSituations() const = 0;
|
||||
|
||||
//! All parts (per callsign, time history)
|
||||
virtual const BlackMisc::Aviation::CAircraftPartsList &renderedAircraftParts() const = 0;
|
||||
|
||||
//! All parts (per callsign, time history) as copy
|
||||
//! \threadsafe
|
||||
virtual BlackMisc::Aviation::CAircraftPartsList getRenderedAircraftParts() const = 0;
|
||||
|
||||
//! Destructor
|
||||
virtual ~IRenderedAircraftProviderReadOnly() {}
|
||||
};
|
||||
@@ -42,12 +50,14 @@ namespace BlackMisc
|
||||
{
|
||||
public:
|
||||
//! All rendered aircraft
|
||||
//! \note in memory reference, not thread safe
|
||||
virtual CSimulatedAircraftList &renderedAircraft() = 0;
|
||||
|
||||
//! Rendered aircraft situations (history)
|
||||
virtual BlackMisc::Aviation::CAircraftSituationList &renderedAircraftSituations() = 0;
|
||||
|
||||
//! All parts (per callsign, time history)
|
||||
//! \note in memory reference, not thread safe
|
||||
virtual BlackMisc::Aviation::CAircraftPartsList &renderedAircraftParts() = 0;
|
||||
|
||||
//! Enable/disable rendering
|
||||
|
||||
Reference in New Issue
Block a user