openMSX
FirmwareSwitch.hh
Go to the documentation of this file.
1 #ifndef FRONTSWITCH_HH
2 #define FRONTSWITCH_HH
3 
4 #include "DeviceConfig.hh"
5 #include "BooleanSetting.hh"
6 
7 namespace openmsx {
8 
10 {
11 public:
12  explicit FirmwareSwitch(const DeviceConfig& config);
14 
15  bool getStatus() const { return setting.getBoolean(); }
16 
17 private:
18  const DeviceConfig config;
19  BooleanSetting setting;
20 };
21 
22 } // namespace openmsx
23 
24 #endif
openmsx::DeviceConfig
Definition: DeviceConfig.hh:19
openmsx::FirmwareSwitch::FirmwareSwitch
FirmwareSwitch(const DeviceConfig &config)
Definition: FirmwareSwitch.cc:12
BooleanSetting.hh
openmsx::FirmwareSwitch::~FirmwareSwitch
~FirmwareSwitch()
Definition: FirmwareSwitch.cc:32
openmsx::FirmwareSwitch
Definition: FirmwareSwitch.hh:9
openmsx::BooleanSetting
Definition: BooleanSetting.hh:8
DeviceConfig.hh
openmsx::FirmwareSwitch::getStatus
bool getStatus() const
Definition: FirmwareSwitch.hh:15
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::BooleanSetting::getBoolean
bool getBoolean() const noexcept
Definition: BooleanSetting.hh:17