Construct and populate a structure from saved contents. Args: mem: memory manager instance address: source address Returns: populated structure instance
(cls, mem: QlMemoryManager, address: int)
| 42 | |
| 43 | @classmethod |
| 44 | def load_from(cls, mem: QlMemoryManager, address: int): |
| 45 | """Construct and populate a structure from saved contents. |
| 46 | |
| 47 | Args: |
| 48 | mem: memory manager instance |
| 49 | address: source address |
| 50 | |
| 51 | Returns: populated structure instance |
| 52 | """ |
| 53 | |
| 54 | data = mem.read(address, cls.sizeof()) |
| 55 | |
| 56 | return cls.from_buffer(data) |
| 57 | |
| 58 | @classmethod |
| 59 | def volatile_ref(cls, mem: QlMemoryManager, address: int): |