|
contur2
|
Abstract interface for linear addressable memory. More...
#include <i_memory.h>

Public Member Functions | |
| virtual | ~IMemory ()=default |
| virtual Result< Block > | read (MemoryAddress address) const =0 |
| Reads a Block from the given address. | |
| virtual Result< void > | write (MemoryAddress address, const Block &block)=0 |
| Writes a Block to the given address. | |
| virtual std::size_t | size () const noexcept=0 |
| Returns the total number of addressable cells. | |
| virtual void | clear ()=0 |
| Clears all memory cells to default (Nop) blocks. | |
Abstract interface for linear addressable memory.
Provides read/write access to Block-sized cells indexed by MemoryAddress. Implementations include PhysicalMemory (RAM simulation) and potential future wrappers (cached memory, protected memory, etc.).
Definition at line 18 of file i_memory.h.
|
virtualdefault |
|
pure virtual |
Clears all memory cells to default (Nop) blocks.
Implemented in contur::PhysicalMemory.
|
nodiscardpure virtual |
Reads a Block from the given address.
| address | The memory address to read from. |
Implemented in contur::PhysicalMemory.
|
nodiscardpure virtualnoexcept |
Returns the total number of addressable cells.
Implemented in contur::PhysicalMemory.
|
nodiscardpure virtual |
Writes a Block to the given address.
| address | The memory address to write to. |
| block | The Block to store. |
Implemented in contur::PhysicalMemory.