| e8555c89 Andy McCall |
1 |
#ifndef SIMPLEDEBUGGABLE_HH |
| 2 |
#define SIMPLEDEBUGGABLE_HH |
| 3 |
|
| 4 |
#include "Debuggable.hh" |
| 5 |
#include "EmuTime.hh" |
| 6 |
#include "static_string_view.hh" |
| 7 |
|
| 8 |
namespace openmsx { |
| 9 |
|
| 10 |
class MSXMotherBoard; |
| 11 |
|
| 12 |
class SimpleDebuggable : public Debuggable |
| 13 |
{ |
| 14 |
public: |
| 15 |
[[nodiscard]] unsigned getSize() const final; |
| 16 |
[[nodiscard]] std::string_view getDescription() const final; |
| 17 |
|
| 18 |
[[nodiscard]] uint8_t read(unsigned address) override; |
| 19 |
[[nodiscard]] virtual uint8_t read(unsigned address, EmuTime time); |
| 20 |
void write(unsigned address, uint8_t value) override; |
| 21 |
virtual void write(unsigned address, uint8_t value, EmuTime time); |
| 22 |
|
| 23 |
[[nodiscard]] const std::string& getName() const { return name; } |
| 24 |
[[nodiscard]] MSXMotherBoard& getMotherBoard() const { return motherBoard; } |
| 25 |
|
| 26 |
protected: |
| 27 |
SimpleDebuggable(MSXMotherBoard& motherBoard, std::string name, |
| 28 |
static_string_view description, unsigned size); |
| 29 |
~SimpleDebuggable(); |
| 30 |
|
| 31 |
private: |
| 32 |
MSXMotherBoard& motherBoard; |
| 33 |
const std::string name; |
| 34 |
const static_string_view description; |
| 35 |
const unsigned size; |
| 36 |
}; |
| 37 |
|
| 38 |
} |
| 39 |
|
| 40 |
#endif |