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
7namespace openmsx {
8
17
39{
40 assert(hwConf);
41 return const_cast<HardwareConfig*>(hwConf)->getXMLDocument();
42}
43
44const XMLElement& DeviceConfig::getChild(std::string_view name) const
45{
46 return getXML()->getChild(name);
47}
48std::string_view DeviceConfig::getChildData(std::string_view name) const
49{
50 return getXML()->getChildData(name);
51}
52std::string_view DeviceConfig::getChildData(std::string_view name,
53 std::string_view defaultValue) const
54{
55 return getXML()->getChildData(name, defaultValue);
56}
57int DeviceConfig::getChildDataAsInt(std::string_view name, int defaultValue) const
58{
59 return getXML()->getChildDataAsInt(name, defaultValue);
60}
61bool DeviceConfig::getChildDataAsBool(std::string_view name,
62 bool defaultValue) const
63{
64 return getXML()->getChildDataAsBool(name, defaultValue);
65}
66const XMLElement* DeviceConfig::findChild(std::string_view name) const
67{
68 return getXML()->findChild(name);
69}
70std::string_view DeviceConfig::getAttributeValue(std::string_view attName) const
71{
72 return getXML()->getAttributeValue(attName);
73}
74int DeviceConfig::getAttributeValueAsInt(std::string_view attName, int defaultValue) const
75{
76 return getXML()->getAttributeValueAsInt(attName, defaultValue);
77}
78
79} // namespace openmsx
Reactor & getReactor() const
bool getChildDataAsBool(std::string_view name, bool defaultValue=false) const
MSXCliComm & getCliComm() const
const FileContext & getFileContext() const
const XMLElement * findChild(std::string_view name) const
GlobalSettings & getGlobalSettings() const
int getChildDataAsInt(std::string_view name, int defaultValue) const
XMLDocument & getXMLDocument()
MSXMotherBoard & getMotherBoard() const
CommandController & getCommandController() const
std::string_view getChildData(std::string_view name) const
Scheduler & getScheduler() const
const XMLElement & getChild(std::string_view name) const
const HardwareConfig & getHardwareConfig() const
const XMLElement * getXML() const
int getAttributeValueAsInt(std::string_view attName, int defaultValue) const
std::string_view getAttributeValue(std::string_view attName) const
This class contains settings that are used by several other class (including some singletons).
const FileContext & getFileContext() const
MSXMotherBoard & getMotherBoard() const
CommandController & getCommandController()
Contains the main loop of openMSX.
Definition Reactor.hh:72
GlobalSettings & getGlobalSettings()
Definition Reactor.hh:114
int getChildDataAsInt(std::string_view childName, int defaultValue) const
Definition XMLElement.cc:81
const XMLElement * findChild(std::string_view childName) const
Definition XMLElement.cc:19
std::string_view getAttributeValue(std::string_view attrName) const
int getAttributeValueAsInt(std::string_view attrName, int defaultValue) const
const XMLElement & getChild(std::string_view childName) const
Definition XMLElement.cc:53
std::string_view getChildData(std::string_view childName) const
Definition XMLElement.cc:62
bool getChildDataAsBool(std::string_view childName, bool defaultValue) const
Definition XMLElement.cc:75
This file implemented 3 utility functions:
Definition Autofire.cc:9