aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8.1/include/IXMLWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8.1/include/IXMLWriter.h')
-rw-r--r--libraries/irrlicht-1.8.1/include/IXMLWriter.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/include/IXMLWriter.h b/libraries/irrlicht-1.8.1/include/IXMLWriter.h
new file mode 100644
index 0000000..bb6901e
--- /dev/null
+++ b/libraries/irrlicht-1.8.1/include/IXMLWriter.h
@@ -0,0 +1,77 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_XML_WRITER_H_INCLUDED__
6#define __I_XML_WRITER_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "irrArray.h"
10#include "irrString.h"
11
12namespace irr
13{
14namespace io
15{
16
17 //! Interface providing methods for making it easier to write XML files.
18 /** This XML Writer writes xml files using in the platform dependent
19 wchar_t format and sets the xml-encoding correspondingly. */
20 class IXMLWriter : public virtual IReferenceCounted
21 {
22 public:
23 //! Writes an xml 1.0 header.
24 /** Looks like <?xml version="1.0"?>. This should always
25 be called before writing anything other, because also the text
26 file header for unicode texts is written out with this method. */
27 virtual void writeXMLHeader() = 0;
28
29 //! Writes an xml element with maximal 5 attributes like "<foo />" or
30 //! &lt;foo optAttr="value" /&gt;.
31 /** The element can be empty or not.
32 \param name: Name of the element
33 \param empty: Specifies if the element should be empty. Like
34 "<foo />". If You set this to false, something like this is
35 written instead: "<foo>".
36 \param attr1Name: 1st attributes name
37 \param attr1Value: 1st attributes value
38 \param attr2Name: 2nd attributes name
39 \param attr2Value: 2nd attributes value
40 \param attr3Name: 3rd attributes name
41 \param attr3Value: 3rd attributes value
42 \param attr4Name: 4th attributes name
43 \param attr4Value: 4th attributes value
44 \param attr5Name: 5th attributes name
45 \param attr5Value: 5th attributes value */
46 virtual void writeElement(const wchar_t* name, bool empty=false,
47 const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0,
48 const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0,
49 const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0,
50 const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0,
51 const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0) = 0;
52
53 //! Writes an xml element with any number of attributes
54 virtual void writeElement(const wchar_t* name, bool empty,
55 core::array<core::stringw> &names, core::array<core::stringw> &values) = 0;
56
57 //! Writes a comment into the xml file
58 virtual void writeComment(const wchar_t* comment) = 0;
59
60 //! Writes the closing tag for an element. Like "</foo>"
61 virtual void writeClosingTag(const wchar_t* name) = 0;
62
63 //! Writes a text into the file.
64 /** All occurrences of special characters such as
65 & (&amp;), < (&lt;), > (&gt;), and " (&quot;) are automaticly
66 replaced. */
67 virtual void writeText(const wchar_t* text) = 0;
68
69 //! Writes a line break
70 virtual void writeLineBreak() = 0;
71 };
72
73} // end namespace io
74} // end namespace irr
75
76#endif
77