Doxygen
Loading...
Searching...
No Matches
xmlgen.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2020 by 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 */
12
13#ifndef XMLGEN_H
14#define XMLGEN_H
15
16#include "outputgen.h"
17
18class TextStream;
19
21{
22 public:
24
25 OutputType type() const override { return OutputType::XML; }
26
27 void codify(const QCString &text) override;
28 void stripCodeComments(bool b) override;
29 void startSpecialComment() override;
30 void endSpecialComment() override;
31 void setStripIndentAmount(size_t amount) override;
32 std::unique_ptr<OutputCodeIntf> clone() override { return std::make_unique<XMLCodeGenerator>(*this); }
34 const QCString &ref,const QCString &file,
35 const QCString &anchor,const QCString &name,
36 const QCString &tooltip) override;
37 void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
38 const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
39 ) override;
40 void startCodeLine(int) override;
41 void endCodeLine() override;
42 void startFontClass(const QCString &colorClass) override;
43 void endFontClass() override;
44 void writeCodeAnchor(const QCString &) override;
45 void writeLineNumber(const QCString &extRef,const QCString &compId,
46 const QCString &anchorId,int l,bool writeLineAnchor) override;
47 void startCodeFragment(const QCString &) override;
48 void endCodeFragment(const QCString &) override;
49 void startFold(int,const QCString &,const QCString &) override {}
50 void endFold() override {}
51
52 void finish();
53
54 private:
58 int m_lineNumber = -1;
59 bool m_isMemberRef = false;
60 size_t m_col = 0;
61
62 bool m_insideCodeLine = false;
64 bool m_insideSpecialHL = false;
65 bool m_stripCodeComments = false;
66 bool m_hide = false;
68};
69
70void generateXML();
71
72#endif
OutputCodeIntf()=default
This is an alternative implementation of QCString.
Definition qcstring.h:101
Text streaming class that buffers data.
Definition textstream.h:36
void startFold(int, const QCString &, const QCString &) override
Definition xmlgen.h:49
void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &) override
Definition xmlgen.cpp:247
bool m_insideSpecialHL
Definition xmlgen.h:64
OutputType type() const override
Definition xmlgen.h:25
void setStripIndentAmount(size_t amount) override
Definition xmlgen.cpp:226
void codify(const QCString &text) override
Generator for producing XML formatted source code.
Definition xmlgen.cpp:200
void endCodeLine() override
Definition xmlgen.cpp:286
size_t m_stripIndentAmount
Definition xmlgen.h:67
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
Definition xmlgen.cpp:231
void startCodeLine(int) override
Definition xmlgen.cpp:255
void startSpecialComment() override
Definition xmlgen.cpp:221
bool m_normalHLNeedStartTag
Definition xmlgen.h:63
void endSpecialComment() override
Definition xmlgen.cpp:216
void endFold() override
Definition xmlgen.h:50
bool m_insideCodeLine
Definition xmlgen.h:62
void stripCodeComments(bool b) override
Definition xmlgen.cpp:211
void startFontClass(const QCString &colorClass) override
Definition xmlgen.cpp:305
bool m_stripCodeComments
Definition xmlgen.h:65
QCString m_refId
Definition xmlgen.h:56
void writeLineNumber(const QCString &extRef, const QCString &compId, const QCString &anchorId, int l, bool writeLineAnchor) override
Definition xmlgen.cpp:332
size_t m_col
Definition xmlgen.h:60
QCString m_external
Definition xmlgen.h:57
TextStream * m_t
Definition xmlgen.h:55
void endCodeFragment(const QCString &) override
Definition xmlgen.cpp:361
XMLCodeGenerator(TextStream *t)
Definition xmlgen.cpp:195
void endFontClass() override
Definition xmlgen.cpp:318
void writeCodeAnchor(const QCString &) override
Definition xmlgen.cpp:326
std::unique_ptr< OutputCodeIntf > clone() override
Definition xmlgen.h:32
bool m_isMemberRef
Definition xmlgen.h:59
void startCodeFragment(const QCString &) override
Definition xmlgen.cpp:355
OutputType
Definition outputgen.h:59
CodeSymbolType
Definition types.h:319
void generateXML()
Definition xmlgen.cpp:2178