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
byte read(unsigned address) override
MSXMotherBoard & getMotherBoard() const
const std::string & getName() const
std::string_view getDescription() const final
unsigned getSize() const final
void write(unsigned address, byte value) override
SimpleDebuggable(MSXMotherBoard &motherBoard, std::string name, static_string_view description, unsigned size)
static_string_view
This file implemented 3 utility functions:
Definition: Autofire.cc:5