mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
38 lines
1.4 KiB
C++
38 lines
1.4 KiB
C++
/* Copyright (C) 2016
|
|
* 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. 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 "matchingutils.h"
|
|
#include "blackmisc/aviation/logutils.h"
|
|
|
|
using namespace BlackMisc::Aviation;
|
|
|
|
namespace BlackMisc
|
|
{
|
|
namespace Simulation
|
|
{
|
|
void CMatchingUtils::addLogDetailsToList(CStatusMessageList *log, const CSimulatedAircraft &remoteAircraft, const QString &message, const CLogCategoryList &extraCategories, CStatusMessage::StatusSeverity s)
|
|
{
|
|
CLogUtilities::addLogDetailsToList(log, remoteAircraft.getCallsign(), message, extraCategories, s);
|
|
}
|
|
|
|
const CLogCategoryList &CMatchingUtils::defaultCategories()
|
|
{
|
|
static const CLogCategoryList cats({ CLogCategory::matching() });
|
|
return cats;
|
|
}
|
|
|
|
CLogCategoryList CMatchingUtils::categories(const CLogCategoryList &extraCategories)
|
|
{
|
|
if (extraCategories.isEmpty()) { return defaultCategories(); }
|
|
CLogCategoryList cats(defaultCategories());
|
|
cats.push_back(extraCategories);
|
|
return cats;
|
|
}
|
|
} // ns
|
|
} // ns
|