diff --git a/src/blackcore/aircraftmatcher.cpp b/src/blackcore/aircraftmatcher.cpp index 3f9e66453..fbb42d576 100644 --- a/src/blackcore/aircraftmatcher.cpp +++ b/src/blackcore/aircraftmatcher.cpp @@ -261,7 +261,7 @@ namespace BlackCore if (useMatchingScript && setup.doRunMsMatchingStageScript()) { CMatchingUtils::addLogDetailsToList(log, remoteAircraft, QStringLiteral("Matching script: Matching stage script used")); - const MSReturnValues rv = CAircraftMatcher::matchingStageScript(remoteAircraft.getModel(), matchedModel, setup, modelSet, log); + const MatchingScriptReturnValues rv = CAircraftMatcher::matchingStageScript(remoteAircraft.getModel(), matchedModel, setup, modelSet, log); if (rv.runScriptAndModified()) { matchedModel = rv.model; @@ -325,28 +325,28 @@ namespace BlackCore return model; } - MSReturnValues CAircraftMatcher::reverseLookupScript(const CAircraftModel &inModel, const CAircraftMatcherSetup &setup, CStatusMessageList *log) + MatchingScriptReturnValues CAircraftMatcher::reverseLookupScript(const CAircraftModel &inModel, const CAircraftMatcherSetup &setup, CStatusMessageList *log) { - if (!setup.doRunMsReverseLookupScript()) { return MSReturnValues(inModel); } + if (!setup.doRunMsReverseLookupScript()) { return MatchingScriptReturnValues(inModel); } if (!sApp || sApp->isShuttingDown() || !sApp->hasWebDataServices()) { return inModel; } const QString js = CFileUtils::readFileToString(setup.getMsReverseLookupFile()); static const CAircraftModelList noModelSet; - const MSReturnValues rv = CAircraftMatcher::matchingScript(js, inModel, inModel, setup, noModelSet, ReverseLookup, log); + const MatchingScriptReturnValues rv = CAircraftMatcher::matchingScript(js, inModel, inModel, setup, noModelSet, ReverseLookup, log); return rv; } - MSReturnValues CAircraftMatcher::matchingStageScript(const CAircraftModel &inModel, const CAircraftModel &matchedModel, const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, CStatusMessageList *log) + MatchingScriptReturnValues CAircraftMatcher::matchingStageScript(const CAircraftModel &inModel, const CAircraftModel &matchedModel, const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, CStatusMessageList *log) { - if (!setup.doRunMsMatchingStageScript()) { return MSReturnValues(inModel); } + if (!setup.doRunMsMatchingStageScript()) { return MatchingScriptReturnValues(inModel); } if (!sApp || sApp->isShuttingDown() || !sApp->hasWebDataServices()) { return inModel; } const QString js = CFileUtils::readFileToString(setup.getMsMatchingStageFile()); - const MSReturnValues rv = CAircraftMatcher::matchingScript(js, inModel, matchedModel, setup, modelSet, MatchingStage, log); + const MatchingScriptReturnValues rv = CAircraftMatcher::matchingScript(js, inModel, matchedModel, setup, modelSet, MatchingStage, log); return rv; } - MSReturnValues CAircraftMatcher::matchingScript(const QString &js, const CAircraftModel &inModel, const CAircraftModel &matchedModel, const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, MatchingScript ms, CStatusMessageList *log) + MatchingScriptReturnValues CAircraftMatcher::matchingScript(const QString &js, const CAircraftModel &inModel, const CAircraftModel &matchedModel, const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, MatchingScript ms, CStatusMessageList *log) { - MSReturnValues rv(inModel); + MatchingScriptReturnValues rv(inModel); QString logMessage; const CCallsign callsign = inModel.getCallsign(); @@ -668,7 +668,7 @@ namespace BlackCore CAircraftModel reverseModel = reverseLookupModel(modelToLookup, networkLiveryInfo, log); if (!setup.doRunMsReverseLookupScript()) { return reverseModel; } const CCallsign cs = modelToLookup.getCallsign(); - const MSReturnValues rv = reverseLookupScript(reverseModel, setup, log); + const MatchingScriptReturnValues rv = reverseLookupScript(reverseModel, setup, log); if (rv.runScriptModifiedAndRerun()) { CMatchingUtils::addLogDetailsToList(log, cs, QStringLiteral("Matching script: Modified value and requested rerun")); diff --git a/src/blackcore/aircraftmatcher.h b/src/blackcore/aircraftmatcher.h index d8d8d0500..a1139a4f4 100644 --- a/src/blackcore/aircraftmatcher.h +++ b/src/blackcore/aircraftmatcher.h @@ -92,15 +92,15 @@ namespace BlackCore //! Run the network reverse lookup script //! \threadsafe //! \ingroup reverselookup - static BlackMisc::Simulation::MSReturnValues reverseLookupScript(const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, BlackMisc::CStatusMessageList *log); + static BlackMisc::Simulation::MatchingScriptReturnValues reverseLookupScript(const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, BlackMisc::CStatusMessageList *log); //! Run the matching stage lookup script //! \threadsafe - static BlackMisc::Simulation::MSReturnValues matchingStageScript(const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftModel &matchedModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, const BlackMisc::Simulation::CAircraftModelList &modelSet, BlackMisc::CStatusMessageList *log); + static BlackMisc::Simulation::MatchingScriptReturnValues matchingStageScript(const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftModel &matchedModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, const BlackMisc::Simulation::CAircraftModelList &modelSet, BlackMisc::CStatusMessageList *log); //! Run the matching script //! \threadsafe - static BlackMisc::Simulation::MSReturnValues matchingScript(const QString &js, + static BlackMisc::Simulation::MatchingScriptReturnValues matchingScript(const QString &js, const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftModel &matchedModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, const BlackMisc::Simulation::CAircraftModelList &modelSet, BlackMisc::Simulation::MatchingScript ms, BlackMisc::CStatusMessageList *log); diff --git a/src/blackcore/airspacemonitor.cpp b/src/blackcore/airspacemonitor.cpp index 8ef16c6e9..8d2cf5be5 100644 --- a/src/blackcore/airspacemonitor.cpp +++ b/src/blackcore/airspacemonitor.cpp @@ -847,7 +847,7 @@ namespace BlackCore // Script if (runMatchinScript && setup.doRunMsReverseLookupScript()) { - const MSReturnValues rv = CAircraftMatcher::reverseLookupScript(lookupModel, setup, log); + const MatchingScriptReturnValues rv = CAircraftMatcher::reverseLookupScript(lookupModel, setup, log); if (rv.runScriptAndModified()) { if (rv.runScriptAndRerun()) diff --git a/src/blackgui/components/modelmatchercomponent.cpp b/src/blackgui/components/modelmatchercomponent.cpp index a8f417b3c..da589bbc7 100644 --- a/src/blackgui/components/modelmatchercomponent.cpp +++ b/src/blackgui/components/modelmatchercomponent.cpp @@ -272,12 +272,12 @@ namespace BlackGui return model; } - MSReturnValues CModelMatcherComponent::matchingScript(const CAircraftModel &inModel, const CAircraftMatcherSetup &setup, CStatusMessageList &msgs) + MatchingScriptReturnValues CModelMatcherComponent::matchingScript(const CAircraftModel &inModel, const CAircraftMatcherSetup &setup, CStatusMessageList &msgs) { // Script if (setup.doRunMsReverseLookupScript()) { - const MSReturnValues rv = CAircraftMatcher::reverseLookupScript(inModel, setup, &msgs); + const MatchingScriptReturnValues rv = CAircraftMatcher::reverseLookupScript(inModel, setup, &msgs); if (rv.runScriptAndModified()) { return rv; diff --git a/src/blackgui/components/modelmatchercomponent.h b/src/blackgui/components/modelmatchercomponent.h index 209a6fac6..8c9986a8d 100644 --- a/src/blackgui/components/modelmatchercomponent.h +++ b/src/blackgui/components/modelmatchercomponent.h @@ -94,7 +94,7 @@ namespace BlackGui BlackMisc::Simulation::CAircraftModel defaultModel() const; //! Run matching script - static BlackMisc::Simulation::MSReturnValues matchingScript(const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, BlackMisc::CStatusMessageList &msgs); + static BlackMisc::Simulation::MatchingScriptReturnValues matchingScript(const BlackMisc::Simulation::CAircraftModel &inModel, const BlackMisc::Simulation::CAircraftMatcherSetup &setup, BlackMisc::CStatusMessageList &msgs); QScopedPointer ui; QPointer m_workbenchView; //!< an external workbenc diff --git a/src/blackmisc/simulation/matchingscriptmisc.h b/src/blackmisc/simulation/matchingscriptmisc.h index 8e18bf15c..9cb9e2e39 100644 --- a/src/blackmisc/simulation/matchingscriptmisc.h +++ b/src/blackmisc/simulation/matchingscriptmisc.h @@ -29,10 +29,10 @@ namespace BlackMisc BLACKMISC_EXPORT const QString &msToString(MatchingScript ms); //! Return values - struct MSReturnValues + struct MatchingScriptReturnValues { //! Ctor - MSReturnValues(const BlackMisc::Simulation::CAircraftModel &model) : model(model) {} + MatchingScriptReturnValues(const BlackMisc::Simulation::CAircraftModel &model) : model(model) {} BlackMisc::Simulation::CAircraftModel model; //!< the model bool modified = false; //!< modified?