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 ()
 
RomDatabasegetSoftwareDatabase ()
 
FilePoolgetFilePool ()
 
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_ref 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 61 of file Reactor.hh.

Member Typedef Documentation

◆ Board

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

Definition at line 104 of file Reactor.hh.

Constructor & Destructor Documentation

◆ Reactor()

openmsx::Reactor::Reactor ( )

Definition at line 175 of file Reactor.cc.

◆ ~Reactor()

openmsx::Reactor::~Reactor ( )

Member Function Documentation

◆ block()

void openmsx::Reactor::block ( )

Definition at line 563 of file Reactor.cc.

References enterMainLoop().

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

◆ 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 82 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_ref  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 84 of file Reactor.hh.

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

◆ getMixer()

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

Definition at line 81 of file Reactor.hh.

◆ getMotherBoard()

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

◆ getOpenMSXInfoCommand()

InfoCommand & openmsx::Reactor::getOpenMSXInfoCommand ( )

Definition at line 280 of file Reactor.cc.

Referenced by getGlobalSettings(), and init().

◆ getRTScheduler()

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

◆ getSoftwareDatabase()

RomDatabase& openmsx::Reactor::getSoftwareDatabase ( )
inline

Definition at line 85 of file Reactor.hh.

Referenced by openmsx::RomFactory::create().

◆ init()

void openmsx::Reactor::init ( )

◆ replaceBoard()

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

Definition at line 363 of file Reactor.cc.

References find_if_unguarded(), openmsx::Thread::isMainThread(), and move_pop_back().

◆ 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 197 of file Reactor.hh.

◆ CreateMachineCommand

friend class CreateMachineCommand
friend

Definition at line 194 of file Reactor.hh.

◆ DeleteMachineCommand

friend class DeleteMachineCommand
friend

Definition at line 195 of file Reactor.hh.

◆ ListMachinesCommand

friend class ListMachinesCommand
friend

Definition at line 196 of file Reactor.hh.

◆ MachineCommand

friend class MachineCommand
friend

Definition at line 192 of file Reactor.hh.

◆ RestoreMachineCommand

friend class RestoreMachineCommand
friend

Definition at line 199 of file Reactor.hh.

◆ StoreMachineCommand

friend class StoreMachineCommand
friend

Definition at line 198 of file Reactor.hh.

◆ TestMachineCommand

friend class TestMachineCommand
friend

Definition at line 193 of file Reactor.hh.


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