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)
 
XMLDocumentgetXMLDocument ()
 
const XMLElementgetConfig () const
 
const std::string & getName () const
 
const std::string & getConfigName () const
 
std::string_view getRomFilename () const
 
const XMLElementgetDevicesElem () const
 
Type getType () const
 
byte parseSlotMap () const
 Parses a slot mapping.
 
void parseSlots ()
 
void createDevices ()
 
const auto & getDevices () const
 
void testRemove () const
 Checks whether this HardwareConfig can be deleted.
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Static Public Member Functions

static void loadConfig (XMLDocument &doc, 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_view romFile, std::string_view slotName, std::span< const TclObject > options)
 

Friends

struct SerializeConstructorArgs< HardwareConfig >
 

Detailed Description

Definition at line 22 of file HardwareConfig.hh.

Member Enumeration Documentation

◆ Type

enum class openmsx::HardwareConfig::Type
strong
Enumerator
MACHINE 
EXTENSION 
ROM 

Definition at line 25 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 154 of file HardwareConfig.cc.

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

◆ ~HardwareConfig()

openmsx::HardwareConfig::~HardwareConfig ( )

Member Function Documentation

◆ createDevices()

void openmsx::HardwareConfig::createDevices ( )

◆ createExtensionConfig()

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

Definition at line 35 of file HardwareConfig.cc.

References EXTENSION.

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

◆ createMachineConfig()

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

Definition at line 25 of file HardwareConfig.cc.

References MACHINE.

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

◆ createRomConfig()

std::unique_ptr< HardwareConfig > openmsx::HardwareConfig::createRomConfig ( MSXMotherBoard motherBoard,
std::string_view  romFile,
std::string_view  slotName,
std::span< const TclObject options 
)
static

◆ getConfig()

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

◆ getConfigName()

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

◆ getDevices()

const auto & openmsx::HardwareConfig::getDevices ( ) const
inline

Definition at line 70 of file HardwareConfig.hh.

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

◆ getDevicesElem()

const XMLElement & openmsx::HardwareConfig::getDevicesElem ( ) const

Definition at line 235 of file HardwareConfig.cc.

References openmsx::XMLElement::getChild(), and getConfig().

Referenced by createDevices(), and parseSlots().

◆ getFileContext()

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

Definition at line 50 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

◆ getRomFilename()

std::string_view openmsx::HardwareConfig::getRomFilename ( ) const

◆ getType()

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

◆ getXMLDocument()

XMLDocument & openmsx::HardwareConfig::getXMLDocument ( )
inline

Definition at line 53 of file HardwareConfig.hh.

◆ loadConfig()

void openmsx::HardwareConfig::loadConfig ( XMLDocument doc,
std::string_view  type,
std::string_view  name 
)
static

Definition at line 270 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 350 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 51 of file HardwareConfig.hh.

◆ testRemove()

void openmsx::HardwareConfig::testRemove ( ) const

Friends And Related Symbol Documentation

◆ SerializeConstructorArgs< HardwareConfig >

friend struct SerializeConstructorArgs< HardwareConfig >
friend

Definition at line 110 of file HardwareConfig.hh.


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