openMSX
Public Member Functions | List of all members
openmsx::JoystickPort Class Referencefinal

#include <JoystickPort.hh>

Inheritance diagram for openmsx::JoystickPort:
Inheritance graph
[legend]
Collaboration diagram for openmsx::JoystickPort:
Collaboration graph
[legend]

Public Member Functions

 JoystickPort (PluggingController &pluggingController, std::string name, std::string description)
 
JoystickDevicegetPluggedJoyDev () const
 
const std::string getDescription () const override
 Get a description for this connector. More...
 
string_ref getClass () const override
 A Connector belong to a certain class. More...
 
void plug (Pluggable &device, EmuTime::param time) override
 This plugs a Pluggable in this Connector. More...
 
byte read (EmuTime::param time) override
 
void write (byte value, EmuTime::param time) override
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 
- Public Member Functions inherited from openmsx::JoystickPortIf
virtual ~JoystickPortIf ()=default
 
- Public Member Functions inherited from openmsx::Connector
 Connector (const Connector &)=delete
 
Connectoroperator= (const Connector &)=delete
 
const std::string & getName () const
 Name that identifies this connector. More...
 
virtual void unplug (EmuTime::param time)
 This unplugs the currently inserted Pluggable from this Connector. More...
 
PluggablegetPlugged () const
 Returns the Pluggable currently plugged in. More...
 
PluggingControllergetPluggingController () const
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::JoystickPortIf
 JoystickPortIf ()=default
 
- Protected Member Functions inherited from openmsx::Connector
 Connector (PluggingController &pluggingController, std::string name, std::unique_ptr< Pluggable > dummy)
 Creates a new Connector. More...
 
 ~Connector ()
 

Detailed Description

Definition at line 22 of file JoystickPort.hh.

Constructor & Destructor Documentation

◆ JoystickPort()

openmsx::JoystickPort::JoystickPort ( PluggingController pluggingController,
std::string  name,
std::string  description 
)

Definition at line 13 of file JoystickPort.cc.

Member Function Documentation

◆ getClass()

string_ref openmsx::JoystickPort::getClass ( ) const
overridevirtual

A Connector belong to a certain class.

Only Pluggables of this class can be plugged in this Connector.

Implements openmsx::Connector.

Definition at line 26 of file JoystickPort.cc.

◆ getDescription()

const string openmsx::JoystickPort::getDescription ( ) const
overridevirtual

Get a description for this connector.

Implements openmsx::Connector.

Definition at line 21 of file JoystickPort.cc.

◆ getPluggedJoyDev()

JoystickDevice & openmsx::JoystickPort::getPluggedJoyDev ( ) const

Definition at line 31 of file JoystickPort.cc.

Referenced by plug(), read(), and write().

◆ plug()

void openmsx::JoystickPort::plug ( Pluggable device,
EmuTime::param  time 
)
overridevirtual

This plugs a Pluggable in this Connector.

The default implementation is ok.

Exceptions
PlugException

Reimplemented from openmsx::Connector.

Definition at line 36 of file JoystickPort.cc.

References getPluggedJoyDev(), openmsx::Connector::plug(), and openmsx::JoystickDevice::write().

◆ read()

byte openmsx::JoystickPort::read ( EmuTime::param  time)
overridevirtual

Implements openmsx::JoystickPortIf.

Definition at line 42 of file JoystickPort.cc.

References getPluggedJoyDev(), and openmsx::JoystickDevice::read().

◆ serialize()

template<typename Archive >
void openmsx::JoystickPort::serialize ( Archive &  ar,
unsigned  version 
)

Definition at line 58 of file JoystickPort.cc.

References openmsx::Connector::getPluggingController().

◆ write()

void openmsx::JoystickPort::write ( byte  value,
EmuTime::param  time 
)
overridevirtual

Implements openmsx::JoystickPortIf.

Definition at line 47 of file JoystickPort.cc.

References getPluggedJoyDev(), and openmsx::JoystickDevice::write().


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