openMSX
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
openmsx::Reactor Class Referencefinal

Contains the main loop of openMSX. More...

#include <Reactor.hh>

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

Public Types

using Board = std::unique_ptr< MSXMotherBoard >
 

Public Member Functions

 Reactor ()
 
void init ()
 
 ~Reactor ()
 
void run (CommandLineParser &parser)
 Main loop. More...
 
void enterMainLoop ()
 
RTSchedulergetRTScheduler ()
 
EventDistributorgetEventDistributor ()
 
GlobalCliCommgetGlobalCliComm ()
 
GlobalCommandControllergetGlobalCommandController ()
 
InputEventGeneratorgetInputEventGenerator ()
 
DisplaygetDisplay ()
 
MixergetMixer ()
 
DiskFactorygetDiskFactory ()
 
DiskManipulatorgetDiskManipulator ()
 
EnumSetting< int > & getMachineSetting ()
 
FilePoolgetFilePool ()
 
RomDatabasegetSoftwareDatabase ()
 
void switchMachine (const std::string &machine)
 
MSXMotherBoardgetMotherBoard () const
 
void block ()
 
void unblock ()
 
GlobalSettingsgetGlobalSettings ()
 
InfoCommandgetOpenMSXInfoCommand ()
 
CommandControllergetCommandController ()
 
CliCommgetCliComm ()
 
InterpretergetInterpreter ()
 
std::string getMachineID () const
 
Board createEmptyMotherBoard ()
 
void replaceBoard (MSXMotherBoard &oldBoard, Board newBoard)
 

Static Public Member Functions

static std::vector< std::string > getHwConfigs (string_view type)
 

Friends

class MachineCommand
 
class TestMachineCommand
 
class CreateMachineCommand
 
class DeleteMachineCommand
 
class ListMachinesCommand
 
class ActivateMachineCommand
 
class StoreMachineCommand
 
class RestoreMachineCommand
 

Detailed Description

Contains the main loop of openMSX.

openMSX is almost single threaded: the main thread does most of the work, we create additional threads only if we need blocking calls for communicating with peripherals. This class serializes all incoming requests so they can be handled by the main thread.

Definition at line 64 of file Reactor.hh.

Member Typedef Documentation

◆ Board

using openmsx::Reactor::Board = std::unique_ptr<MSXMotherBoard>

Definition at line 108 of file Reactor.hh.

Constructor & Destructor Documentation

◆ Reactor()

openmsx::Reactor::Reactor ( )

Definition at line 187 of file Reactor.cc.

◆ ~Reactor()

openmsx::Reactor::~Reactor ( )

Member Function Documentation

◆ block()

void openmsx::Reactor::block ( )

Definition at line 578 of file Reactor.cc.

Referenced by openmsx::MSXCPUInterface::doBreak(), and getFilePool().

◆ createEmptyMotherBoard()

Reactor::Board openmsx::Reactor::createEmptyMotherBoard ( )

◆ enterMainLoop()

void openmsx::Reactor::enterMainLoop ( )

◆ getCliComm()

CliComm & openmsx::Reactor::getCliComm ( )

◆ getCommandController()

CommandController & openmsx::Reactor::getCommandController ( )

◆ getDiskFactory()

DiskFactory& openmsx::Reactor::getDiskFactory ( )
inline

Definition at line 85 of file Reactor.hh.

Referenced by openmsx::DiskChanger::insertDisk().

◆ getDiskManipulator()

DiskManipulator& openmsx::Reactor::getDiskManipulator ( )
inline

◆ getDisplay()

Display& openmsx::Reactor::getDisplay ( )
inline

◆ getEventDistributor()

EventDistributor& openmsx::Reactor::getEventDistributor ( )
inline

◆ getFilePool()

FilePool& openmsx::Reactor::getFilePool ( )
inline

◆ getGlobalCliComm()

GlobalCliComm& openmsx::Reactor::getGlobalCliComm ( )
inline

◆ getGlobalCommandController()

GlobalCommandController& openmsx::Reactor::getGlobalCommandController ( )
inline

◆ getGlobalSettings()

GlobalSettings& openmsx::Reactor::getGlobalSettings ( )
inline

◆ getHwConfigs()

vector< string > openmsx::Reactor::getHwConfigs ( string_view  type)
static

◆ getInputEventGenerator()

InputEventGenerator& openmsx::Reactor::getInputEventGenerator ( )
inline

◆ getInterpreter()

Interpreter & openmsx::Reactor::getInterpreter ( )

◆ getMachineID()

string openmsx::Reactor::getMachineID ( ) const

◆ getMachineSetting()

EnumSetting<int>& openmsx::Reactor::getMachineSetting ( )
inline

Definition at line 87 of file Reactor.hh.

Referenced by openmsx::CommandLineParser::parse().

◆ getMixer()

Mixer& openmsx::Reactor::getMixer ( )
inline

Definition at line 84 of file Reactor.hh.

◆ getMotherBoard()

MSXMotherBoard * openmsx::Reactor::getMotherBoard ( ) const

◆ getOpenMSXInfoCommand()

InfoCommand & openmsx::Reactor::getOpenMSXInfoCommand ( )

Definition at line 295 of file Reactor.cc.

Referenced by getGlobalSettings().

◆ getRTScheduler()

RTScheduler& openmsx::Reactor::getRTScheduler ( )
inline

◆ getSoftwareDatabase()

RomDatabase & openmsx::Reactor::getSoftwareDatabase ( )

◆ init()

void openmsx::Reactor::init ( )

◆ replaceBoard()

void openmsx::Reactor::replaceBoard ( MSXMotherBoard oldBoard,
Board  newBoard 
)

◆ run()

void openmsx::Reactor::run ( CommandLineParser parser)

◆ switchMachine()

void openmsx::Reactor::switchMachine ( const std::string &  machine)

◆ unblock()

void openmsx::Reactor::unblock ( )

Friends And Related Function Documentation

◆ ActivateMachineCommand

friend class ActivateMachineCommand
friend

Definition at line 202 of file Reactor.hh.

◆ CreateMachineCommand

friend class CreateMachineCommand
friend

Definition at line 199 of file Reactor.hh.

◆ DeleteMachineCommand

friend class DeleteMachineCommand
friend

Definition at line 200 of file Reactor.hh.

◆ ListMachinesCommand

friend class ListMachinesCommand
friend

Definition at line 201 of file Reactor.hh.

◆ MachineCommand

friend class MachineCommand
friend

Definition at line 197 of file Reactor.hh.

◆ RestoreMachineCommand

friend class RestoreMachineCommand
friend

Definition at line 204 of file Reactor.hh.

◆ StoreMachineCommand

friend class StoreMachineCommand
friend

Definition at line 203 of file Reactor.hh.

◆ TestMachineCommand

friend class TestMachineCommand
friend

Definition at line 198 of file Reactor.hh.


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