openMSX
Classes | Public Member Functions | List of all members
openmsx::PluggingController Class Reference

Central administration of Connectors and Pluggables. More...

#include <PluggingController.hh>

Public Member Functions

 PluggingController (MSXMotherBoard &motherBoard)
 
 ~PluggingController ()
 
void registerConnector (Connector &connector)
 Connectors must be (un)registered.
 
void unregisterConnector (Connector &connector)
 
ConnectorfindConnector (std::string_view name) const
 Return the Connector with given name or nullptr if there is none with this name.
 
void registerPluggable (std::unique_ptr< Pluggable > pluggable)
 Add a Pluggable to the registry.
 
PluggablefindPluggable (std::string_view name) const
 Return the Pluggable with given name or nullptr if there is none with this name.
 
const auto & getConnectors () const
 
const auto & getPluggables () const
 
CliCommgetCliComm ()
 Access to the MSX specific CliComm, so that Connectors can get it.
 
EmuTime::param getCurrentTime () const
 Convenience method: get current time.
 

Detailed Description

Central administration of Connectors and Pluggables.

Definition at line 21 of file PluggingController.hh.

Constructor & Destructor Documentation

◆ PluggingController()

openmsx::PluggingController::PluggingController ( MSXMotherBoard motherBoard)
explicit

Definition at line 20 of file PluggingController.cc.

References openmsx::PluggableFactory::createAll().

◆ ~PluggingController()

openmsx::PluggingController::~PluggingController ( )

Definition at line 37 of file PluggingController.cc.

Member Function Documentation

◆ findConnector()

Connector * openmsx::PluggingController::findConnector ( std::string_view  name) const

Return the Connector with given name or nullptr if there is none with this name.

Definition at line 195 of file PluggingController.cc.

References end(), ranges::find(), and openmsx::Connector::getName().

◆ findPluggable()

Pluggable * openmsx::PluggingController::findPluggable ( std::string_view  name) const

Return the Pluggable with given name or nullptr if there is none with this name.

Definition at line 209 of file PluggingController.cc.

References end(), ranges::find(), and openmsx::Pluggable::getName().

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

◆ getCliComm()

CliComm & openmsx::PluggingController::getCliComm ( )

Access to the MSX specific CliComm, so that Connectors can get it.

Definition at line 223 of file PluggingController.cc.

References openmsx::MSXMotherBoard::getMSXCliComm().

Referenced by openmsx::PluggableFactory::createAll(), registerConnector(), openmsx::Connector::serialize(), and unregisterConnector().

◆ getConnectors()

const auto & openmsx::PluggingController::getConnectors ( ) const
inline

Definition at line 46 of file PluggingController.hh.

◆ getCurrentTime()

EmuTime::param openmsx::PluggingController::getCurrentTime ( ) const

Convenience method: get current time.

Definition at line 228 of file PluggingController.cc.

References openmsx::MSXMotherBoard::getCurrentTime().

Referenced by openmsx::JoyTap::serialize().

◆ getPluggables()

const auto & openmsx::PluggingController::getPluggables ( ) const
inline

Definition at line 47 of file PluggingController.hh.

Referenced by openmsx::ImGuiConnector::showMenu().

◆ registerConnector()

void openmsx::PluggingController::registerConnector ( Connector connector)

Connectors must be (un)registered.

Definition at line 49 of file PluggingController.cc.

References openmsx::CliComm::CONNECTOR, getCliComm(), openmsx::Connector::getName(), and openmsx::CliComm::update().

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

◆ registerPluggable()

void openmsx::PluggingController::registerPluggable ( std::unique_ptr< Pluggable pluggable)

Add a Pluggable to the registry.

Definition at line 63 of file PluggingController.cc.

Referenced by openmsx::CassettePort::CassettePort(), and openmsx::PluggableFactory::createAll().

◆ unregisterConnector()

void openmsx::PluggingController::unregisterConnector ( Connector connector)

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