|
openMSX
|
#include <XMLElement.hh>
Public Types | |
| typedef std::vector< XMLElement > | Children |
Public Member Functions | |
| XMLElement () | |
| XMLElement (string_ref name) | |
| XMLElement (string_ref name, string_ref data) | |
| const std::string & | getName () const |
| void | setName (string_ref name) |
| void | clearName () |
| const std::string & | getData () const |
| void | setData (string_ref data) |
| void | addAttribute (string_ref name, string_ref value) |
| void | setAttribute (string_ref name, string_ref value) |
| void | removeAttribute (string_ref name) |
| XMLElement & | addChild (XMLElement child) |
| void | removeChild (const XMLElement &child) |
| const Children & | getChildren () const |
| bool | hasChildren () const |
| bool | getDataAsBool () const |
| int | getDataAsInt () const |
| double | getDataAsDouble () const |
| bool | hasAttribute (string_ref name) const |
| const std::string & | getAttribute (string_ref attName) const |
| string_ref | getAttribute (string_ref attName, string_ref defaultValue) const |
| bool | getAttributeAsBool (string_ref attName, bool defaultValue=false) const |
| int | getAttributeAsInt (string_ref attName, int defaultValue=0) const |
| bool | findAttributeInt (string_ref attName, unsigned &result) const |
| const XMLElement * | findChild (string_ref name) const |
| XMLElement * | findChild (string_ref name) |
| const XMLElement & | getChild (string_ref name) const |
| XMLElement & | getChild (string_ref name) |
| const XMLElement * | findChildWithAttribute (string_ref name, string_ref attName, string_ref attValue) const |
| XMLElement * | findChildWithAttribute (string_ref name, string_ref attName, string_ref attValue) |
| const XMLElement * | findNextChild (string_ref name, size_t &fromIndex) const |
| std::vector< const XMLElement * > | getChildren (string_ref name) const |
| XMLElement & | getCreateChild (string_ref name, string_ref defaultValue="") |
| XMLElement & | getCreateChildWithAttribute (string_ref name, string_ref attName, string_ref attValue) |
| const std::string & | getChildData (string_ref name) const |
| string_ref | getChildData (string_ref name, string_ref defaultValue) const |
| bool | getChildDataAsBool (string_ref name, bool defaultValue=false) const |
| int | getChildDataAsInt (string_ref name, int defaultValue=0) const |
| void | setChildData (string_ref name, string_ref value) |
| void | removeAllChildren () |
| std::string | dump () const |
| template<typename Archive > | |
| void | serialize (Archive &ar, unsigned version) |
Static Public Member Functions | |
| static std::string | XMLEscape (const std::string &str) |
| static std::unique_ptr < FileContext > | getLastSerializedFileContext () |
Definition at line 17 of file XMLElement.hh.
| typedef std::vector<XMLElement> openmsx::XMLElement::Children |
Definition at line 45 of file XMLElement.hh.
|
inline |
Definition at line 26 of file XMLElement.hh.
Referenced by getCreateChild(), getCreateChildWithAttribute(), and setChildData().
|
explicit |
Definition at line 18 of file XMLElement.cc.
| openmsx::XMLElement::XMLElement | ( | string_ref | name, |
| string_ref | data | ||
| ) |
Definition at line 23 of file XMLElement.cc.
| void openmsx::XMLElement::addAttribute | ( | string_ref | name, |
| string_ref | value | ||
| ) |
Definition at line 64 of file XMLElement.cc.
References string_ref::str().
Referenced by openmsx::HardwareConfig::createRomConfig(), openmsx::VLM5030::Impl::Impl(), and openmsx::HotKey::saveBindings().
| XMLElement & openmsx::XMLElement::addChild | ( | XMLElement | child | ) |
Definition at line 29 of file XMLElement.cc.
Referenced by openmsx::HardwareConfig::createRomConfig(), getCreateChild(), getCreateChildWithAttribute(), openmsx::VLM5030::Impl::Impl(), and setChildData().
| void openmsx::XMLElement::clearName | ( | ) |
Definition at line 108 of file XMLElement.cc.
References string_ref::clear().
Referenced by openmsx::XmlInputArchive::endTag().
| string openmsx::XMLElement::dump | ( | ) | const |
Definition at line 303 of file XMLElement.cc.
Referenced by openmsx::SettingsConfig::saveSetting(), and openmsx::XmlOutputArchive::~XmlOutputArchive().
| bool openmsx::XMLElement::findAttributeInt | ( | string_ref | attName, |
| unsigned & | result | ||
| ) | const |
Definition at line 291 of file XMLElement.cc.
References StringOp::stringToInt().
| const XMLElement * openmsx::XMLElement::findChild | ( | string_ref | name | ) | const |
Definition at line 139 of file XMLElement.cc.
Referenced by openmsx::Ram::clear(), openmsx::DeviceConfig::findChild(), getChild(), getChildData(), getChildDataAsBool(), getChildDataAsInt(), getCreateChild(), openmsx::MSXRom::getExtraDeviceInfo(), openmsx::SettingImplBase::init(), openmsx::MSXMotherBoard::Impl::isTurboR(), openmsx::HotKey::loadBindings(), openmsx::SettingsManager::loadSettings(), openmsx::RenShaTurbo::RenShaTurbo(), and setChildData().
| XMLElement * openmsx::XMLElement::findChild | ( | string_ref | name | ) |
Definition at line 130 of file XMLElement.cc.
| const XMLElement * openmsx::XMLElement::findChildWithAttribute | ( | string_ref | name, |
| string_ref | attName, | ||
| string_ref | attValue | ||
| ) | const |
Definition at line 174 of file XMLElement.cc.
Referenced by getCreateChildWithAttribute(), and openmsx::SettingImplBase::init().
| XMLElement * openmsx::XMLElement::findChildWithAttribute | ( | string_ref | name, |
| string_ref | attName, | ||
| string_ref | attValue | ||
| ) |
Definition at line 162 of file XMLElement.cc.
| const XMLElement * openmsx::XMLElement::findNextChild | ( | string_ref | name, |
| size_t & | fromIndex | ||
| ) | const |
Definition at line 144 of file XMLElement.cc.
| const string & openmsx::XMLElement::getAttribute | ( | string_ref | attName | ) | const |
Definition at line 258 of file XMLElement.cc.
Referenced by openmsx::DeviceConfig::getAttribute().
| string_ref openmsx::XMLElement::getAttribute | ( | string_ref | attName, |
| string_ref | defaultValue | ||
| ) | const |
Definition at line 268 of file XMLElement.cc.
| bool openmsx::XMLElement::getAttributeAsBool | ( | string_ref | attName, |
| bool | defaultValue = false |
||
| ) | const |
Definition at line 275 of file XMLElement.cc.
References StringOp::stringToBool().
| int openmsx::XMLElement::getAttributeAsInt | ( | string_ref | attName, |
| int | defaultValue = 0 |
||
| ) | const |
Definition at line 283 of file XMLElement.cc.
References StringOp::stringToInt().
Referenced by openmsx::DeviceConfig::getAttributeAsInt().
| const XMLElement & openmsx::XMLElement::getChild | ( | string_ref | name | ) | const |
Definition at line 189 of file XMLElement.cc.
Referenced by openmsx::DeviceConfig::getChild(), getChildData(), openmsx::MSXMotherBoard::Impl::isTurboR(), openmsx::MB89352::MB89352(), and openmsx::WD33C93::WD33C93().
| XMLElement & openmsx::XMLElement::getChild | ( | string_ref | name | ) |
Definition at line 181 of file XMLElement.cc.
References findChild().
| const string & openmsx::XMLElement::getChildData | ( | string_ref | name | ) | const |
Definition at line 215 of file XMLElement.cc.
References getChild(), and getData().
Referenced by openmsx::DeviceConfig::getChildData(), openmsx::MSXMotherBoard::Impl::getJoystickPort(), and openmsx::SoundDevice::registerSound().
| string_ref openmsx::XMLElement::getChildData | ( | string_ref | name, |
| string_ref | defaultValue | ||
| ) | const |
Definition at line 220 of file XMLElement.cc.
References findChild().
| bool openmsx::XMLElement::getChildDataAsBool | ( | string_ref | name, |
| bool | defaultValue = false |
||
| ) | const |
Definition at line 227 of file XMLElement.cc.
References findChild(), and StringOp::stringToBool().
Referenced by openmsx::DeviceConfig::getChildDataAsBool().
| int openmsx::XMLElement::getChildDataAsInt | ( | string_ref | name, |
| int | defaultValue = 0 |
||
| ) | const |
Definition at line 233 of file XMLElement.cc.
References findChild(), and StringOp::stringToInt().
Referenced by openmsx::DeviceConfig::getChildDataAsInt(), and openmsx::SoundDevice::registerSound().
|
inline |
Definition at line 48 of file XMLElement.hh.
Referenced by openmsx::MB89352::MB89352(), openmsx::SoundDevice::registerSound(), openmsx::Rom::Rom(), and openmsx::WD33C93::WD33C93().
| std::vector< const XMLElement * > openmsx::XMLElement::getChildren | ( | string_ref | name | ) | const |
Definition at line 119 of file XMLElement.cc.
| XMLElement & openmsx::XMLElement::getCreateChild | ( | string_ref | name, |
| string_ref | defaultValue = "" |
||
| ) |
Definition at line 194 of file XMLElement.cc.
References addChild(), findChild(), and XMLElement().
Referenced by openmsx::HotKey::saveBindings(), and openmsx::Setting::sync().
| XMLElement & openmsx::XMLElement::getCreateChildWithAttribute | ( | string_ref | name, |
| string_ref | attName, | ||
| string_ref | attValue | ||
| ) |
Definition at line 203 of file XMLElement.cc.
References addChild(), findChildWithAttribute(), and XMLElement().
|
inline |
Definition at line 36 of file XMLElement.hh.
Referenced by getChildData(), getDataAsBool(), getDataAsDouble(), getDataAsInt(), openmsx::MSXRom::getExtraDeviceInfo(), openmsx::MB89352::MB89352(), openmsx::MSXFDC::MSXFDC(), and openmsx::WD33C93::WD33C93().
| bool openmsx::XMLElement::getDataAsBool | ( | ) | const |
Definition at line 88 of file XMLElement.cc.
References getData(), and StringOp::stringToBool().
| double openmsx::XMLElement::getDataAsDouble | ( | ) | const |
Definition at line 98 of file XMLElement.cc.
References getData(), and StringOp::stringToDouble().
| int openmsx::XMLElement::getDataAsInt | ( | ) | const |
Definition at line 93 of file XMLElement.cc.
References getData(), and StringOp::stringToInt().
|
static |
Definition at line 344 of file XMLElement.cc.
Referenced by openmsx::HardwareConfig::serialize().
|
inline |
Definition at line 31 of file XMLElement.hh.
Referenced by openmsx::DeviceFactory::create(), openmsx::XmlInputArchive::endTag(), findNextChild(), and openmsx::XMLLoader::load().
| bool openmsx::XMLElement::hasAttribute | ( | string_ref | name | ) | const |
Definition at line 253 of file XMLElement.cc.
|
inline |
Definition at line 49 of file XMLElement.hh.
| void openmsx::XMLElement::removeAllChildren | ( | ) |
Definition at line 248 of file XMLElement.cc.
Referenced by openmsx::HotKey::saveBindings().
| void openmsx::XMLElement::removeAttribute | ( | string_ref | name | ) |
Definition at line 80 of file XMLElement.cc.
| void openmsx::XMLElement::removeChild | ( | const XMLElement & | child | ) |
Definition at line 43 of file XMLElement.cc.
Referenced by openmsx::Setting::sync().
| void openmsx::XMLElement::serialize | ( | Archive & | ar, |
| unsigned | version | ||
| ) |
Definition at line 361 of file XMLElement.cc.
| void openmsx::XMLElement::setAttribute | ( | string_ref | name, |
| string_ref | value | ||
| ) |
Definition at line 70 of file XMLElement.cc.
References string_ref::str().
Referenced by openmsx::HardwareConfig::parseSlots().
| void openmsx::XMLElement::setChildData | ( | string_ref | name, |
| string_ref | value | ||
| ) |
Definition at line 239 of file XMLElement.cc.
References addChild(), findChild(), and XMLElement().
Referenced by openmsx::RomFactory::create().
| void openmsx::XMLElement::setData | ( | string_ref | data | ) |
Definition at line 113 of file XMLElement.cc.
References string_ref::str().
| void openmsx::XMLElement::setName | ( | string_ref | name | ) |
Definition at line 103 of file XMLElement.cc.
References string_ref::str().
Referenced by openmsx::HardwareConfig::createRomConfig().
|
static |
Definition at line 334 of file XMLElement.cc.
1.8.1.2