refs #395, improvements for snapshot / restricted aircraft handling

* fixed isCurrentThreadCreatingThread and renamed to isCurrentThreadObjectThread (this check was never working), added 2 more thread checks
* changed remove aircraft function to return number of returned aircraft (like with the containers this allows to avoid unnecessary signals)
* removed unused function ps_recalculateRenderedAircraft() / SimulatorCommon
* using Queued airspaceAircraftSnapshot signal for binding (functor connect does not provide connection type)
* extened ASSERTs to check threads
* simulator: initial situation function with return value (success?)
* simulator: avoid unneccessary copy and provide correct rendered flag in add aircraft function
This commit is contained in:
Klaus Basan
2015-05-19 16:13:10 +02:00
parent beef0a5ec9
commit 880a954db9
19 changed files with 194 additions and 118 deletions

View File

@@ -93,15 +93,12 @@ namespace BlackCore
virtual void deleteAllRenderingRestrictions() override;
//! \copydoc IContextSimulator::physicallyRemoveRemoteAircraft
virtual bool physicallyRemoveMultipleRemoteAircraft(const BlackMisc::Aviation::CCallsignSet &callsigns) override;
virtual int physicallyRemoveMultipleRemoteAircraft(const BlackMisc::Aviation::CCallsignSet &callsigns) override;
protected slots:
//! Slow timer used to highlight aircraft, can be used for other things too
virtual void ps_oneSecondTimer();
//! Recalculate the rendered aircraft
virtual void ps_recalculateRenderedAircraft();
//! Recalculate the rendered aircraft
virtual void ps_recalculateRenderedAircraft(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &snapshot);
@@ -130,11 +127,11 @@ namespace BlackCore
//! Blink the highlighted aircraft
void blinkHighlightedAircraft();
//! Restore aircraft from backedn data
//! Restore aircraft from backend data
void resetAircraftFromBacked(const BlackMisc::Aviation::CCallsign &callsign);
//! Override parts and situation from current interpolator values, if any!
void setInitialAircraftSituationAndParts(BlackMisc::Simulation::CSimulatedAircraft &aircraft) const;
//! Override situation from current interpolator values, if any!
bool setInitialAircraftSituation(BlackMisc::Simulation::CSimulatedAircraft &aircraft) const;
bool m_debugMessages = false; //!< Display debug messages
bool m_blinkCycle = false; //!< use for highlighting