mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
refs #395, prepared for logical / physical add/remote member functions
* renamed functions * added access to snapshot * moved simulator base class in own files (.h/.cpp)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
91f0b99cc5
commit
e9f7810efc
@@ -18,7 +18,8 @@ namespace BlackMisc
|
||||
CAirspaceAircraftSnapshot::CAirspaceAircraftSnapshot()
|
||||
{ }
|
||||
|
||||
CAirspaceAircraftSnapshot::CAirspaceAircraftSnapshot(const CSimulatedAircraftList &allAircraft)
|
||||
CAirspaceAircraftSnapshot::CAirspaceAircraftSnapshot(const CSimulatedAircraftList &allAircraft) :
|
||||
m_timestampMsSinceEpoch(QDateTime::currentMSecsSinceEpoch())
|
||||
{
|
||||
if (!allAircraft.isEmpty())
|
||||
{
|
||||
@@ -33,6 +34,11 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
bool CAirspaceAircraftSnapshot::isValidSnapshot() const
|
||||
{
|
||||
return m_timestampMsSinceEpoch > 0;
|
||||
}
|
||||
|
||||
CVariant CAirspaceAircraftSnapshot::propertyByIndex(const CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return this->toCVariant(); }
|
||||
|
||||
Reference in New Issue
Block a user