Public Member Functions | Protected Member Functions | Friends | List of all members
openmsx::Pluggable Class Referenceabstract

#include <Pluggable.hh>

Inheritance diagram for openmsx::Pluggable:
Inheritance graph

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.
ConnectorgetConnector () 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)


class Connector

Detailed Description

Definition at line 11 of file Pluggable.hh.

Constructor & Destructor Documentation

◆ ~Pluggable()

virtual openmsx::Pluggable::~Pluggable ( )

◆ Pluggable()

openmsx::Pluggable::Pluggable ( )

Definition at line 9 of file

References setConnector().

Member Function Documentation

◆ getClass()

virtual std::string_view openmsx::Pluggable::getClass ( ) const
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().

◆ getConnector()

Connector * openmsx::Pluggable::getConnector ( ) const

◆ getDescription()

virtual std::string_view openmsx::Pluggable::getDescription ( ) const
pure virtual

◆ getName()

std::string_view openmsx::Pluggable::getName ( ) const

◆ isPluggedIn()

bool openmsx::Pluggable::isPluggedIn ( ) const

◆ plug()

void openmsx::Pluggable::plug ( Connector connector,
EmuTime::param  time 

This method is called when this pluggable is inserted in a connector.


Definition at line 19 of file

References openmsx::Connector::getClass(), getClass(), openmsx::Connector::getName(), getName(), plugHelper(), and setConnector().

Referenced by openmsx::Connector::plug().

◆ plugHelper()

virtual void openmsx::Pluggable::plugHelper ( Connector newConnector,
EmuTime::param  time 
protectedpure virtual

◆ setConnector()

void openmsx::Pluggable::setConnector ( Connector conn)

◆ 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

References setConnector(), unplugHelper(), and UNREACHABLE.

Referenced by openmsx::Connector::unplug().

◆ unplugHelper()

virtual void openmsx::Pluggable::unplugHelper ( EmuTime::param  time)
protectedpure virtual

Friends And Related Symbol Documentation

◆ Connector

friend class Connector

Definition at line 57 of file Pluggable.hh.

The documentation for this class was generated from the following files: