GH-1223 fix override settings

They now work more like passthrough settings, except not passing through set and reset
This commit is contained in:
Petr Mrázek
2015-09-04 02:10:29 +02:00
parent 151a0ca11e
commit cd108fd029
8 changed files with 88 additions and 37 deletions

View File

@ -62,12 +62,13 @@ public:
virtual ~SettingsObject();
/*!
* Registers an override setting for the given original setting in this settings object
* gate decides if the passthrough (true) or the original (false) is used for value
*
* This will fail if there is already a setting with the same ID as
* the one that is being registered.
* \return A valid Setting shared pointer if successful.
*/
std::shared_ptr<Setting> registerOverride(std::shared_ptr<Setting> original);
std::shared_ptr<Setting> registerOverride(std::shared_ptr<Setting> original, std::shared_ptr<Setting> gate);
/*!
* Registers a passthorugh setting for the given original setting in this settings object