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
const std::string & getAttribute(std::string_view attName) const
Definition: DeviceConfig.cc:65
Reactor & getReactor() const
Definition: DeviceConfig.cc:30
bool getChildDataAsBool(std::string_view name, bool defaultValue=false) const
Definition: DeviceConfig.cc:56
CliComm & getCliComm() const
Definition: DeviceConfig.cc:18
const FileContext & getFileContext() const
Definition: DeviceConfig.cc:9
const XMLElement * findChild(std::string_view name) const
Definition: DeviceConfig.cc:61
const std::string & getChildData(std::string_view name) const
Definition: DeviceConfig.cc:43
GlobalSettings & getGlobalSettings() const
Definition: DeviceConfig.cc:34
MSXMotherBoard & getMotherBoard() const
Definition: DeviceConfig.cc:13
int getChildDataAsInt(std::string_view name, int defaultValue=0) const
Definition: DeviceConfig.cc:52
int getAttributeAsInt(std::string_view attName, int defaultValue=0) const
Definition: DeviceConfig.cc:69
CommandController & getCommandController() const
Definition: DeviceConfig.cc:22
const HardwareConfig & getHardwareConfig() const
Definition: DeviceConfig.hh:42
Scheduler & getScheduler() const
Definition: DeviceConfig.cc:26
const XMLElement & getChild(std::string_view name) const
Definition: DeviceConfig.cc:39
const XMLElement * getXML() const
Definition: DeviceConfig.hh:47
This class contains settings that are used by several other class (including some singletons).
MSXMotherBoard & getMotherBoard() const
const FileContext & getFileContext() const
CommandController & getCommandController()
Contains the main loop of openMSX.
Definition: Reactor.hh:67
GlobalSettings & getGlobalSettings()
Definition: Reactor.hh:103
const XMLElement * findChild(std::string_view childName) const
Definition: XMLElement.cc:67
int getAttributeAsInt(std::string_view attrName, int defaultValue=0) const
Definition: XMLElement.cc:179
const std::string & getChildData(std::string_view childName) const
Definition: XMLElement.cc:121
const XMLElement & getChild(std::string_view childName) const
Definition: XMLElement.cc:116
int getChildDataAsInt(std::string_view childName, int defaultValue=0) const
Definition: XMLElement.cc:139
bool getChildDataAsBool(std::string_view childName, bool defaultValue=false) const
Definition: XMLElement.cc:133
const std::string & getAttribute(std::string_view attrName) const
Definition: XMLElement.cc:157
This file implemented 3 utility functions:
Definition: Autofire.cc:9