Refactor several configuration/requirement structures to avoid import loops.

This commit is contained in:
Mike Auty
2016-08-22 02:15:54 +01:00
parent eb5e3f69de
commit a1b9be74c7
5 changed files with 255 additions and 235 deletions
@@ -118,6 +118,8 @@ class DataLayerInterface(configuration.ConfigurableInterface, validity.ValidityR
"""Returns a list of Requirement objects for this type of layer"""
return []
# ## General scanning methods
def _pre_scan(self, context, min_address, max_address, progress_callback, scanner):
"""Prepares the scanner based on standard procedures shared between TranslationLayers and DataLayers"""
if progress_callback is not None:
@@ -205,6 +207,8 @@ class TranslationLayerInterface(DataLayerInterface, metaclass = ABCMeta):
self._context.memory.write(layer, mapped_offset, length)
current_offset += length
# ## Scan implementation with knowledge of pages
def scan(self, context, scanner, progress_callback = None, min_address = None, max_address = None):
"""Scans a Translation layer by chunk