|
openMSX
|
Represents something you can plug devices into. More...
#include <Connector.hh>


Public Member Functions | |
| const std::string & | getName () const |
| Name that identifies this connector. | |
| virtual const std::string | getDescription () const =0 |
| Get a description for this connector. | |
| virtual string_ref | getClass () const =0 |
| A Connector belong to a certain class. | |
| virtual void | plug (Pluggable &device, EmuTime::param time) |
| This plugs a Pluggable in this Connector. | |
| virtual void | unplug (EmuTime::param time) |
| This unplugs the currently inserted Pluggable from this Connector. | |
| Pluggable & | getPlugged () const |
| Returns the Pluggable currently plugged in. | |
| PluggingController & | getPluggingController () const |
| template<typename Archive > | |
| void | serialize (Archive &ar, unsigned version) |
Protected Member Functions | |
| Connector (PluggingController &pluggingController, string_ref name, std::unique_ptr< Pluggable > dummy) | |
| Creates a new Connector. | |
| virtual | ~Connector () |
Additional Inherited Members |
Represents something you can plug devices into.
Examples are a joystick port, a printer port, a MIDI port etc. When there is not an actual Pluggable plugged in, a dummy Pluggable is used.
Definition at line 21 of file Connector.hh.
|
protected |
Creates a new Connector.
| pluggingController | PluggingController. |
| name | Name that identifies this connector. |
| dummy | Dummy Pluggable whose class matches this Connector. |
Definition at line 9 of file Connector.cc.
References openmsx::PluggingController::registerConnector().
|
protectedvirtual |
Definition at line 19 of file Connector.cc.
References openmsx::PluggingController::unregisterConnector().
|
pure virtual |
A Connector belong to a certain class.
Only Pluggables of this class can be plugged in this Connector.
Implemented in openmsx::CassettePort, openmsx::JoystickPort, openmsx::MidiInConnector, openmsx::RS232Connector, openmsx::Y8950KeyboardConnector, openmsx::MidiOutConnector, and openmsx::AudioInputConnector.
Referenced by openmsx::Pluggable::plug().
|
pure virtual |
Get a description for this connector.
Implemented in openmsx::CassettePort, openmsx::JoystickPort, openmsx::MidiInConnector, openmsx::RS232Connector, openmsx::Y8950KeyboardConnector, openmsx::MidiOutConnector, and openmsx::AudioInputConnector.
| const std::string & openmsx::Connector::getName | ( | ) | const |
Name that identifies this connector.
Definition at line 24 of file Connector.cc.
Referenced by openmsx::Pluggable::plug(), openmsx::PluggingController::registerConnector(), and openmsx::PluggingController::unregisterConnector().
| Pluggable & openmsx::Connector::getPlugged | ( | ) | const |
Returns the Pluggable currently plugged in.
Definition at line 41 of file Connector.cc.
Referenced by openmsx::AudioInputConnector::getPluggedAudioDev(), openmsx::JoystickPort::getPluggedJoyDev(), openmsx::Y8950KeyboardConnector::getPluggedKeyb(), openmsx::MidiInConnector::getPluggedMidiInDev(), openmsx::MidiOutConnector::getPluggedMidiOutDev(), openmsx::MSXPrinterPort::getPluggedPrintDev(), and openmsx::RS232Connector::getPluggedRS232Dev().
|
inline |
Definition at line 59 of file Connector.hh.
Referenced by openmsx::CassettePort::CassettePort().
|
virtual |
This plugs a Pluggable in this Connector.
The default implementation is ok.
| PlugException |
Reimplemented in openmsx::JoystickPort, and openmsx::Y8950KeyboardConnector.
Definition at line 29 of file Connector.cc.
References openmsx::Pluggable::plug().
| void openmsx::Connector::serialize | ( | Archive & | ar, |
| unsigned | version | ||
| ) |
Reimplemented in openmsx::CassettePort, openmsx::JoystickPort, openmsx::RS232Connector, openmsx::MidiOutConnector, openmsx::MidiInConnector, openmsx::Y8950KeyboardConnector, and openmsx::AudioInputConnector.
Definition at line 47 of file Connector.cc.
References openmsx::PluggingController::findPluggable(), openmsx::PluggingController::getCliComm(), openmsx::Pluggable::getName(), openmsx::CliComm::printWarning(), and openmsx::Pluggable::setConnector().
|
virtual |
This unplugs the currently inserted Pluggable from this Connector.
It is replaced by the dummy Pluggable provided by the concrete Connector subclass.
Reimplemented in openmsx::CassettePort.
Definition at line 35 of file Connector.cc.
References openmsx::Pluggable::unplug().
Referenced by openmsx::UnplugCmd::execute().
1.8.1.2