Remove the concept of template_info and revert to structure_name alone.

This commit is contained in:
Mike Auty
2015-01-04 04:27:52 +00:00
parent 15b2f6f717
commit 446536d789
4 changed files with 58 additions and 42 deletions
+2 -3
View File
@@ -52,12 +52,11 @@ class ObjectInformation(ReadOnlyInformation):
class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta):
""" A base object required to be the ancestor of every object used in volatility """
def __init__(self, context, object_info, template_info):
def __init__(self, context, structure_name, object_info, **kwargs):
# Since objects are likely to be instantiated often,
# we're only checking that context, offset and parent
# Everything else may be wrong, but that will get caught later on
self._type_check(context, context_module.ContextInterface)
self._type_check(template_info, ReadOnlyInformation)
self._type_check(object_info, ObjectInformation)
# Add an empty dictionary at the start to allow objects to add their own data to the volinfo object
@@ -66,7 +65,7 @@ class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta):
# This allows objects to MASSIVELY MESS with their own internal representation!!!
# Changes to offset, structure_name, etc should NEVER be done
#
self._volinfo = collections.ChainMap({}, object_info, template_info)
self._volinfo = collections.ChainMap({}, object_info, {'structure_name': structure_name}, kwargs)
self._context = context
@property