diff --git a/src/blackmisc/blackmisc.pro b/src/blackmisc/blackmisc.pro index 3b25870bb..fb9954ba7 100644 --- a/src/blackmisc/blackmisc.pro +++ b/src/blackmisc/blackmisc.pro @@ -24,7 +24,10 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \ translations/blackmisc_i18n_en.ts HEADERS += *.h +HEADERS += $$PWD/simulation/*.h SOURCES += *.cpp +SOURCES += $$PWD/simulation/*.cpp + DESTDIR = ../../lib OTHER_FILES += $$TRANSLATIONS readme.txt diff --git a/src/blackmisc/blackmiscallvalueclasses.h b/src/blackmisc/blackmiscallvalueclasses.h index 6eb94c429..c84c8469a 100644 --- a/src/blackmisc/blackmiscallvalueclasses.h +++ b/src/blackmisc/blackmiscallvalueclasses.h @@ -1,7 +1,13 @@ -/* Copyright (C) 2013 VATSIM Community / contributors - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* Copyright (C) 2013 + * 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_ALLVALUECLASSES_H #define BLACKMISC_ALLVALUECLASSES_H @@ -16,6 +22,7 @@ #include "blackmisc/statusmessage.h" #include "blackmisc/audioallclasses.h" #include "blackmisc/variantlist.h" +#include "blackmisc/simulation/simulationallclasses.h" #include "hotkeyfunction.h" #endif // guard diff --git a/src/blackmisc/blackmiscfreefunctions.cpp b/src/blackmisc/blackmiscfreefunctions.cpp index 0ee67d41b..5cb717261 100644 --- a/src/blackmisc/blackmiscfreefunctions.cpp +++ b/src/blackmisc/blackmiscfreefunctions.cpp @@ -21,6 +21,7 @@ #include "namevariantpairlist.h" #include "variant.h" #include "statusmessagelist.h" +#include "pixmap.h" #include "iconlist.h" #include "eventallclasses.h" #include @@ -111,6 +112,7 @@ void BlackMisc::registerMetadata() CHotkeyFunction::registerMetadata(); CLogCategory::registerMetadata(); CLogCategoryList::registerMetadata(); + CPixmap::registerMetadata(); // sub namespaces PhysicalQuantities::registerMetadata(); @@ -119,6 +121,7 @@ void BlackMisc::registerMetadata() Geo::registerMetadata(); Network::registerMetadata(); Settings::registerMetadata(); + Simulation::registerMetadata(); Audio::registerMetadata(); Hardware::registerMetadata(); Event::registerMetadata(); diff --git a/src/blackmisc/blackmiscfreefunctions.h b/src/blackmisc/blackmiscfreefunctions.h index beaecc1cd..ac837f54b 100644 --- a/src/blackmisc/blackmiscfreefunctions.h +++ b/src/blackmisc/blackmiscfreefunctions.h @@ -96,6 +96,12 @@ namespace BlackMisc void registerMetadata(); } + namespace Simulation + { + //! Register metadata for Simulation + void registerMetadata(); + } + //! Register all relevant metadata in BlackMisc void registerMetadata(); @@ -164,7 +170,7 @@ namespace BlackMisc //! Own implementation of std::make_unique, a C++14 feature not provided by GCC in C++11 mode template - std::unique_ptr make_unique(Args&&... args) + std::unique_ptr make_unique(Args &&... args) { return std::unique_ptr(new T(std::forward(args)...)); } diff --git a/src/blackmisc/blackmiscfreefunctions_nwmeta.cpp b/src/blackmisc/blackmiscfreefunctions_nwmeta.cpp index b67471e5d..d1b32015e 100644 --- a/src/blackmisc/blackmiscfreefunctions_nwmeta.cpp +++ b/src/blackmisc/blackmiscfreefunctions_nwmeta.cpp @@ -26,8 +26,6 @@ void BlackMisc::Network::registerMetadata() CTextMessageList::registerMetadata(); CClient::registerMetadata(); CClientList::registerMetadata(); - CAircraftModel::registerMetadata(); - CAircraftModelList::registerMetadata(); CVoiceCapabilities::registerMetadata(); CAircraftMapping::registerMetadata(); CAircraftMappingList::registerMetadata(); diff --git a/src/blackmisc/blackmiscfreefunctions_simmeta.cpp b/src/blackmisc/blackmiscfreefunctions_simmeta.cpp new file mode 100644 index 000000000..7de2655f2 --- /dev/null +++ b/src/blackmisc/blackmiscfreefunctions_simmeta.cpp @@ -0,0 +1,25 @@ +/* Copyright (C) 2014 + * 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 "blackmiscfreefunctions.h" +#include "blackmisc/simulation/simulationallclasses.h" + +/* + * Metadata for simulation + * + * In a separate file to workaround a limitation of MinGW: + * http://stackoverflow.com/q/16596876/1639256 + */ +void BlackMisc::Simulation::registerMetadata() +{ + CSimulatedAircraft::registerMetadata(); + CSimulatedAircraftList::registerMetadata(); + CAircraftModel::registerMetadata(); + CAircraftModelList::registerMetadata(); +} diff --git a/src/blackmisc/networkallclasses.h b/src/blackmisc/networkallclasses.h index 56d54829c..cf45b0aa8 100644 --- a/src/blackmisc/networkallclasses.h +++ b/src/blackmisc/networkallclasses.h @@ -1,7 +1,13 @@ -/* Copyright (C) 2013 VATSIM Community / contributors - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* Copyright (C) 2013 + * 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_NETWORKALLCLASSES_H #define BLACKMISC_NETWORKALLCLASSES_H @@ -13,8 +19,6 @@ #include "blackmisc/nwclient.h" #include "blackmisc/nwclientlist.h" #include "blackmisc/nwvoicecapabilities.h" -#include "blackmisc/nwaircraftmodel.h" -#include "blackmisc/nwaircraftmodellist.h" #include "blackmisc/nwaircraftmapping.h" #include "blackmisc/nwaircraftmappinglist.h" diff --git a/src/blackmisc/propertyindex.h b/src/blackmisc/propertyindex.h index 7de0846ba..e683c9847 100644 --- a/src/blackmisc/propertyindex.h +++ b/src/blackmisc/propertyindex.h @@ -51,10 +51,11 @@ namespace BlackMisc GlobalIndexCUser = 4100, GlobalIndexCServer = 4200, GlobalIndexCAircraftModel = 4300, + GlobalIndexCSimulatedAircraft = 4400, + GlobalIndexCAircraftMapping = 4500, GlobalIndexCVoiceRoom = 5000, GlobalIndexCSettingKeyboardHotkey = 6000, - GlobalIndexCAircraftMapping = 7000, - GlobalIndexCAircraftCfgEntries = 7100, + GlobalIndexCAircraftCfgEntries = 7000, GlobalIndexAbuseMode = 20000 // property index abused as map key or otherwise }; diff --git a/src/blackmisc/simulation/simulationallclasses.h b/src/blackmisc/simulation/simulationallclasses.h index d849cecb4..474d30d41 100644 --- a/src/blackmisc/simulation/simulationallclasses.h +++ b/src/blackmisc/simulation/simulationallclasses.h @@ -13,6 +13,7 @@ #define BLACKMISC_SIMULATIONALLCLASSES_H #include "blackmisc/simulation/simulatedaircraft.h" +#include "blackmisc/simulation/simulatedaircraftlist.h" #include "blackmisc/simulation/aircraftmodel.h" #include "blackmisc/simulation/aircraftmodellist.h"