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

#include <CartridgeSlotManager.hh>

Public Member Functions

 CartridgeSlotManager (MSXMotherBoard &motherBoard)
 
 ~CartridgeSlotManager ()
 
void createExternalSlot (int ps)
 
void createExternalSlot (int ps, int ss)
 
void removeExternalSlot (int ps)
 
void removeExternalSlot (int ps, int ss)
 
void testRemoveExternalSlot (int ps, const HardwareConfig &allowed) const
 
void testRemoveExternalSlot (int ps, int ss, const HardwareConfig &allowed) const
 
void getSpecificSlot (unsigned slot, int &ps, int &ss) const
 
void getAnyFreeSlot (int &ps, int &ss) const
 
void allocateSlot (int ps, int ss, const HardwareConfig &hwConfig)
 
void freeSlot (int ps, int ss, const HardwareConfig &hwConfig)
 
int allocateAnyPrimarySlot (const HardwareConfig &hwConfig)
 
int allocateSpecificPrimarySlot (unsigned slot, const HardwareConfig &hwConfig)
 
void freePrimarySlot (int ps, const HardwareConfig &hwConfig)
 
bool isExternalSlot (int ps, int ss, bool convert) const
 

Static Public Member Functions

static int getSlotNum (std::string_view slot)
 

Detailed Description

Definition at line 15 of file CartridgeSlotManager.hh.

Constructor & Destructor Documentation

◆ CartridgeSlotManager()

openmsx::CartridgeSlotManager::CartridgeSlotManager ( MSXMotherBoard motherBoard)
explicit

Definition at line 43 of file CartridgeSlotManager.cc.

◆ ~CartridgeSlotManager()

openmsx::CartridgeSlotManager::~CartridgeSlotManager ( )

Definition at line 50 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists(), and xrange().

Member Function Documentation

◆ allocateAnyPrimarySlot()

int openmsx::CartridgeSlotManager::allocateAnyPrimarySlot ( const HardwareConfig hwConfig)

Definition at line 203 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists(), and xrange().

◆ allocateSlot()

void openmsx::CartridgeSlotManager::allocateSlot ( int  ps,
int  ss,
const HardwareConfig hwConfig 
)

Definition at line 227 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists(), and xrange().

◆ allocateSpecificPrimarySlot()

int openmsx::CartridgeSlotManager::allocateSpecificPrimarySlot ( unsigned  slot,
const HardwareConfig hwConfig 
)

Definition at line 166 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists().

◆ createExternalSlot() [1/2]

void openmsx::CartridgeSlotManager::createExternalSlot ( int  ps)

Definition at line 79 of file CartridgeSlotManager.cc.

◆ createExternalSlot() [2/2]

void openmsx::CartridgeSlotManager::createExternalSlot ( int  ps,
int  ss 
)

◆ freePrimarySlot()

void openmsx::CartridgeSlotManager::freePrimarySlot ( int  ps,
const HardwareConfig hwConfig 
)

Definition at line 217 of file CartridgeSlotManager.cc.

◆ freeSlot()

void openmsx::CartridgeSlotManager::freeSlot ( int  ps,
int  ss,
const HardwareConfig hwConfig 
)

Definition at line 249 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists(), and xrange().

◆ getAnyFreeSlot()

void openmsx::CartridgeSlotManager::getAnyFreeSlot ( int &  ps,
int &  ss 
) const

Definition at line 184 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists(), and xrange().

◆ getSlotNum()

int openmsx::CartridgeSlotManager::getSlotNum ( std::string_view  slot)
static

Definition at line 59 of file CartridgeSlotManager.cc.

Referenced by openmsx::HardwareConfig::parseSlots().

◆ getSpecificSlot()

void openmsx::CartridgeSlotManager::getSpecificSlot ( unsigned  slot,
int &  ps,
int &  ss 
) const

Definition at line 153 of file CartridgeSlotManager.cc.

References openmsx::FileOperations::exists().

◆ isExternalSlot()

bool openmsx::CartridgeSlotManager::isExternalSlot ( int  ps,
int  ss,
bool  convert 
) const

Definition at line 267 of file CartridgeSlotManager.cc.

References ranges::any_of(), openmsx::yuv2rgb::convert(), and xrange().

Referenced by createExternalSlot().

◆ removeExternalSlot() [1/2]

void openmsx::CartridgeSlotManager::removeExternalSlot ( int  ps)

Definition at line 137 of file CartridgeSlotManager.cc.

Referenced by openmsx::HardwareConfig::~HardwareConfig().

◆ removeExternalSlot() [2/2]

void openmsx::CartridgeSlotManager::removeExternalSlot ( int  ps,
int  ss 
)

◆ testRemoveExternalSlot() [1/2]

void openmsx::CartridgeSlotManager::testRemoveExternalSlot ( int  ps,
const HardwareConfig allowed 
) const

Definition at line 122 of file CartridgeSlotManager.cc.

Referenced by openmsx::HardwareConfig::testRemove().

◆ testRemoveExternalSlot() [2/2]

void openmsx::CartridgeSlotManager::testRemoveExternalSlot ( int  ps,
int  ss,
const HardwareConfig allowed 
) const

Definition at line 128 of file CartridgeSlotManager.cc.


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