openMSX
|
#include <XMLElement.hh>
Public Member Functions | |
XMLElement (const char *name_) | |
XMLElement (const char *name_, const char *data_) | |
std::string_view | getName () const |
void | clearName () |
std::string_view | getData () const |
XMLElement * | setData (const char *data_) |
bool | hasChildren () const |
const XMLElement * | getFirstChild () const |
const XMLElement * | findChild (std::string_view childName) const |
const XMLElement * | findChild (std::string_view childName, const XMLElement *&hint) const |
const XMLElement & | getChild (std::string_view childName) const |
std::string_view | getChildData (std::string_view childName) const |
std::string_view | getChildData (std::string_view childName, std::string_view defaultValue) const |
bool | getChildDataAsBool (std::string_view childName, bool defaultValue) const |
int | getChildDataAsInt (std::string_view childName, int defaultValue) const |
size_t | numChildren () const |
ChildRange | getChildren () const |
NamedChildRange | getChildren (std::string_view childName) const |
const XMLAttribute * | findAttribute (std::string_view attrName) const |
const XMLAttribute & | getAttribute (std::string_view attrName) const |
std::string_view | getAttributeValue (std::string_view attrName) const |
std::string_view | getAttributeValue (std::string_view attrName, std::string_view defaultValue) const |
bool | getAttributeValueAsBool (std::string_view attrName, bool defaultValue) const |
int | getAttributeValueAsInt (std::string_view attrName, int defaultValue) const |
XMLAttribute ** | findAttributePointer (std::string_view attrName) |
size_t | numAttributes () const |
AttributeRange | getAttributes () const |
XMLElement * | setFirstChild (XMLElement *child) |
XMLElement * | setNextSibling (XMLElement *sibling) |
XMLAttribute * | setFirstAttribute (XMLAttribute *attribute) |
Static Public Member Functions | |
static void | removeAttribute (XMLAttribute **attrPtr) |
Friends | |
class | XMLDocument |
class | XMLDocumentHandler |
Definition at line 92 of file XMLElement.hh.
|
inlineexplicit |
Definition at line 179 of file XMLElement.hh.
|
inline |
Definition at line 180 of file XMLElement.hh.
|
inline |
Definition at line 183 of file XMLElement.hh.
Referenced by openmsx::XmlInputArchive::endTag().
const XMLAttribute * openmsx::XMLElement::findAttribute | ( | std::string_view | attrName | ) | const |
Definition at line 96 of file XMLElement.cc.
Referenced by openmsx::XmlInputArchive::attribute(), getAttribute(), getAttributeValue(), getAttributeValueAsBool(), getAttributeValueAsInt(), and openmsx::XmlInputArchive::hasAttribute().
XMLAttribute ** openmsx::XMLElement::findAttributePointer | ( | std::string_view | attrName | ) |
Definition at line 146 of file XMLElement.cc.
const XMLElement * openmsx::XMLElement::findChild | ( | std::string_view | childName | ) | const |
Definition at line 21 of file XMLElement.cc.
Referenced by openmsx::XmlInputArchive::beginTag(), openmsx::Ram::clear(), openmsx::DeviceConfig::findChild(), getChild(), getChildData(), getChildDataAsBool(), getChildDataAsInt(), openmsx::HardwareConfig::getRomFilename(), openmsx::VDP::getVersionString(), openmsx::MSXMotherBoard::hasToshibaEngine(), openmsx::MSXMotherBoard::isTurboR(), and openmsx::RenShaTurbo::RenShaTurbo().
const XMLElement * openmsx::XMLElement::findChild | ( | std::string_view | childName, |
const XMLElement *& | hint | ||
) | const |
Definition at line 37 of file XMLElement.cc.
const XMLAttribute & openmsx::XMLElement::getAttribute | ( | std::string_view | attrName | ) | const |
Definition at line 107 of file XMLElement.cc.
References findAttribute().
Referenced by getAttributeValue().
|
inline |
Definition at line 221 of file XMLElement.hh.
Referenced by numAttributes().
std::string_view openmsx::XMLElement::getAttributeValue | ( | std::string_view | attrName | ) | const |
Definition at line 116 of file XMLElement.cc.
References getAttribute(), and openmsx::XMLAttribute::getValue().
Referenced by openmsx::DeviceConfig::getAttributeValue().
std::string_view openmsx::XMLElement::getAttributeValue | ( | std::string_view | attrName, |
std::string_view | defaultValue | ||
) | const |
Definition at line 121 of file XMLElement.cc.
References findAttribute().
bool openmsx::XMLElement::getAttributeValueAsBool | ( | std::string_view | attrName, |
bool | defaultValue | ||
) | const |
Definition at line 129 of file XMLElement.cc.
References findAttribute(), and StringOp::stringToBool().
int openmsx::XMLElement::getAttributeValueAsInt | ( | std::string_view | attrName, |
int | defaultValue | ||
) | const |
Definition at line 136 of file XMLElement.cc.
References findAttribute().
Referenced by openmsx::DeviceConfig::getAttributeValueAsInt().
const XMLElement & openmsx::XMLElement::getChild | ( | std::string_view | childName | ) | const |
Definition at line 55 of file XMLElement.cc.
References findChild().
Referenced by openmsx::MachineExtensionInfo::execute(), openmsx::DeviceConfig::getChild(), getChildData(), openmsx::HardwareConfig::getDevicesElem(), openmsx::MSXMotherBoard::hasToshibaEngine(), and openmsx::MSXMotherBoard::isTurboR().
std::string_view openmsx::XMLElement::getChildData | ( | std::string_view | childName | ) | const |
Definition at line 64 of file XMLElement.cc.
References getChild(), and getData().
Referenced by openmsx::MachineExtensionInfo::execute(), openmsx::DeviceConfig::getChildData(), openmsx::DeviceConfig::getChildData(), openmsx::MSXMotherBoard::getJoystickPort(), and openmsx::SoundDevice::registerSound().
std::string_view openmsx::XMLElement::getChildData | ( | std::string_view | childName, |
std::string_view | defaultValue | ||
) | const |
Definition at line 70 of file XMLElement.cc.
References findChild().
bool openmsx::XMLElement::getChildDataAsBool | ( | std::string_view | childName, |
bool | defaultValue | ||
) | const |
Definition at line 77 of file XMLElement.cc.
References findChild(), and StringOp::stringToBool().
Referenced by openmsx::DeviceConfig::getChildDataAsBool().
int openmsx::XMLElement::getChildDataAsInt | ( | std::string_view | childName, |
int | defaultValue | ||
) | const |
Definition at line 83 of file XMLElement.cc.
References findChild().
Referenced by openmsx::DeviceConfig::getChildDataAsInt().
|
inline |
Definition at line 206 of file XMLElement.hh.
Referenced by openmsx::MB89352::MB89352(), numChildren(), openmsx::HardwareConfig::parseSlots(), openmsx::Rom::Rom(), and openmsx::WD33C93::WD33C93().
|
inline |
Definition at line 207 of file XMLElement.hh.
|
inline |
Definition at line 185 of file XMLElement.hh.
Referenced by getChildData(), openmsx::XmlInputArchive::loadStr(), and openmsx::RomBlocks< BANK_SIZE_ >::RomBlocks().
|
inline |
Definition at line 194 of file XMLElement.hh.
Referenced by openmsx::XMLDocument::serialize().
|
inline |
Definition at line 182 of file XMLElement.hh.
Referenced by openmsx::DeviceFactory::create().
|
inline |
Definition at line 193 of file XMLElement.hh.
size_t openmsx::XMLElement::numAttributes | ( | ) | const |
Definition at line 163 of file XMLElement.cc.
References begin(), end(), and getAttributes().
size_t openmsx::XMLElement::numChildren | ( | ) | const |
Definition at line 90 of file XMLElement.cc.
References begin(), end(), and getChildren().
|
static |
Definition at line 157 of file XMLElement.cc.
|
inline |
Definition at line 188 of file XMLElement.hh.
Referenced by openmsx::HardwareConfig::createRomConfig().
|
inline |
Definition at line 233 of file XMLElement.hh.
|
inline |
Definition at line 223 of file XMLElement.hh.
Referenced by openmsx::CassettePlayer::CassettePlayer().
|
inline |
Definition at line 228 of file XMLElement.hh.
|
friend |
Definition at line 246 of file XMLElement.hh.
|
friend |
Definition at line 247 of file XMLElement.hh.