equal
deleted
inserted
replaced
|
1 /****************************************************************************** |
|
2 * |
|
3 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * |
|
5 * Permission to use, copy, modify, and distribute this software and its |
|
6 * documentation under the terms of the GNU General Public License is hereby |
|
7 * granted. No representations are made about the suitability of this software |
|
8 * for any purpose. It is provided "as is" without express or implied warranty. |
|
9 * See the GNU General Public License for more details. |
|
10 * |
|
11 */ |
|
12 |
1 |
13 |
2 #ifndef _XMLWRITER_H |
14 #ifndef _XMLWRITER_H |
3 #define _XMLWRITER_H |
15 #define _XMLWRITER_H |
4 |
16 |
5 #include <qdir.h> |
17 #include <qdir.h> |
69 void indent(unsigned int aInitVal=0); |
81 void indent(unsigned int aInitVal=0); |
70 inline bool isLegalXmlChar(QChar c) const; |
82 inline bool isLegalXmlChar(QChar c) const; |
71 QString encodeText(const QString &aStr) const; |
83 QString encodeText(const QString &aStr) const; |
72 QString encodeChar(char c) const; |
84 QString encodeChar(char c) const; |
73 bool mustEncodeChar(char c) const; |
85 bool mustEncodeChar(char c) const; |
|
86 bool canIndent(); |
|
87 void setLastIndent(bool theB); |
74 private: |
88 private: |
75 QFile mFile; |
89 QFile mFile; |
76 QTextStream *mStreamP; |
90 QTextStream *mStreamP; |
77 QStack<QString> mElemStack; |
91 QStack<QString> mElemStack; |
|
92 QList<bool> mCanIndentList; |
78 bool mInElement; |
93 bool mInElement; |
79 bool mCanIndent; |
94 //bool mCanIndent; |
80 bool mIsOpen; |
95 bool mIsOpen; |
81 bool mCanWrite; |
96 bool mCanWrite; |
82 private: |
97 private: |
83 // Private cctor and op= |
98 // Private cctor and op= |
84 XmlStream (const XmlStream &rhs); |
99 XmlStream (const XmlStream &rhs); |