diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CXMLWriter.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CXMLWriter.h | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CXMLWriter.h b/libraries/irrlicht-1.8/source/Irrlicht/CXMLWriter.h index 9a69e71..5eccf36 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CXMLWriter.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CXMLWriter.h | |||
@@ -1,76 +1,76 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_XML_WRITER_H_INCLUDED__ | 5 | #ifndef __C_XML_WRITER_H_INCLUDED__ |
6 | #define __C_XML_WRITER_H_INCLUDED__ | 6 | #define __C_XML_WRITER_H_INCLUDED__ |
7 | 7 | ||
8 | #include <wchar.h> | 8 | #include <wchar.h> |
9 | #include "IXMLWriter.h" | 9 | #include "IXMLWriter.h" |
10 | #include "IWriteFile.h" | 10 | #include "IWriteFile.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace io | 14 | namespace io |
15 | { | 15 | { |
16 | 16 | ||
17 | //! Interface providing methods for making it easier to write XML files. | 17 | //! Interface providing methods for making it easier to write XML files. |
18 | class CXMLWriter : public IXMLWriter | 18 | class CXMLWriter : public IXMLWriter |
19 | { | 19 | { |
20 | public: | 20 | public: |
21 | 21 | ||
22 | //! Constructor | 22 | //! Constructor |
23 | CXMLWriter(IWriteFile* file); | 23 | CXMLWriter(IWriteFile* file); |
24 | 24 | ||
25 | //! Destructor | 25 | //! Destructor |
26 | virtual ~CXMLWriter(); | 26 | virtual ~CXMLWriter(); |
27 | 27 | ||
28 | //! Writes a xml 1.0 header like <?xml version="1.0"?> | 28 | //! Writes a xml 1.0 header like <?xml version="1.0"?> |
29 | virtual void writeXMLHeader(); | 29 | virtual void writeXMLHeader(); |
30 | 30 | ||
31 | //! Writes an xml element with maximal 5 attributes | 31 | //! Writes an xml element with maximal 5 attributes |
32 | virtual void writeElement(const wchar_t* name, bool empty=false, | 32 | virtual void writeElement(const wchar_t* name, bool empty=false, |
33 | const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0, | 33 | const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0, |
34 | const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0, | 34 | const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0, |
35 | const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0, | 35 | const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0, |
36 | const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0, | 36 | const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0, |
37 | const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0); | 37 | const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0); |
38 | 38 | ||
39 | //! Writes an xml element with any number of attributes | 39 | //! Writes an xml element with any number of attributes |
40 | virtual void writeElement(const wchar_t* name, bool empty, | 40 | virtual void writeElement(const wchar_t* name, bool empty, |
41 | core::array<core::stringw> &names, core::array<core::stringw> &values); | 41 | core::array<core::stringw> &names, core::array<core::stringw> &values); |
42 | 42 | ||
43 | //! Writes a comment into the xml file | 43 | //! Writes a comment into the xml file |
44 | virtual void writeComment(const wchar_t* comment); | 44 | virtual void writeComment(const wchar_t* comment); |
45 | 45 | ||
46 | //! Writes the closing tag for an element. Like </foo> | 46 | //! Writes the closing tag for an element. Like </foo> |
47 | virtual void writeClosingTag(const wchar_t* name); | 47 | virtual void writeClosingTag(const wchar_t* name); |
48 | 48 | ||
49 | //! Writes a text into the file. All occurrences of special characters like | 49 | //! Writes a text into the file. All occurrences of special characters like |
50 | //! & (&), < (<), > (>), and " (") are automaticly replaced. | 50 | //! & (&), < (<), > (>), and " (") are automaticly replaced. |
51 | virtual void writeText(const wchar_t* text); | 51 | virtual void writeText(const wchar_t* text); |
52 | 52 | ||
53 | //! Writes a line break | 53 | //! Writes a line break |
54 | virtual void writeLineBreak(); | 54 | virtual void writeLineBreak(); |
55 | 55 | ||
56 | struct XMLSpecialCharacters | 56 | struct XMLSpecialCharacters |
57 | { | 57 | { |
58 | wchar_t Character; | 58 | wchar_t Character; |
59 | const wchar_t* Symbol; | 59 | const wchar_t* Symbol; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | private: | 62 | private: |
63 | 63 | ||
64 | void writeAttribute(const wchar_t* att, const wchar_t* name); | 64 | void writeAttribute(const wchar_t* att, const wchar_t* name); |
65 | 65 | ||
66 | IWriteFile* File; | 66 | IWriteFile* File; |
67 | s32 Tabs; | 67 | s32 Tabs; |
68 | 68 | ||
69 | bool TextWrittenLast; | 69 | bool TextWrittenLast; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | } // end namespace irr | 72 | } // end namespace irr |
73 | } // end namespace io | 73 | } // end namespace io |
74 | 74 | ||
75 | #endif | 75 | #endif |
76 | 76 | ||