OXYGENHUB
◆ main openmsx / src / config / DeviceConfig.cc
2.3 KiB · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#include "DeviceConfig.hh"
2
3
#include "HardwareConfig.hh"
4
#include "XMLElement.hh"
5
6
#include "MSXMotherBoard.hh"
7
#include "Reactor.hh"
8
9
namespace openmsx {
10
11
const FileContext& DeviceConfig::getFileContext() const
12
{
13
	return getHardwareConfig().getFileContext();
14
}
15
MSXMotherBoard& DeviceConfig::getMotherBoard() const
16
{
17
	return getHardwareConfig().getMotherBoard();
18
}
19
20
MSXCliComm& DeviceConfig::getCliComm() const
21
{
22
	return getMotherBoard().getMSXCliComm();
23
}
24
CommandController& DeviceConfig::getCommandController() const
25
{
26
	return getMotherBoard().getCommandController();
27
}
28
Scheduler& DeviceConfig::getScheduler() const
29
{
30
	return getMotherBoard().getScheduler();
31
}
32
Reactor& DeviceConfig::getReactor() const
33
{
34
	return getMotherBoard().getReactor();
35
}
36
GlobalSettings& DeviceConfig::getGlobalSettings() const
37
{
38
	return getReactor().getGlobalSettings();
39
}
40
XMLDocument& DeviceConfig::getXMLDocument()
41
{
42
	assert(hwConf);
43
	return hwConf->getXMLDocument();
44
}
45
46
const XMLElement& DeviceConfig::getChild(std::string_view name) const
47
{
48
	return getXML()->getChild(name);
49
}
50
XMLElement& DeviceConfig::getChild(std::string_view name)
51
{
52
	return getXML()->getChild(name);
53
}
54
std::string_view DeviceConfig::getChildData(std::string_view name) const
55
{
56
	return getXML()->getChildData(name);
57
}
58
std::string_view DeviceConfig::getChildData(std::string_view name,
59
                                            std::string_view defaultValue) const
60
{
61
	return getXML()->getChildData(name, defaultValue);
62
}
63
int DeviceConfig::getChildDataAsInt(std::string_view name, int defaultValue) const
64
{
65
	return getXML()->getChildDataAsInt(name, defaultValue);
66
}
67
bool DeviceConfig::getChildDataAsBool(std::string_view name,
68
                                      bool defaultValue) const
69
{
70
	return getXML()->getChildDataAsBool(name, defaultValue);
71
}
72
const XMLElement* DeviceConfig::findChild(std::string_view name) const
73
{
74
	return getXML()->findChild(name);
75
}
76
XMLElement* DeviceConfig::findChild(std::string_view name)
77
{
78
	return getXML()->findChild(name);
79
}
80
std::string_view DeviceConfig::getAttributeValue(std::string_view attName) const
81
{
82
	return getXML()->getAttributeValue(attName);
83
}
84
int DeviceConfig::getAttributeValueAsInt(std::string_view attName, int defaultValue) const
85
{
86
	return getXML()->getAttributeValueAsInt(attName, defaultValue);
87
}
88
89
} // namespace openmsx