Doxygen
qhpxmlwriter.h
浏览该文件的文档.
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 <sstream>
21 #include "textstream.h"
22 
24 {
25  public:
26  QhpXmlWriter();
27  ~QhpXmlWriter();
28 
29  void setIndentLevel(int level);
30  void setCompressionEnabled(bool enabled);
31  void insert(QhpXmlWriter const & source);
32  void dumpTo(TextStream & file);
33  void open(const QCString &elementName,
34  const char * const attributes[] = 0);
35  void openClose(const QCString &elementName,
36  const char * const attributes[] = 0);
37  void openCloseContent(const QCString &elementName, const QCString &content);
38  void close(const QCString &elementName);
39  void declaration(const QCString &version, const QCString &encoding);
40 
41  private:
42  void indent();
43  void newLine();
44  void openPureHelper(const QCString &elementName,
45  const char * const attributes[], bool close);
46  void openPure(const QCString &elementName,
47  const char * const attributes[] = 0);
48  void openClosePure(const QCString &elementName,
49  const char * const attributes[] = 0);
50  void closePure(const QCString &elementName);
51 
55  bool m_compress;
56 
57 };
58 
59 #endif // QHPXMLWRITER_H
QhpXmlWriter::declaration
void declaration(const QCString &version, const QCString &encoding)
Definition: qhpxmlwriter.cpp:85
QhpXmlWriter::openPure
void openPure(const QCString &elementName, const char *const attributes[]=0)
Definition: qhpxmlwriter.cpp:139
QhpXmlWriter::setIndentLevel
void setIndentLevel(int level)
Definition: qhpxmlwriter.cpp:30
QhpXmlWriter::dumpTo
void dumpTo(TextStream &file)
Definition: qhpxmlwriter.cpp:45
textstream.h
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
QhpXmlWriter::openClosePure
void openClosePure(const QCString &elementName, const char *const attributes[]=0)
Definition: qhpxmlwriter.cpp:145
QhpXmlWriter::QhpXmlWriter
QhpXmlWriter()
Definition: qhpxmlwriter.cpp:21
version
static void version(const bool extended)
Definition: doxygen.cpp:10515
QhpXmlWriter::m_compress
bool m_compress
Definition: qhpxmlwriter.h:55
QhpXmlWriter::close
void close(const QCString &elementName)
Definition: qhpxmlwriter.cpp:77
QhpXmlWriter::open
void open(const QCString &elementName, const char *const attributes[]=0)
Definition: qhpxmlwriter.cpp:50
QhpXmlWriter::openPureHelper
void openPureHelper(const QCString &elementName, const char *const attributes[], bool close)
Definition: qhpxmlwriter.cpp:113
QhpXmlWriter::closePure
void closePure(const QCString &elementName)
Definition: qhpxmlwriter.cpp:151
QhpXmlWriter::indent
void indent()
Definition: qhpxmlwriter.cpp:91
QhpXmlWriter::insert
void insert(QhpXmlWriter const &source)
Definition: qhpxmlwriter.cpp:40
QhpXmlWriter::m_curLineIndented
bool m_curLineIndented
Definition: qhpxmlwriter.h:54
QhpXmlWriter::m_indentLevel
int m_indentLevel
Definition: qhpxmlwriter.h:53
QhpXmlWriter::setCompressionEnabled
void setCompressionEnabled(bool enabled)
Definition: qhpxmlwriter.cpp:35
QhpXmlWriter::newLine
void newLine()
Definition: qhpxmlwriter.cpp:104
QhpXmlWriter::openClose
void openClose(const QCString &elementName, const char *const attributes[]=0)
Definition: qhpxmlwriter.cpp:59
QhpXmlWriter::m_backend
TextStream m_backend
Definition: qhpxmlwriter.h:52
QhpXmlWriter::openCloseContent
void openCloseContent(const QCString &elementName, const QCString &content)
Definition: qhpxmlwriter.cpp:67
QhpXmlWriter::~QhpXmlWriter
~QhpXmlWriter()
Definition: qhpxmlwriter.cpp:26
QhpXmlWriter
Definition: qhpxmlwriter.h:23
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108