diff options
| author | Brian Potchik <brian@vector35.com> | 2020-06-20 13:03:25 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2020-06-20 13:03:25 -0400 |
| commit | 3d9e96f84d781d1de57af895864d3183d2729a7a (patch) | |
| tree | 36cfb27213abce56ac75cd286c0eb534b70b1ab4 /python/settings.py | |
| parent | 18b85d4d33e61f002605f213623f96ac0fe7f321 (diff) | |
Add serialization support to the Settings Python API.
Diffstat (limited to 'python/settings.py')
| -rw-r--r-- | python/settings.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/settings.py b/python/settings.py index a83898af..d09a001a 100644 --- a/python/settings.py +++ b/python/settings.py @@ -200,6 +200,16 @@ class Settings(object): def serialize_schema(self): return core.BNSettingsSerializeSchema(self.handle) + def deserialize_settings(self, contents, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle + return core.BNDeserializeSettings(self.handle, contents, view, scope) + + def serialize_settings(self, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle + return core.BNSerializeSettings(self.handle, view, scope) + def copy_values_from(self, source, scope = SettingsScope.SettingsAutoScope): return core.BNSettingsCopyValuesFrom(self.handle, source.handle, scope) |
