mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
refs #638, reverse lookup in model matcher
This commit is contained in:
@@ -40,7 +40,9 @@ namespace BlackCore
|
||||
ByModelString = 1 << 0,
|
||||
ByIcaoData = 1 << 1,
|
||||
ByFamily = 1 << 2,
|
||||
All = ByModelString | ByIcaoData | ByFamily
|
||||
ByLivery = 1 << 3,
|
||||
ByCombinedCode = 1 << 4,
|
||||
All = ByModelString | ByIcaoData | ByFamily | ByLivery | ByCombinedCode
|
||||
};
|
||||
Q_DECLARE_FLAGS(MatchingMode, MatchingModeFlag)
|
||||
|
||||
@@ -59,8 +61,13 @@ namespace BlackCore
|
||||
//! Get the closest matching aircraft model.
|
||||
//! Result depends on enabled modes.
|
||||
//! \sa MatchingModeFlag
|
||||
//! \threadsafe
|
||||
BlackMisc::Simulation::CAircraftModel getClosestMatch(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft, BlackMisc::CStatusMessageList *log = nullptr) const;
|
||||
|
||||
//! Try to find the corresponding data in DB and get best information for following matching
|
||||
//! \threadsafe
|
||||
static BlackMisc::Simulation::CAircraftModel reverseLookup(const BlackMisc::Simulation::CAircraftModel &modelToLookup, const QString &liveryInfo, BlackMisc::CStatusMessageList *log = nullptr);
|
||||
|
||||
//! Get the models
|
||||
BlackMisc::Simulation::CAircraftModelList getModelSet() const { return m_modelSet; }
|
||||
|
||||
@@ -113,6 +120,13 @@ namespace BlackCore
|
||||
const QString &message,
|
||||
BlackMisc::CStatusMessage::StatusSeverity s = BlackMisc::CStatusMessage::SeverityInfo);
|
||||
|
||||
//! Add to log. if applicable
|
||||
//! \treadsafe
|
||||
static void logDetails(BlackMisc::CStatusMessageList *log,
|
||||
const BlackMisc::Aviation::CCallsign &callsign,
|
||||
const QString &message,
|
||||
BlackMisc::CStatusMessage::StatusSeverity s = BlackMisc::CStatusMessage::SeverityInfo);
|
||||
|
||||
MatchingMode m_matchingMode = All;
|
||||
BlackMisc::Simulation::CAircraftModel m_defaultModel; //!< model to be used as default model
|
||||
BlackMisc::Simulation::CAircraftModelList m_modelSet; //!< models used for model matching
|
||||
|
||||
Reference in New Issue
Block a user