mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-10-01 05:54:58 +02:00
Add a validate method to all objects to allow for (optional) validation of data on construction.
This commit is contained in:
@@ -92,6 +92,12 @@ class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta):
|
||||
def write(self, value):
|
||||
"""Writes the new value into the format at the offset the object currently resides at"""
|
||||
|
||||
def validate(self):
|
||||
"""A method that can be overridden to validate this object. It does not return and its return value should not be used.
|
||||
|
||||
Raises InvalidDataException on failure to validate the data correctly.
|
||||
"""
|
||||
|
||||
def cast(self, new_type_name, **additional):
|
||||
"""Returns a new object at the offset and from the layer that the current object inhabits
|
||||
|
||||
|
||||
Reference in New Issue
Block a user