18 #ifndef INCLUDED_XMLWRITER 19 #define INCLUDED_XMLWRITER 71 #define XML_Start() XMLWriter_File xml_file_ 74 #define XML_SetPrettyPrint(enabled) xml_file_.SetPrettyPrint(false) 77 #define XML_Comment(text) xml_file_.Comment(text) 80 #define XML_Element(name) XMLWriter_Element xml_element_ (xml_file_, name) 83 #define XML_Text(text) xml_element_.Text(text, false) 86 #define XML_CDATA(text) xml_element_.Text(text, true) 89 #define XML_Attribute(name, value) xml_element_.Attribute(name, value) 92 #define XML_Setting(name, value) xml_element_.Setting(name, value) 94 #define XML_WriteXMB(xero) xml_file_.XMB(xero) 98 #define XML_StoreVFS(vfs, pathname) xml_file_.StoreVFS(vfs, pathname) 102 #define XML_GetOutput() xml_file_.GetOutput() 119 void Comment(
const char* text);
134 template <
typename T>
void ElementAttribute(
const char* name,
const T& value,
bool newelement);
153 template <
typename constCharPtr>
void Text(constCharPtr text,
bool cdata);
154 template <
typename T>
void Attribute(
const char* name,
T value) { m_File->ElementAttribute(name, value,
false); }
155 template <
typename T>
void Setting(
const char* name,
T value) { m_File->ElementAttribute(name, value,
true); }
156 void Close(
int type);
167 #endif // INCLUDED_XMLWRITER XMLWriter_File()
Definition: XMLWriter.cpp:84
const CStr & GetOutput()
Definition: XMLWriter.cpp:111
int m_Indent
Definition: XMLWriter.h:143
XMLWriter_File * m_File
Definition: XMLWriter.h:162
shared_ptr< IVFS > PIVFS
Definition: vfs.h:226
void XMB(const XMBFile &file)
Definition: XMLWriter.cpp:117
void ElementStart(XMLWriter_Element *element, const char *name)
Definition: XMLWriter.cpp:146
Definition: XeroXMB.h:160
CStr m_Name
Definition: XMLWriter.h:163
int m_Type
Definition: XMLWriter.h:164
void Setting(const char *name, T value)
Definition: XMLWriter.h:155
CStr m_Data
Definition: XMLWriter.h:142
void ElementAttribute(const char *name, const T &value, bool newelement)
Definition: XMLWriter.h:112
XMLWriter_Element * m_LastElement
Definition: XMLWriter.h:144
CStr Indent()
Definition: XMLWriter.cpp:141
Definition: XMLWriter.h:147
void Comment(const char *text)
Definition: XMLWriter.cpp:133
#define T(string_literal)
Definition: secure_crt.cpp:76
Definition: XeroXMB.h:115
void SetPrettyPrint(bool enabled)
Definition: XMLWriter.h:117
void ElementEnd(const char *name, int type)
Definition: XMLWriter.cpp:167
void ElementClose()
Definition: XMLWriter.cpp:162
void Attribute(const char *name, T value)
Definition: XMLWriter.h:154
bool m_PrettyPrint
Definition: XMLWriter.h:140
Definition: vfs_util.cpp:39
friend class XMLWriter_Element
Definition: XMLWriter.h:128
void ElementText(const char *text, bool cdata)
Definition: XMLWriter.cpp:197
void ElementXMB(const XMBFile &file, XMBElement el)
Definition: XMLWriter.cpp:122
bool StoreVFS(const PIVFS &vfs, const VfsPath &pathname)
Definition: XMLWriter.cpp:94