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
 
std::string_view getDescription () const override
 Get a description for this connector.
 
std::string_view getClass () const override
 A Connector belong to a certain class.
 
void plug (Pluggable &device, EmuTime::param time) override
 This plugs a Pluggable in this Connector.
 
uint8_t read (EmuTime::param time) override
 
void write (uint8_t 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
 
 Connector (Connector &&)=delete
 
Connectoroperator= (const Connector &)=delete
 
Connectoroperator= (Connector &&)=delete
 
const std::string & getName () const
 Name that identifies this connector.
 
virtual void unplug (EmuTime::param time)
 This unplugs the currently inserted Pluggable from this Connector.
 
PluggablegetPlugged () const
 Returns the Pluggable currently plugged in.
 
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.
 
 ~Connector ()
 

Detailed Description

Definition at line 23 of file JoystickPort.hh.

Constructor & Destructor Documentation

◆ JoystickPort()

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

Definition at line 11 of file JoystickPort.cc.

Member Function Documentation

◆ getClass()

std::string_view 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 23 of file JoystickPort.cc.

◆ getDescription()

std::string_view openmsx::JoystickPort::getDescription ( ) const
overridevirtual

Get a description for this connector.

Implements openmsx::Connector.

Definition at line 18 of file JoystickPort.cc.

◆ getPluggedJoyDev()

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

Definition at line 28 of file JoystickPort.cc.

References openmsx::Connector::getPlugged().

Referenced by plug(), and read().

◆ 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 33 of file JoystickPort.cc.

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

◆ read()

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

Implements openmsx::JoystickPortIf.

Definition at line 39 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 55 of file JoystickPort.cc.

References openmsx::Connector::getPluggingController().

◆ write()

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

Implements openmsx::JoystickPortIf.

Definition at line 44 of file JoystickPort.cc.


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