From 3b842679e78ee6e521c6d764cee4e42d9cc8538a Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 1 Oct 2017 00:35:31 +0200 Subject: [PATCH] Ref T129, flight plan list --- src/blackmisc/aviation/aviation.h | 1 + src/blackmisc/aviation/callsignobjectlist.cpp | 3 +- src/blackmisc/aviation/callsignobjectlist.h | 3 ++ src/blackmisc/aviation/flightplanlist.cpp | 30 ++++++++++++ src/blackmisc/aviation/flightplanlist.h | 49 +++++++++++++++++++ .../aviation/registermetadataaviation.cpp | 1 + 6 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 src/blackmisc/aviation/flightplanlist.cpp create mode 100644 src/blackmisc/aviation/flightplanlist.h diff --git a/src/blackmisc/aviation/aviation.h b/src/blackmisc/aviation/aviation.h index 939d95110..2acbfb57f 100644 --- a/src/blackmisc/aviation/aviation.h +++ b/src/blackmisc/aviation/aviation.h @@ -38,6 +38,7 @@ #include "blackmisc/aviation/informationmessage.h" #include "blackmisc/aviation/selcal.h" #include "blackmisc/aviation/flightplan.h" +#include "blackmisc/aviation/flightplanlist.h" #include "blackmisc/aviation/aircraftengine.h" #include "blackmisc/aviation/aircraftenginelist.h" #include "blackmisc/aviation/aircraftlights.h" diff --git a/src/blackmisc/aviation/callsignobjectlist.cpp b/src/blackmisc/aviation/callsignobjectlist.cpp index a50523081..f692ce5e5 100644 --- a/src/blackmisc/aviation/callsignobjectlist.cpp +++ b/src/blackmisc/aviation/callsignobjectlist.cpp @@ -12,7 +12,7 @@ #include "blackmisc/predicates.h" #include "blackmisc/aviation/atcstationlist.h" #include "blackmisc/aviation/aircraftsituationlist.h" -#include "blackmisc/simulation/simulatedaircraft.h" +#include "blackmisc/aviation/flightplanlist.h" #include "blackmisc/simulation/simulatedaircraftlist.h" #include "blackmisc/network/clientlist.h" @@ -235,6 +235,7 @@ namespace BlackMisc //! \cond PRIVATE template class BLACKMISC_EXPORT_DEFINE_TEMPLATE ICallsignObjectList; template class BLACKMISC_EXPORT_DEFINE_TEMPLATE ICallsignObjectList; + template class BLACKMISC_EXPORT_DEFINE_TEMPLATE ICallsignObjectList; template class BLACKMISC_EXPORT_DEFINE_TEMPLATE ICallsignObjectList; template class BLACKMISC_EXPORT_DEFINE_TEMPLATE ICallsignObjectList; //! \endcond diff --git a/src/blackmisc/aviation/callsignobjectlist.h b/src/blackmisc/aviation/callsignobjectlist.h index 642ef5736..ffddb8745 100644 --- a/src/blackmisc/aviation/callsignobjectlist.h +++ b/src/blackmisc/aviation/callsignobjectlist.h @@ -25,6 +25,8 @@ namespace BlackMisc class CAircraftSituationList; class CAtcStation; class CAtcStationList; + class CFlightPlan; + class CFlightPlanList; } namespace Simulation @@ -111,6 +113,7 @@ namespace BlackMisc //! \cond PRIVATE extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE ICallsignObjectList; extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE ICallsignObjectList; + extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE ICallsignObjectList; extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE ICallsignObjectList; extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE ICallsignObjectList; //! \endcond diff --git a/src/blackmisc/aviation/flightplanlist.cpp b/src/blackmisc/aviation/flightplanlist.cpp new file mode 100644 index 000000000..77adb2200 --- /dev/null +++ b/src/blackmisc/aviation/flightplanlist.cpp @@ -0,0 +1,30 @@ +/* Copyright (C) 2017 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "flightplanlist.h" +#include "blackmisc/compare.h" +#include "blackmisc/iterator.h" +#include "blackmisc/metaclassprivate.h" +#include "blackmisc/predicates.h" +#include "blackmisc/range.h" + +#include +#include + +namespace BlackMisc +{ + namespace Aviation + { + CFlightPlanList::CFlightPlanList() { } + + CFlightPlanList::CFlightPlanList(const CSequence &other) : + CSequence(other) + { } + } // namespace +} // namespace diff --git a/src/blackmisc/aviation/flightplanlist.h b/src/blackmisc/aviation/flightplanlist.h new file mode 100644 index 000000000..321fa3727 --- /dev/null +++ b/src/blackmisc/aviation/flightplanlist.h @@ -0,0 +1,49 @@ +/* Copyright (C) 2017 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKMISC_AVIATION_FLIGHTPLANLIST_H +#define BLACKMISC_AVIATION_FLIGHTPLANLIST_H + +#include "blackmisc/aviation/flightplan.h" +#include "blackmisc/aviation/callsignobjectlist.h" +#include "blackmisc/blackmiscexport.h" +#include "blackmisc/collection.h" +#include "blackmisc/sequence.h" +#include "blackmisc/variant.h" +#include + +namespace BlackMisc +{ + namespace Aviation + { + //! Value object for a list of flight plans. + class BLACKMISC_EXPORT CFlightPlanList : + public CSequence, + public ICallsignObjectList, + public Mixin::MetaType + { + public: + BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CFlightPlanList) + + //! Default constructor. + CFlightPlanList(); + + //! Construct from a base class object. + CFlightPlanList(const CSequence &other); + }; + } //namespace +} // namespace + +Q_DECLARE_METATYPE(BlackMisc::Aviation::CFlightPlanList) +Q_DECLARE_METATYPE(BlackMisc::CCollection) +Q_DECLARE_METATYPE(BlackMisc::CSequence) + +#endif //guard diff --git a/src/blackmisc/aviation/registermetadataaviation.cpp b/src/blackmisc/aviation/registermetadataaviation.cpp index 5a34ae824..36be6562e 100644 --- a/src/blackmisc/aviation/registermetadataaviation.cpp +++ b/src/blackmisc/aviation/registermetadataaviation.cpp @@ -40,6 +40,7 @@ namespace BlackMisc CCallsignSet::registerMetadata(); CComSystem::registerMetadata(); CFlightPlan::registerMetadata(); + CFlightPlanList::registerMetadata(); CHeading::registerMetadata(); CInformationMessage::registerMetadata(); CLivery::registerMetadata();