openMSX
Public Member Functions | Static Public Member Functions | Friends | List of all members
openmsx::XMLDocument Class Reference

#include <XMLElement.hh>

Public Member Functions

template<typename ... Args>
 XMLDocument (Args &&...args)
 
void load (const std::string &filename, std::string_view systemID)
 
const XMLElementgetRoot () const
 
void setRoot (XMLElement *root_)
 
XMLElementallocateElement (const char *name)
 
XMLElementallocateElement (const char *name, const char *data)
 
XMLAttributeallocateAttribute (const char *name, const char *value)
 
const char * allocateString (std::string_view str)
 
XMLElementgetOrCreateChild (XMLElement &parent, const char *childName, const char *childData)
 
XMLElementsetChildData (XMLElement &parent, const char *childName, const char *childData)
 
void setAttribute (XMLElement &elem, const char *attrName, const char *attrValue)
 
template<typename Range , typename UnaryOp >
void generateList (XMLElement &parent, const char *itemName, Range &&range, UnaryOp op)
 
void load (OldXMLElement &elem)
 
void serialize (MemInputArchive &ar, unsigned version)
 
void serialize (MemOutputArchive &ar, unsigned version)
 
void serialize (XmlInputArchive &ar, unsigned version)
 
void serialize (XmlOutputArchive &ar, unsigned version)
 

Static Public Member Functions

static XMLDocumentgetStaticDocument ()
 

Friends

class XMLDocumentHandler
 

Detailed Description

Definition at line 253 of file XMLElement.hh.

Constructor & Destructor Documentation

◆ XMLDocument()

template<typename ... Args>
openmsx::XMLDocument::XMLDocument ( Args &&...  args)
inline

Definition at line 266 of file XMLElement.hh.

Member Function Documentation

◆ allocateAttribute()

XMLAttribute * openmsx::XMLDocument::allocateAttribute ( const char *  name,
const char *  value 
)

◆ allocateElement() [1/2]

XMLElement * openmsx::XMLDocument::allocateElement ( const char *  name)

◆ allocateElement() [2/2]

XMLElement * openmsx::XMLDocument::allocateElement ( const char *  name,
const char *  data 
)

Definition at line 299 of file XMLElement.cc.

References monotonic_allocator::allocate().

◆ allocateString()

const char * openmsx::XMLDocument::allocateString ( std::string_view  str)

◆ generateList()

template<typename Range , typename UnaryOp >
void openmsx::XMLDocument::generateList ( XMLElement parent,
const char *  itemName,
Range &&  range,
UnaryOp  op 
)
inline

Definition at line 285 of file XMLElement.hh.

References allocateElement().

Referenced by openmsx::HardwareConfig::createRomConfig().

◆ getOrCreateChild()

XMLElement * openmsx::XMLDocument::getOrCreateChild ( XMLElement parent,
const char *  childName,
const char *  childData 
)

Definition at line 170 of file XMLElement.cc.

References allocateElement().

◆ getRoot()

const XMLElement* openmsx::XMLDocument::getRoot ( ) const
inline

◆ getStaticDocument()

static XMLDocument& openmsx::XMLDocument::getStaticDocument ( )
inlinestatic

◆ load() [1/2]

void openmsx::XMLDocument::load ( const std::string &  filename,
std::string_view  systemID 
)

◆ load() [2/2]

void openmsx::XMLDocument::load ( OldXMLElement elem)

Definition at line 512 of file XMLElement.cc.

◆ serialize() [1/4]

void openmsx::XMLDocument::serialize ( MemInputArchive ar,
unsigned  version 
)

Definition at line 389 of file XMLElement.cc.

◆ serialize() [2/4]

void openmsx::XMLDocument::serialize ( MemOutputArchive ar,
unsigned  version 
)

Definition at line 415 of file XMLElement.cc.

References openmsx::MemOutputArchive::save().

◆ serialize() [3/4]

void openmsx::XMLDocument::serialize ( XmlInputArchive ar,
unsigned  version 
)

◆ serialize() [4/4]

void openmsx::XMLDocument::serialize ( XmlOutputArchive ar,
unsigned  version 
)

Definition at line 477 of file XMLElement.cc.

References openmsx::XmlOutputArchive::getXMLOutputStream().

◆ setAttribute()

void openmsx::XMLDocument::setAttribute ( XMLElement elem,
const char *  attrName,
const char *  attrValue 
)

Definition at line 209 of file XMLElement.cc.

References allocateAttribute().

◆ setChildData()

XMLElement * openmsx::XMLDocument::setChildData ( XMLElement parent,
const char *  childName,
const char *  childData 
)

Definition at line 189 of file XMLElement.cc.

References allocateElement().

◆ setRoot()

void openmsx::XMLDocument::setRoot ( XMLElement root_)
inline

Definition at line 273 of file XMLElement.hh.

Friends And Related Function Documentation

◆ XMLDocumentHandler

friend class XMLDocumentHandler
friend

Definition at line 315 of file XMLElement.hh.


The documentation for this class was generated from the following files: