| e8555c89 Andy McCall |
1 |
#ifndef MSXMULTIIODEVICE_HH |
| 2 |
#define MSXMULTIIODEVICE_HH |
| 3 |
|
| 4 |
#include "MSXMultiDevice.hh" |
| 5 |
#include <vector> |
| 6 |
|
| 7 |
namespace openmsx { |
| 8 |
|
| 9 |
class MSXMultiIODevice final : public MSXMultiDevice |
| 10 |
{ |
| 11 |
public: |
| 12 |
using Devices = std::vector<MSXDevice*>; |
| 13 |
|
| 14 |
explicit MSXMultiIODevice(HardwareConfig& hwConf); |
| 15 |
~MSXMultiIODevice() override; |
| 16 |
|
| 17 |
void addDevice(MSXDevice* device); |
| 18 |
void removeDevice(MSXDevice* device); |
| 19 |
[[nodiscard]] Devices& getDevices() { return devices; } |
| 20 |
|
| 21 |
|
| 22 |
[[nodiscard]] const std::string& getName() const override; |
| 23 |
void getNameList(TclObject& result) const override; |
| 24 |
[[nodiscard]] uint8_t readIO(uint16_t port, EmuTime time) override; |
| 25 |
[[nodiscard]] uint8_t peekIO(uint16_t port, EmuTime time) const override; |
| 26 |
void writeIO(uint16_t port, uint8_t value, EmuTime time) override; |
| 27 |
|
| 28 |
private: |
| 29 |
Devices devices; |
| 30 |
}; |
| 31 |
|
| 32 |
} |
| 33 |
|
| 34 |
#endif |