mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +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);
|
||||
}
|
||||
|
||||
bool CModelDataReader::containsModelString(const QString &modelString) const
|
||||
{
|
||||
if (modelString.isEmpty()) { return false; }
|
||||
return this->getModels().containsModelString(modelString);
|
||||
}
|
||||
|
||||
CAircraftModel CModelDataReader::getModelForDbKey(int dbKey) const
|
||||
{
|
||||
if (dbKey < 0) { return CAircraftModel(); }
|
||||
|
||||
@@ -81,6 +81,10 @@ namespace BlackCore
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
|
||||
|
||||
//! Contains modelstring?
|
||||
//! \threadsafe
|
||||
bool containsModelString(const QString &modelString) const;
|
||||
|
||||
//! Get model for DB key
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
||||
|
||||
@@ -668,6 +668,12 @@ namespace BlackCore
|
||||
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
|
||||
{
|
||||
if (m_modelDataReader) { return m_modelDataReader->getModelForDbKey(dbKey); }
|
||||
|
||||
@@ -241,6 +241,10 @@ namespace BlackCore
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
|
||||
|
||||
//! Existing modelstring?
|
||||
//! \threadsafe
|
||||
bool containsModelString(const QString &modelString) const;
|
||||
|
||||
//! Model for key if any
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModel getModelForDbKey(int dbKey) const;
|
||||
|
||||
Reference in New Issue
Block a user