openMSX
|
#include <Pluggable.hh>
Public Member Functions | |
virtual | ~Pluggable ()=default |
virtual std::string_view | getName () const |
Name used to identify this pluggable. | |
virtual std::string_view | getClass () const =0 |
A pluggable belongs to a certain class. | |
virtual std::string_view | getDescription () const =0 |
Description for this pluggable. | |
void | plug (Connector &connector, EmuTime::param time) |
This method is called when this pluggable is inserted in a connector. | |
void | unplug (EmuTime::param time) |
This method is called when this pluggable is removed from a connector. | |
Connector * | getConnector () const |
Get the connector this Pluggable is plugged into. | |
bool | isPluggedIn () const |
Returns true if this pluggable is currently plugged into a connector. | |
Protected Member Functions | |
Pluggable () | |
virtual void | plugHelper (Connector &newConnector, EmuTime::param time)=0 |
virtual void | unplugHelper (EmuTime::param time)=0 |
void | setConnector (Connector *conn) |
Friends | |
class | Connector |
Definition at line 11 of file Pluggable.hh.
|
virtualdefault |
|
protected |
Definition at line 9 of file Pluggable.cc.
References setConnector().
|
pure virtual |
A pluggable belongs to a certain class.
A pluggable only fits in connectors of the same class.
Implemented in openmsx::CassetteDevice, openmsx::JoystickDevice, openmsx::PrinterPortDevice, openmsx::MidiInDevice, openmsx::MidiOutDevice, openmsx::RS232Device, openmsx::AudioInputDevice, and openmsx::Y8950KeyboardDevice.
Referenced by plug().
|
inline |
Get the connector this Pluggable is plugged into.
Returns nullptr if this Pluggable is not plugged.
Definition at line 43 of file Pluggable.hh.
Referenced by isPluggedIn(), openmsx::ArkanoidPad::serialize(), openmsx::JoyTap::serialize(), openmsx::MSXJoystick::serialize(), openmsx::Paddle::serialize(), openmsx::Touchpad::serialize(), openmsx::Trackball::serialize(), openmsx::MidiInReader::signal(), openmsx::MidiInALSA::signal(), openmsx::RS232Net::signal(), openmsx::RS232Tester::signal(), and openmsx::CassettePlayer::~CassettePlayer().
|
pure virtual |
Description for this pluggable.
Implemented in openmsx::CassettePlayer, openmsx::DummyCassetteDevice, openmsx::DummyPrinterPortDevice, openmsx::CircuitDesignerRDDongle, openmsx::DummyJoystick, openmsx::JoyTap, openmsx::MagicKey, openmsx::NinjaTap, openmsx::SETetrisDongle, openmsx::ImagePrinterMSX, openmsx::ImagePrinterEpson, openmsx::PrinterPortLogger, openmsx::PrinterPortSimpl, openmsx::DummyMidiInDevice, openmsx::DummyMidiOutDevice, openmsx::DummyRS232Device, openmsx::MidiInReader, openmsx::MidiOutLogger, openmsx::MidiOutALSA, openmsx::MidiInALSA, openmsx::RS232Net, openmsx::RS232Tester, openmsx::DummyAudioInputDevice, openmsx::DummyY8950KeyboardDevice, and openmsx::WavAudioInput.
|
virtual |
Name used to identify this pluggable.
Reimplemented in openmsx::CassettePlayer, openmsx::CircuitDesignerRDDongle, openmsx::JoyTap, openmsx::MagicKey, openmsx::SETetrisDongle, openmsx::ImagePrinterMSX, openmsx::ImagePrinterEpson, openmsx::PrinterPortLogger, openmsx::PrinterPortSimpl, openmsx::MidiInReader, openmsx::MidiOutLogger, openmsx::MidiOutALSA, openmsx::MidiInALSA, openmsx::RS232Net, openmsx::RS232Tester, and openmsx::WavAudioInput.
Definition at line 14 of file Pluggable.cc.
Referenced by openmsx::PluggingController::findPluggable(), plug(), and openmsx::Connector::serialize().
|
inline |
Returns true if this pluggable is currently plugged into a connector.
The method getConnector() can also be used, but this is more descriptive.
Definition at line 49 of file Pluggable.hh.
References getConnector().
Referenced by openmsx::ArkanoidPad::serialize(), openmsx::JoyMega::serialize(), openmsx::JoyTap::serialize(), openmsx::Mouse::serialize(), openmsx::MSXJoystick::serialize(), openmsx::Paddle::serialize(), openmsx::Touchpad::serialize(), openmsx::Trackball::serialize(), openmsx::PrinterPortSimpl::serialize(), openmsx::ArkanoidPad::~ArkanoidPad(), openmsx::JoyMega::~JoyMega(), openmsx::Mouse::~Mouse(), openmsx::MSXJoystick::~MSXJoystick(), openmsx::Paddle::~Paddle(), openmsx::Touchpad::~Touchpad(), and openmsx::Trackball::~Trackball().
void openmsx::Pluggable::plug | ( | Connector & | connector, |
EmuTime::param | time | ||
) |
This method is called when this pluggable is inserted in a connector.
PlugException |
Definition at line 19 of file Pluggable.cc.
References openmsx::Connector::getClass(), getClass(), openmsx::Connector::getName(), getName(), plugHelper(), and setConnector().
Referenced by openmsx::Connector::plug().
|
protectedpure virtual |
Implemented in openmsx::CassettePlayer, openmsx::DummyCassetteDevice, openmsx::DummyPrinterPortDevice, openmsx::CircuitDesignerRDDongle, openmsx::DummyJoystick, openmsx::JoyTap, openmsx::MagicKey, openmsx::NinjaTap, openmsx::SETetrisDongle, openmsx::PrinterCore, openmsx::PrinterPortLogger, openmsx::PrinterPortSimpl, openmsx::DummyMidiInDevice, openmsx::DummyMidiOutDevice, openmsx::DummyRS232Device, openmsx::MidiInReader, openmsx::MidiOutLogger, openmsx::MidiOutALSA, openmsx::MidiInALSA, openmsx::RS232Net, openmsx::RS232Tester, openmsx::DummyAudioInputDevice, openmsx::DummyY8950KeyboardDevice, and openmsx::WavAudioInput.
Referenced by plug().
|
inlineprotected |
Definition at line 58 of file Pluggable.hh.
Referenced by plug(), Pluggable(), openmsx::MidiInReader::plugHelper(), openmsx::MidiInALSA::plugHelper(), openmsx::RS232Net::plugHelper(), openmsx::RS232Tester::plugHelper(), openmsx::Connector::serialize(), and unplug().
void openmsx::Pluggable::unplug | ( | EmuTime::param | time | ) |
This method is called when this pluggable is removed from a connector.
Definition at line 31 of file Pluggable.cc.
References setConnector(), unplugHelper(), and UNREACHABLE.
Referenced by openmsx::Connector::unplug().
|
protectedpure virtual |
Implemented in openmsx::CassettePlayer, openmsx::DummyCassetteDevice, openmsx::DummyPrinterPortDevice, openmsx::CircuitDesignerRDDongle, openmsx::DummyJoystick, openmsx::JoyTap, openmsx::MagicKey, openmsx::SETetrisDongle, openmsx::PrinterCore, openmsx::PrinterPortLogger, openmsx::PrinterPortSimpl, openmsx::DummyMidiInDevice, openmsx::DummyMidiOutDevice, openmsx::DummyRS232Device, openmsx::MidiInReader, openmsx::MidiOutLogger, openmsx::MidiOutALSA, openmsx::MidiInALSA, openmsx::RS232Net, openmsx::RS232Tester, openmsx::DummyAudioInputDevice, openmsx::DummyY8950KeyboardDevice, and openmsx::WavAudioInput.
Referenced by unplug().
|
friend |
Definition at line 57 of file Pluggable.hh.