refs #364, refs #368 adjusted metadata registration and header files to reflect new classes

This commit is contained in:
Klaus Basan
2015-01-18 21:56:29 +01:00
parent d32e8fd12c
commit 799b640379
9 changed files with 63 additions and 15 deletions

View File

@@ -24,7 +24,10 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \
translations/blackmisc_i18n_en.ts translations/blackmisc_i18n_en.ts
HEADERS += *.h HEADERS += *.h
HEADERS += $$PWD/simulation/*.h
SOURCES += *.cpp SOURCES += *.cpp
SOURCES += $$PWD/simulation/*.cpp
DESTDIR = ../../lib DESTDIR = ../../lib
OTHER_FILES += $$TRANSLATIONS readme.txt OTHER_FILES += $$TRANSLATIONS readme.txt

View File

@@ -1,7 +1,13 @@
/* Copyright (C) 2013 VATSIM Community / contributors /* Copyright (C) 2013
* This Source Code Form is subject to the terms of the Mozilla Public * swift project Community / Contributors
* 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/. */ * 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 #ifndef BLACKMISC_ALLVALUECLASSES_H
#define BLACKMISC_ALLVALUECLASSES_H #define BLACKMISC_ALLVALUECLASSES_H
@@ -16,6 +22,7 @@
#include "blackmisc/statusmessage.h" #include "blackmisc/statusmessage.h"
#include "blackmisc/audioallclasses.h" #include "blackmisc/audioallclasses.h"
#include "blackmisc/variantlist.h" #include "blackmisc/variantlist.h"
#include "blackmisc/simulation/simulationallclasses.h"
#include "hotkeyfunction.h" #include "hotkeyfunction.h"
#endif // guard #endif // guard

View File

@@ -21,6 +21,7 @@
#include "namevariantpairlist.h" #include "namevariantpairlist.h"
#include "variant.h" #include "variant.h"
#include "statusmessagelist.h" #include "statusmessagelist.h"
#include "pixmap.h"
#include "iconlist.h" #include "iconlist.h"
#include "eventallclasses.h" #include "eventallclasses.h"
#include <QtNetwork/QHostInfo> #include <QtNetwork/QHostInfo>
@@ -111,6 +112,7 @@ void BlackMisc::registerMetadata()
CHotkeyFunction::registerMetadata(); CHotkeyFunction::registerMetadata();
CLogCategory::registerMetadata(); CLogCategory::registerMetadata();
CLogCategoryList::registerMetadata(); CLogCategoryList::registerMetadata();
CPixmap::registerMetadata();
// sub namespaces // sub namespaces
PhysicalQuantities::registerMetadata(); PhysicalQuantities::registerMetadata();
@@ -119,6 +121,7 @@ void BlackMisc::registerMetadata()
Geo::registerMetadata(); Geo::registerMetadata();
Network::registerMetadata(); Network::registerMetadata();
Settings::registerMetadata(); Settings::registerMetadata();
Simulation::registerMetadata();
Audio::registerMetadata(); Audio::registerMetadata();
Hardware::registerMetadata(); Hardware::registerMetadata();
Event::registerMetadata(); Event::registerMetadata();

View File

@@ -96,6 +96,12 @@ namespace BlackMisc
void registerMetadata(); void registerMetadata();
} }
namespace Simulation
{
//! Register metadata for Simulation
void registerMetadata();
}
//! Register all relevant metadata in BlackMisc //! Register all relevant metadata in BlackMisc
void registerMetadata(); 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 //! Own implementation of std::make_unique, a C++14 feature not provided by GCC in C++11 mode
template<typename T, typename... Args> template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args) std::unique_ptr<T> make_unique(Args &&... args)
{ {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
} }

View File

@@ -26,8 +26,6 @@ void BlackMisc::Network::registerMetadata()
CTextMessageList::registerMetadata(); CTextMessageList::registerMetadata();
CClient::registerMetadata(); CClient::registerMetadata();
CClientList::registerMetadata(); CClientList::registerMetadata();
CAircraftModel::registerMetadata();
CAircraftModelList::registerMetadata();
CVoiceCapabilities::registerMetadata(); CVoiceCapabilities::registerMetadata();
CAircraftMapping::registerMetadata(); CAircraftMapping::registerMetadata();
CAircraftMappingList::registerMetadata(); CAircraftMappingList::registerMetadata();

View File

@@ -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();
}

View File

@@ -1,7 +1,13 @@
/* Copyright (C) 2013 VATSIM Community / contributors /* Copyright (C) 2013
* This Source Code Form is subject to the terms of the Mozilla Public * swift project Community / Contributors
* 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/. */ * 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 #ifndef BLACKMISC_NETWORKALLCLASSES_H
#define BLACKMISC_NETWORKALLCLASSES_H #define BLACKMISC_NETWORKALLCLASSES_H
@@ -13,8 +19,6 @@
#include "blackmisc/nwclient.h" #include "blackmisc/nwclient.h"
#include "blackmisc/nwclientlist.h" #include "blackmisc/nwclientlist.h"
#include "blackmisc/nwvoicecapabilities.h" #include "blackmisc/nwvoicecapabilities.h"
#include "blackmisc/nwaircraftmodel.h"
#include "blackmisc/nwaircraftmodellist.h"
#include "blackmisc/nwaircraftmapping.h" #include "blackmisc/nwaircraftmapping.h"
#include "blackmisc/nwaircraftmappinglist.h" #include "blackmisc/nwaircraftmappinglist.h"

View File

@@ -51,10 +51,11 @@ namespace BlackMisc
GlobalIndexCUser = 4100, GlobalIndexCUser = 4100,
GlobalIndexCServer = 4200, GlobalIndexCServer = 4200,
GlobalIndexCAircraftModel = 4300, GlobalIndexCAircraftModel = 4300,
GlobalIndexCSimulatedAircraft = 4400,
GlobalIndexCAircraftMapping = 4500,
GlobalIndexCVoiceRoom = 5000, GlobalIndexCVoiceRoom = 5000,
GlobalIndexCSettingKeyboardHotkey = 6000, GlobalIndexCSettingKeyboardHotkey = 6000,
GlobalIndexCAircraftMapping = 7000, GlobalIndexCAircraftCfgEntries = 7000,
GlobalIndexCAircraftCfgEntries = 7100,
GlobalIndexAbuseMode = 20000 // property index abused as map key or otherwise GlobalIndexAbuseMode = 20000 // property index abused as map key or otherwise
}; };

View File

@@ -13,6 +13,7 @@
#define BLACKMISC_SIMULATIONALLCLASSES_H #define BLACKMISC_SIMULATIONALLCLASSES_H
#include "blackmisc/simulation/simulatedaircraft.h" #include "blackmisc/simulation/simulatedaircraft.h"
#include "blackmisc/simulation/simulatedaircraftlist.h"
#include "blackmisc/simulation/aircraftmodel.h" #include "blackmisc/simulation/aircraftmodel.h"
#include "blackmisc/simulation/aircraftmodellist.h" #include "blackmisc/simulation/aircraftmodellist.h"