mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Ref T701, check for model string in reader
This commit is contained in:
committed by
Mat Sutcliffe
parent
ea7b3316c9
commit
e376c18b28
@@ -106,6 +106,12 @@ namespace BlackCore
|
|||||||
return models.findFirstByModelStringOrDefault(modelString);
|
return models.findFirstByModelStringOrDefault(modelString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CModelDataReader::containsModelString(const QString &modelString) const
|
||||||
|
{
|
||||||
|
if (modelString.isEmpty()) { return false; }
|
||||||
|
return this->getModels().containsModelString(modelString);
|
||||||
|
}
|
||||||
|
|
||||||
CAircraftModel CModelDataReader::getModelForDbKey(int dbKey) const
|
CAircraftModel CModelDataReader::getModelForDbKey(int dbKey) const
|
||||||
{
|
{
|
||||||
if (dbKey < 0) { return CAircraftModel(); }
|
if (dbKey < 0) { return CAircraftModel(); }
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ namespace BlackCore
|
|||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
|
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
|
||||||
|
|
||||||
|
//! Contains modelstring?
|
||||||
|
//! \threadsafe
|
||||||
|
bool containsModelString(const QString &modelString) const;
|
||||||
|
|
||||||
//! Get model for DB key
|
//! Get model for DB key
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
||||||
|
|||||||
@@ -668,6 +668,12 @@ namespace BlackCore
|
|||||||
return CAircraftModel();
|
return CAircraftModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CWebDataServices::containsModelString(const QString &modelString) const
|
||||||
|
{
|
||||||
|
if (m_modelDataReader) { return m_modelDataReader->containsModelString(modelString); }
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
CAircraftModel CWebDataServices::getModelForDbKey(int dbKey) const
|
CAircraftModel CWebDataServices::getModelForDbKey(int dbKey) const
|
||||||
{
|
{
|
||||||
if (m_modelDataReader) { return m_modelDataReader->getModelForDbKey(dbKey); }
|
if (m_modelDataReader) { return m_modelDataReader->getModelForDbKey(dbKey); }
|
||||||
|
|||||||
@@ -241,6 +241,10 @@ namespace BlackCore
|
|||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
|
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
|
||||||
|
|
||||||
|
//! Existing modelstring?
|
||||||
|
//! \threadsafe
|
||||||
|
bool containsModelString(const QString &modelString) const;
|
||||||
|
|
||||||
//! Model for key if any
|
//! Model for key if any
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user