qhpxmlwriter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008 by Sebastian Pipping.
3  * Copyright (C) 2008 Dimitri van Heesch.
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  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  * Sebastian Pipping <sebastian@pipping.org>
15  */
16 
17 #ifndef QHPXMLWRITER_H
18 #define QHPXMLWRITER_H
19 
20 #include <qstring.h>
21 #include "ftextstream.h"
22 
23 class QFile;
24 
26 {
27  public:
28  QhpXmlWriter();
29  ~QhpXmlWriter();
30 
31  void setIndentLevel(int level);
32  void setCompressionEnabled(bool enabled);
33  void insert(QhpXmlWriter const & source);
34  void dumpTo(QFile & file);
35  void open(char const * elementName,
36  char const * const * attributes = 0);
37  void openClose(char const * elementName,
38  char const * const * attributes = 0);
39  void openCloseContent(char const * elementName, char const * content);
40  void close(char const * elementName);
41  void declaration(char const * version, char const * encoding);
42 
43  static char * dupEscaped(const char * source);
44 
45  private:
46  void indent();
47  void newLine();
48  void openPureHelper(char const * elementName,
49  char const * const * attributes, bool close);
50  void openPure(char const * elementName,
51  char const * const * attributes = 0);
52  void openClosePure(char const * elementName,
53  char const * const * attributes = 0);
54  void closePure(char const * elementName);
55 
60  bool m_compress;
61 
62 };
63 
64 #endif // QHPXMLWRITER_H
bool m_curLineIndented
Definition: qhpxmlwriter.h:59
void setIndentLevel(int level)
void close(char const *elementName)
void closePure(char const *elementName)
static char * dupEscaped(const char *source)
void openPureHelper(char const *elementName, char const *const *attributes, bool close)
void declaration(char const *version, char const *encoding)
void setCompressionEnabled(bool enabled)
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void openClosePure(char const *elementName, char const *const *attributes=0)
void open(char const *elementName, char const *const *attributes=0)
FTextStream m_out
Definition: qhpxmlwriter.h:57
void openCloseContent(char const *elementName, char const *content)
void dumpTo(QFile &file)
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QGString m_backend
Definition: qhpxmlwriter.h:56
static QCString encoding
Definition: config.cpp:1052
void openPure(char const *elementName, char const *const *attributes=0)
void openClose(char const *elementName, char const *const *attributes=0)
void insert(QhpXmlWriter const &source)