Doxygen
xmldocvisitor.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  *
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  * Documents produced by Doxygen are derivative works derived from the
15  * input used in their production; they are not affected by this license.
16  *
17  */
18 
19 #ifndef XMLDOCVISITOR_H
20 #define XMLDOCVISITOR_H
21 
22 #include <iostream>
23 
24 #include "qcstring.h"
25 #include "docvisitor.h"
26 #include "textstream.h"
27 
29 class QCString;
30 
31 /*! @brief Concrete visitor implementation for XML output. */
32 class XmlDocVisitor : public DocVisitor
33 {
34  public:
36 
37  //--------------------------------------
38  // visitor functions for leaf nodes
39  //--------------------------------------
40 
41  void visit(DocWord *);
42  void visit(DocLinkedWord *);
43  void visit(DocWhiteSpace *);
44  void visit(DocSymbol *);
45  void visit(DocEmoji *);
46  void visit(DocURL *);
47  void visit(DocLineBreak *);
48  void visit(DocHorRuler *);
49  void visit(DocStyleChange *);
50  void visit(DocVerbatim *);
51  void visit(DocAnchor *);
52  void visit(DocInclude *);
53  void visit(DocIncOperator *);
54  void visit(DocFormula *);
55  void visit(DocIndexEntry *);
56  void visit(DocSimpleSectSep *);
57  void visit(DocCite *);
58 
59  //--------------------------------------
60  // visitor functions for compound nodes
61  //--------------------------------------
62 
63  void visitPre(DocAutoList *);
64  void visitPost(DocAutoList *);
65  void visitPre(DocAutoListItem *);
66  void visitPost(DocAutoListItem *);
67  void visitPre(DocPara *) ;
68  void visitPost(DocPara *);
69  void visitPre(DocRoot *);
70  void visitPost(DocRoot *);
71  void visitPre(DocSimpleSect *);
72  void visitPost(DocSimpleSect *);
73  void visitPre(DocTitle *);
74  void visitPost(DocTitle *);
75  void visitPre(DocSimpleList *);
76  void visitPost(DocSimpleList *);
79  void visitPre(DocSection *);
80  void visitPost(DocSection *);
81  void visitPre(DocHtmlList *);
82  void visitPost(DocHtmlList *) ;
83  void visitPre(DocHtmlListItem *);
84  void visitPost(DocHtmlListItem *);
85  //void visitPre(DocHtmlPre *);
86  //void visitPost(DocHtmlPre *);
87  void visitPre(DocHtmlDescList *);
88  void visitPost(DocHtmlDescList *);
89  void visitPre(DocHtmlDescTitle *);
91  void visitPre(DocHtmlDescData *);
92  void visitPost(DocHtmlDescData *);
93  void visitPre(DocHtmlTable *);
94  void visitPost(DocHtmlTable *);
95  void visitPre(DocHtmlRow *);
96  void visitPost(DocHtmlRow *) ;
97  void visitPre(DocHtmlCell *);
98  void visitPost(DocHtmlCell *);
99  void visitPre(DocHtmlCaption *);
100  void visitPost(DocHtmlCaption *);
101  void visitPre(DocInternal *);
102  void visitPost(DocInternal *);
103  void visitPre(DocHRef *);
104  void visitPost(DocHRef *);
105  void visitPre(DocHtmlHeader *);
106  void visitPost(DocHtmlHeader *);
107  void visitPre(DocImage *);
108  void visitPost(DocImage *);
109  void visitPre(DocDotFile *);
110  void visitPost(DocDotFile *);
111 
112  void visitPre(DocMscFile *);
113  void visitPost(DocMscFile *);
114  void visitPre(DocDiaFile *);
115  void visitPost(DocDiaFile *);
116  void visitPre(DocLink *);
117  void visitPost(DocLink *);
118  void visitPre(DocRef *);
119  void visitPost(DocRef *);
120  void visitPre(DocSecRefItem *);
121  void visitPost(DocSecRefItem *);
122  void visitPre(DocSecRefList *);
123  void visitPost(DocSecRefList *);
124  //void visitPre(DocLanguage *);
125  //void visitPost(DocLanguage *);
126  void visitPre(DocParamSect *);
127  void visitPost(DocParamSect *);
128  void visitPre(DocParamList *);
129  void visitPost(DocParamList *);
130  void visitPre(DocXRefItem *);
131  void visitPost(DocXRefItem *);
132  void visitPre(DocInternalRef *);
133  void visitPost(DocInternalRef *);
134  void visitPre(DocText *);
135  void visitPost(DocText *);
136  void visitPre(DocHtmlBlockQuote *);
138  void visitPre(DocVhdlFlow *);
139  void visitPost(DocVhdlFlow *);
140  void visitPre(DocParBlock *);
141  void visitPost(DocParBlock *);
142 
143  private:
144 
145  //--------------------------------------
146  // helper functions
147  //--------------------------------------
148 
149  void filter(const QCString &str);
150  void startLink(const QCString &ref,const QCString &file,
151  const QCString &anchor);
152  void endLink();
153 
154  //--------------------------------------
155  // state variables
156  //--------------------------------------
157 
161  bool m_hide;
163 };
164 
165 #endif
DocHtmlBlockQuote
Node representing an HTML blockquote
Definition: docparser.h:1433
DocAutoListItem
Node representing an item of a auto list
Definition: docparser.h:720
DocHRef
Node representing a Hypertext reference
Definition: docparser.h:936
DocStyleChange
Node representing a style change
Definition: docparser.h:343
XmlDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: xmldocvisitor.cpp:564
XmlDocVisitor::m_hide
bool m_hide
Definition: xmldocvisitor.h:161
DocVerbatim
Node representing a verbatim, unparsed text fragment
Definition: docparser.h:510
XmlDocVisitor::m_langExt
QCString m_langExt
Definition: xmldocvisitor.h:162
DocTitle
Node representing a simple section title
Definition: docparser.h:736
XmlDocVisitor::m_t
TextStream & m_t
Definition: xmldocvisitor.h:158
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
DocDotFile
Node representing a dot file
Definition: docparser.h:830
DocHtmlTable
Node representing a HTML table
Definition: docparser.h:1405
XmlDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: xmldocvisitor.cpp:551
DocRoot
Root node of documentation tree
Definition: docparser.h:1457
DocHtmlHeader
Node Html heading
Definition: docparser.h:957
docvisitor.h
DocHtmlListItem
Node representing a HTML list item
Definition: docparser.h:1286
DocVhdlFlow
Node representing a VHDL flow chart
Definition: docparser.h:860
DocHtmlDescData
Node representing a HTML description data
Definition: docparser.h:1303
DocHtmlDescTitle
Node representing a Html description item
Definition: docparser.h:973
DocEmoji
Node representing a n emoji
Definition: docparser.h:469
DocMscFile
Node representing a msc file
Definition: docparser.h:840
DocSecRefItem
Node representing a reference to a section
Definition: docparser.h:1023
DocAnchor
Node representing an anchor
Definition: docparser.h:303
textstream.h
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DocText
Root node of a text fragment
Definition: docparser.h:1447
DocVisitor
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:92
qcstring.h
DocFormula
Node representing an item of a cross-referenced list
Definition: docparser.h:658
DocHtmlDescList
Node representing a Html description list
Definition: docparser.h:987
DocIncOperator
Node representing a include/dontinclude operator block
Definition: docparser.h:606
DocIndexEntry
Node representing an entry in the index.
Definition: docparser.h:682
DocSecRefList
Node representing a list of section references
Definition: docparser.h:1048
DocLineBreak
Node representing a line break
Definition: docparser.h:272
DocWord
Node representing a word
Definition: docparser.h:217
DocSymbol
Node representing a special symbol
Definition: docparser.h:385
DocXRefItem
Node representing an item of a cross-referenced list
Definition: docparser.h:749
DocImage
Node representing an image
Definition: docparser.h:771
DocURL
Node representing a URL (or email address)
Definition: docparser.h:256
DocHtmlCaption
Node representing a HTML table caption
Definition: docparser.h:1352
DocParamList
Node representing a parameter list.
Definition: docparser.h:1228
DocParBlock
Node representing an block of paragraphs
Definition: docparser.h:1070
DocSimpleSectSep
Node representing a separator between two simple sections of the same type.
Definition: docparser.h:1139
DocCite
Node representing a citation of some bibliographic reference
Definition: docparser.h:321
DocRef
Node representing a reference to some item
Definition: docparser.h:891
DocParamSect
Node representing a parameter section
Definition: docparser.h:1150
DocHtmlList
Node representing a Html list
Definition: docparser.h:1093
DocSimpleSect
Node representing a simple section
Definition: docparser.h:1111
DocSection
Node representing a normal section
Definition: docparser.h:1001
XmlDocVisitor::m_insidePre
bool m_insidePre
Definition: xmldocvisitor.h:160
DocHorRuler
Node representing a horizontal ruler
Definition: docparser.h:288
XmlDocVisitor::m_ci
CodeOutputInterface & m_ci
Definition: xmldocvisitor.h:159
DocInclude
Node representing an included text block from file
Definition: docparser.h:563
DocAutoList
Node representing an auto List
Definition: docparser.h:703
DocInternal
Node representing an internal section of documentation
Definition: docparser.h:1059
DocLinkedWord
Node representing a word that can be linked to something
Definition: docparser.h:231
XmlDocVisitor::visit
void visit(DocWord *)
Definition: xmldocvisitor.cpp:105
CodeOutputInterface
Output interface for code parser.
Definition: outputgen.h:61
DocDiaFile
Node representing a dia file
Definition: docparser.h:850
XmlDocVisitor::startLink
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
Definition: xmldocvisitor.cpp:1248
DocSimpleList
Node representing a simple list
Definition: docparser.h:1082
DocSimpleListItem
Node representing a simple list item
Definition: docparser.h:1266
DocWhiteSpace
Node representing some amount of white space
Definition: docparser.h:484
XmlDocVisitor::XmlDocVisitor
XmlDocVisitor(TextStream &t, CodeOutputInterface &ci, const QCString &langExt)
Definition: xmldocvisitor.cpp:95
XmlDocVisitor::endLink
void endLink()
Definition: xmldocvisitor.cpp:1260
DocHtmlCell
Node representing a HTML table cell
Definition: docparser.h:1316
XmlDocVisitor::filter
void filter(const QCString &str)
Definition: xmldocvisitor.cpp:1243
DocInternalRef
Node representing an internal reference to some item
Definition: docparser.h:919
XmlDocVisitor
Concrete visitor implementation for XML output.
Definition: xmldocvisitor.h:32
DocHtmlRow
Node representing a HTML table row
Definition: docparser.h:1371
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108