#ifndef __C_XML_WRITER_H_INCLUDED__
#define __C_XML_WRITER_H_INCLUDED__
#include <wchar.h>
#include "IXMLWriter.h"
#include "IWriteFile.h"
namespace irr
{
namespace io
{
class CXMLWriter : public IXMLWriter
{
public:
CXMLWriter(IWriteFile* file);
virtual ~CXMLWriter();
virtual void writeXMLHeader();
virtual void writeElement(const wchar_t* name, bool empty=false,
const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0,
const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0,
const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0,
const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0,
const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0);
virtual void writeElement(const wchar_t* name, bool empty,
core::array<core::stringw> &names, core::array<core::stringw> &values);
virtual void writeComment(const wchar_t* comment);
virtual void writeClosingTag(const wchar_t* name);
virtual void writeText(const wchar_t* text);
virtual void writeLineBreak();
struct XMLSpecialCharacters
{
wchar_t Character;
const wchar_t* Symbol;
};
private:
void writeAttribute(const wchar_t* att, const wchar_t* name);
IWriteFile* File;
s32 Tabs;
bool TextWrittenLast;
};
}
}
#endif