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
bool getChildDataAsBool(std::string_view name, bool defaultValue=false) const
Definition: DeviceConfig.cc:56
const std::string & getAttribute(std::string_view attName) const
Definition: DeviceConfig.cc:65
Contains the main loop of openMSX.
Definition: Reactor.hh:66
int getAttributeAsInt(std::string_view attName, int defaultValue=0) const
Definition: DeviceConfig.cc:69
const std::string & getChildData(std::string_view name) const
GlobalSettings & getGlobalSettings() const
Definition: DeviceConfig.cc:34
int getChildDataAsInt(std::string_view name, int defaultValue=0) const
Definition: XMLElement.cc:186
MSXMotherBoard & getMotherBoard() const
int getAttributeAsInt(std::string_view attName, int defaultValue=0) const
Definition: XMLElement.cc:233
const FileContext & getFileContext() const
Definition: DeviceConfig.cc:9
const XMLElement * findChild(std::string_view name) const
Definition: DeviceConfig.cc:61
CliComm & getCliComm() const
Definition: DeviceConfig.cc:18
Reactor & getReactor() const
Definition: DeviceConfig.cc:30
GlobalSettings & getGlobalSettings()
Definition: Reactor.hh:103
const XMLElement & getChild(std::string_view name) const
const FileContext & getFileContext() const
const std::string & getAttribute(std::string_view attName) const
CommandController & getCommandController() const
Definition: DeviceConfig.cc:22
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
const std::string & getChildData(std::string_view name) const
Definition: DeviceConfig.cc:43
CommandController & getCommandController()
const HardwareConfig & getHardwareConfig() const
Definition: DeviceConfig.hh:42
bool getChildDataAsBool(std::string_view name, bool defaultValue=false) const
Definition: XMLElement.cc:180
const XMLElement * findChild(std::string_view name) const
const XMLElement * getXML() const
Definition: DeviceConfig.hh:47
const XMLElement & getChild(std::string_view name) const
Definition: DeviceConfig.cc:39
int getChildDataAsInt(std::string_view name, int defaultValue=0) const
Definition: DeviceConfig.cc:52
Scheduler & getScheduler() const
Definition: DeviceConfig.cc:26
This class contains settings that are used by several other class (including some singletons)...
MSXMotherBoard & getMotherBoard() const
Definition: DeviceConfig.cc:13