openMSX
DeviceConfig.cc
Go to the documentation of this file.
1 #include "DeviceConfig.hh"
2 #include "XMLElement.hh"
3 #include "HardwareConfig.hh"
4 #include "MSXMotherBoard.hh"
5 #include "Reactor.hh"
6 
7 namespace openmsx {
8 
10 {
12 }
14 {
16 }
17 
19 {
20  return getMotherBoard().getMSXCliComm();
21 }
23 {
25 }
27 {
28  return getMotherBoard().getScheduler();
29 }
31 {
32  return getMotherBoard().getReactor();
33 }
35 {
36  return getReactor().getGlobalSettings();
37 }
38 
39 const XMLElement& DeviceConfig::getChild(std::string_view name) const
40 {
41  return getXML()->getChild(name);
42 }
43 const std::string& DeviceConfig::getChildData(std::string_view name) const
44 {
45  return getXML()->getChildData(name);
46 }
47 std::string_view DeviceConfig::getChildData(std::string_view name,
48  std::string_view defaultValue) const
49 {
50  return getXML()->getChildData(name, defaultValue);
51 }
52 int DeviceConfig::getChildDataAsInt(std::string_view name, int defaultValue) const
53 {
54  return getXML()->getChildDataAsInt(name, defaultValue);
55 }
56 bool DeviceConfig::getChildDataAsBool(std::string_view name,
57  bool defaultValue) const
58 {
59  return getXML()->getChildDataAsBool(name, defaultValue);
60 }
61 const XMLElement* DeviceConfig::findChild(std::string_view name) const
62 {
63  return getXML()->findChild(name);
64 }
65 const std::string& DeviceConfig::getAttribute(std::string_view attName) const
66 {
67  return getXML()->getAttribute(attName);
68 }
69 int DeviceConfig::getAttributeAsInt(std::string_view attName, int defaultValue) const
70 {
71  return getXML()->getAttributeAsInt(attName, defaultValue);
72 }
73 
74 } // namespace openmsx
openmsx::DeviceConfig::getScheduler
Scheduler & getScheduler() const
Definition: DeviceConfig.cc:26
openmsx::MSXMotherBoard::getReactor
Reactor & getReactor()
Definition: MSXMotherBoard.hh:135
HardwareConfig.hh
openmsx::XMLElement::getChildDataAsBool
bool getChildDataAsBool(std::string_view childName, bool defaultValue=false) const
Definition: XMLElement.cc:180
openmsx::Scheduler
Definition: Scheduler.hh:33
openmsx::CommandController
Definition: CommandController.hh:17
openmsx::XMLElement::getAttribute
const std::string & getAttribute(std::string_view attrName) const
Definition: XMLElement.cc:211
openmsx::DeviceConfig::getMotherBoard
MSXMotherBoard & getMotherBoard() const
Definition: DeviceConfig.cc:13
openmsx::XMLElement::getChildData
const std::string & getChildData(std::string_view childName) const
Definition: XMLElement.cc:168
openmsx::DeviceConfig::findChild
const XMLElement * findChild(std::string_view name) const
Definition: DeviceConfig.cc:61
openmsx::DeviceConfig::getChild
const XMLElement & getChild(std::string_view name) const
Definition: DeviceConfig.cc:39
XMLElement.hh
openmsx::DeviceConfig::getReactor
Reactor & getReactor() const
Definition: DeviceConfig.cc:30
openmsx::MSXMotherBoard::getCommandController
CommandController & getCommandController()
Definition: MSXMotherBoard.cc:480
openmsx::FileContext
Definition: FileContext.hh:9
openmsx::DeviceConfig::getCliComm
CliComm & getCliComm() const
Definition: DeviceConfig.cc:18
openmsx::Reactor
Contains the main loop of openMSX.
Definition: Reactor.hh:66
openmsx::DeviceConfig::getAttribute
const std::string & getAttribute(std::string_view attName) const
Definition: DeviceConfig.cc:65
openmsx::XMLElement::findChild
const XMLElement * findChild(std::string_view childName) const
Definition: XMLElement.cc:93
Reactor.hh
openmsx::XMLElement
Definition: XMLElement.hh:15
openmsx::MSXMotherBoard
Definition: MSXMotherBoard.hh:59
openmsx::DeviceConfig::getChildData
const std::string & getChildData(std::string_view name) const
Definition: DeviceConfig.cc:43
openmsx::MSXMotherBoard::getScheduler
Scheduler & getScheduler()
Definition: MSXMotherBoard.hh:118
openmsx::DeviceConfig::getHardwareConfig
const HardwareConfig & getHardwareConfig() const
Definition: DeviceConfig.hh:42
openmsx::DeviceConfig::getGlobalSettings
GlobalSettings & getGlobalSettings() const
Definition: DeviceConfig.cc:34
openmsx::DeviceConfig::getAttributeAsInt
int getAttributeAsInt(std::string_view attName, int defaultValue=0) const
Definition: DeviceConfig.cc:69
openmsx::Reactor::getGlobalSettings
GlobalSettings & getGlobalSettings()
Definition: Reactor.hh:103
openmsx::GlobalSettings
This class contains settings that are used by several other class (including some singletons).
Definition: GlobalSettings.hh:24
openmsx::DeviceConfig::getXML
const XMLElement * getXML() const
Definition: DeviceConfig.hh:47
openmsx::DeviceConfig::getChildDataAsInt
int getChildDataAsInt(std::string_view name, int defaultValue=0) const
Definition: DeviceConfig.cc:52
openmsx::DeviceConfig::getCommandController
CommandController & getCommandController() const
Definition: DeviceConfig.cc:22
openmsx::XMLElement::getAttributeAsInt
int getAttributeAsInt(std::string_view attrName, int defaultValue=0) const
Definition: XMLElement.cc:233
openmsx::CliComm
Definition: CliComm.hh:10
openmsx::XMLElement::getChildDataAsInt
int getChildDataAsInt(std::string_view childName, int defaultValue=0) const
Definition: XMLElement.cc:186
openmsx::DeviceConfig::getFileContext
const FileContext & getFileContext() const
Definition: DeviceConfig.cc:9
DeviceConfig.hh
openmsx::HardwareConfig::getFileContext
const FileContext & getFileContext() const
Definition: HardwareConfig.hh:43
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
MSXMotherBoard.hh
openmsx::MSXMotherBoard::getMSXCliComm
CliComm & getMSXCliComm()
Definition: MSXMotherBoard.cc:370
openmsx::XMLElement::getChild
const XMLElement & getChild(std::string_view childName) const
Definition: XMLElement.cc:142
openmsx::DeviceConfig::getChildDataAsBool
bool getChildDataAsBool(std::string_view name, bool defaultValue=false) const
Definition: DeviceConfig.cc:56
openmsx::HardwareConfig::getMotherBoard
MSXMotherBoard & getMotherBoard() const
Definition: HardwareConfig.hh:41