mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
|
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
|
|
|
|
#include "blackmisc/simulation/settings/xswiftbussettingsqtfree.inc"
|
|
#include "settings.h"
|
|
#include <string>
|
|
|
|
using namespace BlackMisc::Simulation::Settings;
|
|
|
|
namespace XSwiftBus
|
|
{
|
|
CSettings::CSettings() : CXSwiftBusSettingsQtFree()
|
|
{
|
|
// void
|
|
}
|
|
|
|
CSettings CSettingsProvider::getSettings() const
|
|
{
|
|
std::lock_guard<std::mutex> l(m_settingsMutex);
|
|
return m_pluginSettings;
|
|
}
|
|
|
|
void CSettingsProvider::setSettings(const CSettings &settings)
|
|
{
|
|
std::lock_guard<std::mutex> l(m_settingsMutex);
|
|
m_pluginSettings = settings;
|
|
}
|
|
|
|
CSettingsAware::CSettingsAware(CSettingsProvider *provider) : m_provider(provider)
|
|
{
|
|
// void
|
|
}
|
|
|
|
CSettings CSettingsAware::getSettings() const
|
|
{
|
|
return m_provider->getSettings();
|
|
}
|
|
|
|
void CSettingsAware::setSettings(const CSettings &settings)
|
|
{
|
|
m_provider->setSettings(settings);
|
|
}
|
|
|
|
const CConfig &CSettingsAware::getConfig() const
|
|
{
|
|
return m_provider->getConfig();
|
|
}
|
|
|
|
bool CSettingsAware::writeConfig(bool tcas, bool debug)
|
|
{
|
|
return m_provider->writeConfig(tcas, debug);
|
|
}
|
|
|
|
} // ns
|