mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T709 Encapsulate the CSettingsProvider pointer in a CSettingsAware base class.
This commit is contained in:
@@ -48,6 +48,26 @@ namespace XSwiftBus
|
||||
mutable std::mutex m_settingsMutex;
|
||||
CSettings m_pluginSettings; //!< owner of the settings
|
||||
};
|
||||
|
||||
//! Something having access to the settings
|
||||
class CSettingsAware
|
||||
{
|
||||
protected:
|
||||
//! Constructor
|
||||
CSettingsAware(CSettingsProvider *provider);
|
||||
|
||||
//! Destructor
|
||||
~CSettingsAware() = default;
|
||||
|
||||
//! \copydoc CSettingsProvider::getSettings
|
||||
CSettings getSettings() const;
|
||||
|
||||
//! \copydoc CSettingsProvider::setSettings
|
||||
void setSettings(const CSettings &settings);
|
||||
|
||||
private:
|
||||
CSettingsProvider *m_provider = nullptr;
|
||||
};
|
||||
} // ns
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user