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:
Klaus Basan
2015-05-03 01:28:55 +02:00
committed by Mathew Sutcliffe
parent 91f0b99cc5
commit e9f7810efc
23 changed files with 641 additions and 470 deletions

View File

@@ -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(); }