openMSX
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
openmsx::HardwareConfig Class Reference

#include <HardwareConfig.hh>

Public Types

enum class  Type { MACHINE , EXTENSION , ROM }
 

Public Member Functions

 HardwareConfig (const HardwareConfig &)=delete
 
HardwareConfigoperator= (const HardwareConfig &)=delete
 
 HardwareConfig (MSXMotherBoard &motherBoard, std::string hwName)
 
 ~HardwareConfig ()
 
MSXMotherBoardgetMotherBoard () const
 
const FileContextgetFileContext () const
 
void setFileContext (FileContext &&ctxt)
 
const XMLElementgetConfig () const
 
const std::string & getName () const
 
const std::string & getConfigName () const
 
Type getType () const
 
byte parseSlotMap () const
 Parses a slot mapping. More...
 
void parseSlots ()
 
void createDevices ()
 
const std::vector< std::unique_ptr< MSXDevice > > & getDevices () const
 
void testRemove () const
 Checks whether this HardwareConfig can be deleted. More...
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Static Public Member Functions

static XMLElement loadConfig (std::string_view type, std::string_view name)
 
static std::unique_ptr< HardwareConfigcreateMachineConfig (MSXMotherBoard &motherBoard, std::string machineName)
 
static std::unique_ptr< HardwareConfigcreateExtensionConfig (MSXMotherBoard &motherBoard, std::string extensionName, std::string_view slotname)
 
static std::unique_ptr< HardwareConfigcreateRomConfig (MSXMotherBoard &motherBoard, std::string romfile, std::string slotname, span< const TclObject > options)
 

Friends

struct SerializeConstructorArgs< HardwareConfig >
 

Detailed Description

Definition at line 21 of file HardwareConfig.hh.

Member Enumeration Documentation

◆ Type

Enumerator
MACHINE 
EXTENSION 
ROM 

Definition at line 24 of file HardwareConfig.hh.

Constructor & Destructor Documentation

◆ HardwareConfig() [1/2]

openmsx::HardwareConfig::HardwareConfig ( const HardwareConfig )
delete

◆ HardwareConfig() [2/2]

openmsx::HardwareConfig::HardwareConfig ( MSXMotherBoard motherBoard,
std::string  hwName 
)

Definition at line 115 of file HardwareConfig.cc.

References ranges::fill(), and openmsx::MSXMotherBoard::getUserName().

◆ ~HardwareConfig()

openmsx::HardwareConfig::~HardwareConfig ( )

Member Function Documentation

◆ createDevices()

void openmsx::HardwareConfig::createDevices ( )

Definition at line 326 of file HardwareConfig.cc.

Referenced by openmsx::MSXMotherBoard::loadMachine(), and serialize().

◆ createExtensionConfig()

unique_ptr< HardwareConfig > openmsx::HardwareConfig::createExtensionConfig ( MSXMotherBoard motherBoard,
std::string  extensionName,
std::string_view  slotname 
)
static

Definition at line 40 of file HardwareConfig.cc.

References EXTENSION.

Referenced by openmsx::MSXMotherBoard::loadExtension().

◆ createMachineConfig()

unique_ptr< HardwareConfig > openmsx::HardwareConfig::createMachineConfig ( MSXMotherBoard motherBoard,
std::string  machineName 
)
static

Definition at line 30 of file HardwareConfig.cc.

References MACHINE.

Referenced by openmsx::MSXMotherBoard::loadMachine().

◆ createRomConfig()

unique_ptr< HardwareConfig > openmsx::HardwareConfig::createRomConfig ( MSXMotherBoard motherBoard,
std::string  romfile,
std::string  slotname,
span< const TclObject options 
)
static

◆ getConfig()

const XMLElement& openmsx::HardwareConfig::getConfig ( ) const
inline

◆ getConfigName()

const std::string& openmsx::HardwareConfig::getConfigName ( ) const
inline

Definition at line 54 of file HardwareConfig.hh.

Referenced by openmsx::MachineExtensionInfo::execute().

◆ getDevices()

const std::vector<std::unique_ptr<MSXDevice> >& openmsx::HardwareConfig::getDevices ( ) const
inline

Definition at line 66 of file HardwareConfig.hh.

Referenced by openmsx::MachineExtensionInfo::execute().

◆ getFileContext()

const FileContext& openmsx::HardwareConfig::getFileContext ( ) const
inline

Definition at line 49 of file HardwareConfig.hh.

Referenced by openmsx::DeviceConfig::getFileContext().

◆ getMotherBoard()

MSXMotherBoard& openmsx::HardwareConfig::getMotherBoard ( ) const
inline

◆ getName()

const std::string& openmsx::HardwareConfig::getName ( ) const
inline

Definition at line 53 of file HardwareConfig.hh.

Referenced by openmsx::MSXMotherBoard::removeExtension().

◆ getType()

Type openmsx::HardwareConfig::getType ( ) const
inline

Definition at line 55 of file HardwareConfig.hh.

Referenced by openmsx::MachineExtensionInfo::execute().

◆ loadConfig()

XMLElement openmsx::HardwareConfig::loadConfig ( std::string_view  type,
std::string_view  name 
)
static

Definition at line 225 of file HardwareConfig.cc.

Referenced by openmsx::ConfigInfo::execute().

◆ operator=()

HardwareConfig& openmsx::HardwareConfig::operator= ( const HardwareConfig )
delete

◆ parseSlotMap()

byte openmsx::HardwareConfig::parseSlotMap ( ) const

Parses a slot mapping.

Returns the slot selection: two bits per page for the slot to be selected in that page, like MSX port 0xA8.

Definition at line 305 of file HardwareConfig.cc.

References getConfig().

Referenced by openmsx::MSXCPUInterface::MSXCPUInterface().

◆ parseSlots()

void openmsx::HardwareConfig::parseSlots ( )

◆ serialize()

template<typename Archive >
void openmsx::HardwareConfig::serialize ( Archive &  ar,
unsigned  version 
)

◆ setFileContext()

void openmsx::HardwareConfig::setFileContext ( FileContext &&  ctxt)
inline

Definition at line 50 of file HardwareConfig.hh.

◆ testRemove()

void openmsx::HardwareConfig::testRemove ( ) const

Friends And Related Function Documentation

◆ SerializeConstructorArgs< HardwareConfig >

friend struct SerializeConstructorArgs< HardwareConfig >
friend

Definition at line 107 of file HardwareConfig.hh.


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