doxygen
xmlgen.h
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 
18 class TextStream;
19 
21 {
22  public:
23 
25  virtual ~XMLCodeGenerator() { }
26 
27  void codify(const QCString &text) override;
28  void writeCodeLink(CodeSymbolType type,
29  const QCString &ref,const QCString &file,
30  const QCString &anchor,const QCString &name,
31  const QCString &tooltip) override;
32  void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
33  const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
34  ) override;
35  void startCodeLine(bool) override;
36  void endCodeLine() override;
37  void startFontClass(const QCString &colorClass) override;
38  void endFontClass() override;
39  void writeCodeAnchor(const QCString &) override;
40  void writeLineNumber(const QCString &extRef,const QCString &compId,
41  const QCString &anchorId,int l,bool writeLineAnchor) override;
42  void setCurrentDoc(const Definition *,const QCString &,bool) override {}
43  void addWord(const QCString &,bool) override {}
44  void startCodeFragment(const QCString &) override;
45  void endCodeFragment(const QCString &) override;
46 
47  void finish();
48 
49  private:
50  TextStream &m_t;
51  QCString m_refId;
52  QCString m_external;
53  int m_lineNumber;
54  bool m_isMemberRef;
55  int m_col;
56 
57  bool m_insideCodeLine;
58  bool m_normalHLNeedStartTag;
59  bool m_insideSpecialHL;
60 };
61 
62 void generateXML();
63 
64 #endif
void startFontClass(const QCString &colorClass) override
Definition: xmlgen.cpp:306
void writeLineNumber(const QCString &extRef, const QCString &compId, const QCString &anchorId, int l, bool writeLineAnchor) override
Definition: xmlgen.cpp:327
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
Definition: xmlgen.cpp:244
Text streaming class that buffers data.
Definition: textstream.h:33
void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &) override
Definition: xmlgen.cpp:258
void writeCodeAnchor(const QCString &) override
Definition: xmlgen.cpp:323
void codify(const QCString &text) override
Generator for producing XML formatted source code.
Definition: xmlgen.cpp:234
Definition: xmlgen.h:20
void endFontClass() override
Definition: xmlgen.cpp:317
void endCodeFragment(const QCString &) override
Definition: xmlgen.cpp:352
void endCodeLine() override
Definition: xmlgen.cpp:292
This is an alternative implementation of QCString.
Definition: qcstring.h:108
Output interface for code parser.
Definition: outputgen.h:61
Definition: outputgen.h:50
void startCodeFragment(const QCString &) override
Definition: xmlgen.cpp:347
Definition: outputgen.h:42