openMSX
SimpleDebuggable.hh
Go to the documentation of this file.
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 
13 {
14 public:
15  [[nodiscard]] unsigned getSize() const final;
16  [[nodiscard]] std::string_view getDescription() const final;
17 
18  [[nodiscard]] byte read(unsigned address) override;
19  [[nodiscard]] virtual byte read(unsigned address, EmuTime::param time);
20  void write(unsigned address, byte value) override;
21  virtual void write(unsigned address, byte value, EmuTime::param 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);
30 
31 private:
32  MSXMotherBoard& motherBoard;
33  const std::string name;
34  const static_string_view description;
35  const unsigned size;
36 };
37 
38 } // namespace openmsx
39 
40 #endif
openmsx::SimpleDebuggable::SimpleDebuggable
SimpleDebuggable(MSXMotherBoard &motherBoard, std::string name, static_string_view description, unsigned size)
Definition: SimpleDebuggable.cc:8
openmsx::SimpleDebuggable::getMotherBoard
MSXMotherBoard & getMotherBoard() const
Definition: SimpleDebuggable.hh:24
openmsx::SimpleDebuggable
Definition: SimpleDebuggable.hh:13
openmsx::SimpleDebuggable::~SimpleDebuggable
~SimpleDebuggable()
Definition: SimpleDebuggable.cc:19
openmsx::Debuggable
Definition: Debuggable.hh:10
openmsx::SimpleDebuggable::getName
const std::string & getName() const
Definition: SimpleDebuggable.hh:23
openmsx::MSXMotherBoard
Definition: MSXMotherBoard.hh:61
openmsx::SimpleDebuggable::write
void write(unsigned address, byte value) override
Definition: SimpleDebuggable.cc:44
static_string_view.hh
Debuggable.hh
openmsx::SimpleDebuggable::getDescription
std::string_view getDescription() const final
Definition: SimpleDebuggable.cc:29
static_string_view
static_string_view
Definition: static_string_view.hh:28
EmuTime.hh
openmsx::SimpleDebuggable::getSize
unsigned getSize() const final
Definition: SimpleDebuggable.cc:24
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::SimpleDebuggable::read
byte read(unsigned address) override
Definition: SimpleDebuggable.cc:34