You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
476 B
24 lines
476 B
/* PlipMemory.h |
|
* |
|
* An interface representing some type of memory. |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <cstdint> |
|
|
|
namespace Plip { |
|
class PlipMemory { |
|
public: |
|
uint8_t operator[] (uint32_t offset) { |
|
return GetByte(offset); |
|
}; |
|
|
|
virtual uint8_t GetByte(uint32_t address) = 0; |
|
virtual uint32_t GetLength() = 0; |
|
virtual void SetByte(uint32_t address, uint8_t value) = 0; |
|
|
|
protected: |
|
PlipMemory() = default; |
|
}; |
|
}
|
|
|