mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Ref T709, settings provider to get settings
* allows to use the provider without and overhead * single source, can be made threadsafe Signed-off-by: Klaus Basan <klaus.basan@klausbasan.de>
This commit is contained in:
committed by
Mat Sutcliffe
parent
7004e85117
commit
006fbc88ae
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "blackmisc/simulation/settings/xswiftbussettingsqtfree.h"
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
namespace XSwiftBus
|
||||
{
|
||||
@@ -30,6 +31,21 @@ namespace XSwiftBus
|
||||
virtual ~CSettings() {}
|
||||
};
|
||||
|
||||
//! Something owning the settings
|
||||
class ISettingsProvider
|
||||
{
|
||||
public:
|
||||
//! By value
|
||||
//! \threadsafe
|
||||
CSettings getSettings() const;
|
||||
|
||||
//! Set settings
|
||||
//! \threadsafe
|
||||
void setSettings(const CSettings &settings);
|
||||
|
||||
private:
|
||||
mutable std::mutex m_settingsMutex;
|
||||
CSettings m_pluginSettings; //!< owner of the settings
|
||||
};
|
||||
} // ns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user