Rework config system yet again, and start filling in some of the requirements.

This commit is contained in:
Mike Auty
2015-04-09 15:56:57 -05:00
parent 3d00956951
commit a85bcb9e58
8 changed files with 123 additions and 59 deletions
+12 -1
View File
@@ -59,10 +59,21 @@ class Context(interfaces.context.ContextInterface):
interfaces.context.ContextInterface.__init__(self)
self._symbol_space = symbols.SymbolSpace(natives)
self._memory = layers.Memory()
self.config = config.Config()
self._config = config.ConfigGroup(name = 'volatility')
# ## Symbol Space Functions
@property
def config(self):
"""Returns the configuration object for this context"""
return self._config
@config.setter
def config(self, value):
if not isinstance(value, config.ConfigGroup):
raise TypeError("Configuration must of type ConfigGroup")
self._config = value
@property
def symbol_space(self):
"""The space of all symbols that can be accessed within this context.