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

#include <XMLElement.hh>

Public Member Functions

 XMLDocument (const XMLDocument &)=delete
 
 XMLDocument (XMLDocument &&)=delete
 
XMLDocumentoperator= (const XMLDocument &)=delete
 
XMLDocumentoperator= (XMLDocument &&)=delete
 
 XMLDocument ()=default
 
template<typename T , typename ... Args>
requires (!std::same_as<XMLDocument, std::remove_cvref_t<T>>)
 XMLDocument (T &&t, 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 (const OldXMLElement &elem)
 
void serialize (MemInputArchive &ar, unsigned version)
 
void serialize (MemOutputArchive &ar, unsigned version) const
 
void serialize (XmlInputArchive &ar, unsigned version)
 
void serialize (XmlOutputArchive &ar, unsigned version) const
 

Static Public Member Functions

static XMLDocumentgetStaticDocument ()
 

Friends

class XMLDocumentHandler
 

Detailed Description

Definition at line 262 of file XMLElement.hh.

Constructor & Destructor Documentation

◆ XMLDocument() [1/4]

openmsx::XMLDocument::XMLDocument ( const XMLDocument )
delete

◆ XMLDocument() [2/4]

openmsx::XMLDocument::XMLDocument ( XMLDocument &&  )
delete

◆ XMLDocument() [3/4]

openmsx::XMLDocument::XMLDocument ( )
default

◆ XMLDocument() [4/4]

template<typename T , typename ... Args>
requires (!std::same_as<XMLDocument, std::remove_cvref_t<T>>)
openmsx::XMLDocument::XMLDocument ( T &&  t,
Args &&...  args 
)
inline

Definition at line 284 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 300 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 303 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 171 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 OldXMLElement elem)

Definition at line 512 of file XMLElement.cc.

◆ load() [2/2]

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

◆ operator=() [1/2]

XMLDocument & openmsx::XMLDocument::operator= ( const XMLDocument )
delete

◆ operator=() [2/2]

XMLDocument & openmsx::XMLDocument::operator= ( XMLDocument &&  )
delete

◆ 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 
) const

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 
) const

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 210 of file XMLElement.cc.

References allocateAttribute().

◆ setChildData()

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

Definition at line 190 of file XMLElement.cc.

References allocateElement().

◆ setRoot()

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

Definition at line 291 of file XMLElement.hh.

Friends And Related Symbol Documentation

◆ XMLDocumentHandler

friend class XMLDocumentHandler
friend

Definition at line 333 of file XMLElement.hh.


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