Add in UnresolvedTemplate type.

This template type allows objects that have not been able to be resolved
to exist within the symbol system.  It emits a debug message on creation
so that intermediate format developers can identify potential issues,
but does not raise an exception so as to allow partial tables to be
used.

If the UnresolvedTemplate is called (to create an object) before the
symbol has been added to the symbolspace, it will fail with a
SymbolError (as thrown by the individual SymbolTable).  For this reason,
the class has been made private to the SymbolSpace class to prevent
unexpected use.
This commit is contained in:
Mike Auty
2016-10-30 16:54:12 +00:00
parent 287baeb03a
commit d1b58143fe
3 changed files with 73 additions and 4 deletions
@@ -132,6 +132,30 @@ class Template(validity.ValidityRoutines):
"""Returns a volatility information object, much like the ObjectInterface provides"""
return ReadOnlyMapping(self._vol)
@property
def children(self):
"""A function that returns a list of child templates of a template
This is used to traverse the template tree
"""
return []
@property
@abstractmethod
def size(self):
"""Returns the size of the template"""
@abstractmethod
def relative_child_offset(self, child):
"""A function that returns the relative offset of a child from its parent offset
This may throw exceptions including ChildNotFoundException and NotImplementedError
"""
@abstractmethod
def replace_child(self, old_child, new_child):
"""A function for replacing one child with another"""
def update_vol(self, **new_arguments):
"""Updates the keyword arguments"""
self._vol.update(new_arguments)