mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Ref T129, created CFlightPlanRemarks as value object and removed flight plan utils
* CFlightPlanRemarks supports the functionality of utils, but is also a valid value object * deleted CFlightPlanUtils .h/.cpp * CFlightPlan uses CFlightPlanRemarks * changed classes like VATSIM data reader to use CFlightPlanRemarks (instead of utils)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
27281e438d
commit
3c24d5c7f9
@@ -12,7 +12,6 @@
|
||||
#include "blackmisc/aviation/aircraftsituation.h"
|
||||
#include "blackmisc/aviation/altitude.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/flightplanutils.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
#include "blackmisc/network/server.h"
|
||||
@@ -135,12 +134,12 @@ namespace BlackCore
|
||||
return m_flightPlanRemarks.value(callsign);
|
||||
}
|
||||
|
||||
CFlightPlanUtils::FlightPlanRemarks CVatsimDataFileReader::getParsedFlightPlanRemarksForCallsign(const CCallsign &callsign) const
|
||||
CFlightPlanRemarks CVatsimDataFileReader::getParsedFlightPlanRemarksForCallsign(const CCallsign &callsign) const
|
||||
{
|
||||
if (callsign.isEmpty()) return CFlightPlanUtils::parseFlightPlanRemarks("");
|
||||
if (callsign.isEmpty()) { return CFlightPlanRemarks(); }
|
||||
const QString remarks = this->getFlightPlanRemarksForCallsign(callsign);
|
||||
const CVoiceCapabilities vc = this->getVoiceCapabilityForCallsign(callsign);
|
||||
return CFlightPlanUtils::parseFlightPlanRemarks(remarks, vc);
|
||||
return CFlightPlanRemarks(remarks, vc);
|
||||
}
|
||||
|
||||
void CVatsimDataFileReader::updateWithVatsimDataFileData(CSimulatedAircraft &aircraftToBeUdpated) const
|
||||
@@ -318,7 +317,7 @@ namespace BlackCore
|
||||
const QString equipmentCodeAndAircraft = clientPartsMap["planned_aircraft"].trimmed();
|
||||
if (!equipmentCodeAndAircraft.isEmpty())
|
||||
{
|
||||
const QString aircraftIcaoCode = CFlightPlanUtils::aircraftIcaoCodeFromEquipmentCode(equipmentCodeAndAircraft);
|
||||
const QString aircraftIcaoCode = CFlightPlanRemarks::aircraftIcaoCodeFromEquipmentCode(equipmentCodeAndAircraft);
|
||||
if (CAircraftIcaoCode::isValidDesignator(aircraftIcaoCode))
|
||||
{
|
||||
currentAircraft.setAircraftIcaoDesignator(aircraftIcaoCode);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/flightplanutils.h"
|
||||
#include "blackmisc/aviation/flightplan.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
#include "blackmisc/network/serverlist.h"
|
||||
#include "blackmisc/network/userlist.h"
|
||||
@@ -115,7 +115,7 @@ namespace BlackCore
|
||||
|
||||
//! Parsed flight plan remarks for callsign
|
||||
//! \threadsafe
|
||||
BlackMisc::Aviation::CFlightPlanUtils::FlightPlanRemarks getParsedFlightPlanRemarksForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
BlackMisc::Aviation::CFlightPlanRemarks getParsedFlightPlanRemarksForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
|
||||
//! Update aircraft with VATSIM aircraft data from data file
|
||||
//! \threadsafe
|
||||
|
||||
Reference in New Issue
Block a user