|
Packit Service |
50c9f2 |
/*
|
|
Packit Service |
50c9f2 |
* Copyright (C) 2008 by Sebastian Pipping.
|
|
Packit Service |
50c9f2 |
* Copyright (C) 2008 Dimitri van Heesch.
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit Service |
50c9f2 |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit Service |
50c9f2 |
* granted. No representations are made about the suitability of this software
|
|
Packit Service |
50c9f2 |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit Service |
50c9f2 |
* See the GNU General Public License for more details.
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit Service |
50c9f2 |
* input used in their production; they are not affected by this license.
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* Sebastian Pipping <sebastian@pipping.org>
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
#ifndef QHPXMLWRITER_H
|
|
Packit Service |
50c9f2 |
#define QHPXMLWRITER_H
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
#include <qstring.h>
|
|
Packit Service |
50c9f2 |
#include "ftextstream.h"
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
class QFile;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
class QhpXmlWriter
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
public:
|
|
Packit Service |
50c9f2 |
QhpXmlWriter();
|
|
Packit Service |
50c9f2 |
~QhpXmlWriter();
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
void setIndentLevel(int level);
|
|
Packit Service |
50c9f2 |
void setCompressionEnabled(bool enabled);
|
|
Packit Service |
50c9f2 |
void insert(QhpXmlWriter const & source);
|
|
Packit Service |
50c9f2 |
void dumpTo(QFile & file);
|
|
Packit Service |
50c9f2 |
void open(char const * elementName,
|
|
Packit Service |
50c9f2 |
char const * const * attributes = 0);
|
|
Packit Service |
50c9f2 |
void openClose(char const * elementName,
|
|
Packit Service |
50c9f2 |
char const * const * attributes = 0);
|
|
Packit Service |
50c9f2 |
void openCloseContent(char const * elementName, char const * content);
|
|
Packit Service |
50c9f2 |
void close(char const * elementName);
|
|
Packit Service |
50c9f2 |
void declaration(char const * version, char const * encoding);
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
static char * dupEscaped(const char * source);
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
private:
|
|
Packit Service |
50c9f2 |
void indent();
|
|
Packit Service |
50c9f2 |
void newLine();
|
|
Packit Service |
50c9f2 |
void openPureHelper(char const * elementName,
|
|
Packit Service |
50c9f2 |
char const * const * attributes, bool close);
|
|
Packit Service |
50c9f2 |
void openPure(char const * elementName,
|
|
Packit Service |
50c9f2 |
char const * const * attributes = 0);
|
|
Packit Service |
50c9f2 |
void openClosePure(char const * elementName,
|
|
Packit Service |
50c9f2 |
char const * const * attributes = 0);
|
|
Packit Service |
50c9f2 |
void closePure(char const * elementName);
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
QGString m_backend;
|
|
Packit Service |
50c9f2 |
FTextStream m_out;
|
|
Packit Service |
50c9f2 |
int m_indentLevel;
|
|
Packit Service |
50c9f2 |
bool m_curLineIndented;
|
|
Packit Service |
50c9f2 |
bool m_compress;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
};
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
#endif // QHPXMLWRITER_H
|