Doxygen
textdocvisitor.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 TEXTDOCVISITOR_H
20 #define TEXTDOCVISITOR_H
21 
22 #include "qcstring.h"
23 #include "docvisitor.h"
24 #include "docparser.h"
25 #include "textstream.h"
26 
27 /*! @brief Concrete visitor implementation for TEXT output. */
28 class TextDocVisitor : public DocVisitor
29 {
30  public:
32 
33  //--------------------------------------
34  // visitor functions for leaf nodes
35  //--------------------------------------
36 
37  void visit(DocWord *w) { filter(w->word()); }
38  void visit(DocLinkedWord *w) { filter(w->word()); }
39  void visit(DocWhiteSpace *) { m_t << " "; }
40  void visit(DocSymbol *);
41  void visit(DocEmoji *);
42  void visit(DocURL *u) { filter(u->url()); }
43  void visit(DocLineBreak *) { m_t << " "; }
44  void visit(DocHorRuler *) {}
45  void visit(DocStyleChange *) {}
46  void visit(DocVerbatim *s) { filter(s->text()); }
47  void visit(DocAnchor *) {}
48  void visit(DocInclude *) {}
49  void visit(DocIncOperator *) {}
50  void visit(DocFormula *) {}
51  void visit(DocIndexEntry *) {}
52  void visit(DocSimpleSectSep *){}
53  void visit(DocCite *) {}
54 
55  //--------------------------------------
56  // visitor functions for compound nodes
57  //--------------------------------------
58 
59  void visitPre(DocAutoList *) {}
63  void visitPre(DocPara *) {}
64  void visitPost(DocPara *) {}
65  void visitPre(DocRoot *) {}
66  void visitPost(DocRoot *) {}
69  void visitPre(DocTitle *) {}
70  void visitPost(DocTitle *) {}
71  void visitPre(DocSimpleList *) {}
72  void visitPost(DocSimpleList *) {}
73  void visitPre(DocSimpleListItem *) {}
74  void visitPost(DocSimpleListItem *) {}
75  void visitPre(DocSection *) {}
76  void visitPost(DocSection *) {}
77  void visitPre(DocHtmlList *) {}
89  void visitPre(DocHtmlRow *) {}
90  void visitPost(DocHtmlRow *) {}
91  void visitPre(DocHtmlCell *) {}
95  void visitPre(DocInternal *) {}
97  void visitPre(DocHRef *) {}
98  void visitPost(DocHRef *) {}
101  void visitPre(DocImage *) {}
102  void visitPost(DocImage *) {}
103  void visitPre(DocDotFile *) {}
105 
106  void visitPre(DocMscFile *) {}
108  void visitPre(DocDiaFile *) {}
110  void visitPre(DocLink *) {}
111  void visitPost(DocLink *) {}
112  void visitPre(DocRef *) {}
113  void visitPost(DocRef *) {}
121  void visitPost(DocParamList *) {}
126  void visitPre(DocText *) {}
127  void visitPost(DocText *) {}
134 
135  private:
136 
137  void filter(const QCString &str);
138 
140 };
141 
142 #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
DocVerbatim
Node representing a verbatim, unparsed text fragment
Definition: docparser.h:510
DocVisitor_Text
const int DocVisitor_Text
Definition: docvisitor.h:29
TextDocVisitor::visitPre
void visitPre(DocSimpleSect *)
Definition: textdocvisitor.h:83
DocTitle
Node representing a simple section title
Definition: docparser.h:736
TextDocVisitor::visitPost
void visitPost(DocHtmlDescData *)
Definition: textdocvisitor.h:102
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
DocVerbatim::text
QCString text() const
Definition: docparser.h:519
DocDotFile
Node representing a dot file
Definition: docparser.h:830
DocHtmlTable
Node representing a HTML table
Definition: docparser.h:1405
TextDocVisitor::visitPost
void visitPost(DocPara *)
Definition: textdocvisitor.h:80
DocVisitor::DocVisitor
DocVisitor(int id)
Definition: docvisitor.cpp:32
TextDocVisitor::visitPost
void visitPost(DocSection *)
Definition: textdocvisitor.h:92
DocRoot
Root node of documentation tree
Definition: docparser.h:1457
TextDocVisitor::visitPre
void visitPre(DocHtmlDescList *)
Definition: textdocvisitor.h:97
DocHtmlHeader
Node Html heading
Definition: docparser.h:957
TextDocVisitor::visitPre
void visitPre(DocHtmlDescData *)
Definition: textdocvisitor.h:101
TextDocVisitor::visitPre
void visitPre(DocSecRefList *)
Definition: textdocvisitor.h:132
docvisitor.h
TextDocVisitor::visitPost
void visitPost(DocRoot *)
Definition: textdocvisitor.h:82
DocHtmlListItem
Node representing a HTML list item
Definition: docparser.h:1286
TextDocVisitor::visitPre
void visitPre(DocSection *)
Definition: textdocvisitor.h:91
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
TextDocVisitor::visitPre
void visitPre(DocSimpleListItem *)
Definition: textdocvisitor.h:89
DocEmoji
Node representing a n emoji
Definition: docparser.h:469
TextDocVisitor::visitPre
void visitPre(DocHtmlList *)
Definition: textdocvisitor.h:93
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
TextDocVisitor::visitPost
void visitPost(DocSecRefItem *)
Definition: textdocvisitor.h:131
TextDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: textdocvisitor.h:76
textstream.h
TextDocVisitor::visitPre
void visitPre(DocPara *)
Definition: textdocvisitor.h:79
TextDocVisitor::m_t
TextStream & m_t
Definition: textdocvisitor.h:155
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
TextDocVisitor::visitPre
void visitPre(DocRoot *)
Definition: textdocvisitor.h:81
TextDocVisitor::visitPre
void visitPre(DocHtmlTable *)
Definition: textdocvisitor.h:103
DocLinkedWord::word
QCString word() const
Definition: docparser.h:237
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
TextDocVisitor::visitPost
void visitPost(DocDiaFile *)
Definition: textdocvisitor.h:125
DocXRefItem
Node representing an item of a cross-referenced list
Definition: docparser.h:749
DocURL::url
QCString url() const
Definition: docparser.h:261
TextDocVisitor::visitPre
void visitPre(DocSecRefItem *)
Definition: textdocvisitor.h:130
DocImage
Node representing an image
Definition: docparser.h:771
DocURL
Node representing a URL (or email address)
Definition: docparser.h:256
TextDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: textdocvisitor.h:75
DocHtmlCaption
Node representing a HTML table caption
Definition: docparser.h:1352
TextDocVisitor::visitPre
void visitPre(DocMscFile *)
Definition: textdocvisitor.h:122
TextDocVisitor::visitPost
void visitPost(DocSimpleSect *)
Definition: textdocvisitor.h:84
TextDocVisitor::visitPost
void visitPost(DocTitle *)
Definition: textdocvisitor.h:86
TextDocVisitor::visitPost
void visitPost(DocHtmlDescTitle *)
Definition: textdocvisitor.h:100
DocParamList
Node representing a parameter list.
Definition: docparser.h:1228
TextDocVisitor::visitPre
void visitPre(DocRef *)
Definition: textdocvisitor.h:128
TextDocVisitor::visitPre
void visitPre(DocSimpleList *)
Definition: textdocvisitor.h:87
TextDocVisitor::visitPost
void visitPost(DocSecRefList *)
Definition: textdocvisitor.h:133
TextDocVisitor::TextDocVisitor
TextDocVisitor(TextStream &t)
Definition: textdocvisitor.h:47
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
TextDocVisitor::visitPost
void visitPost(DocHtmlTable *)
Definition: textdocvisitor.h:104
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
docparser.h
TextDocVisitor::visitPost
void visitPost(DocHtmlDescList *)
Definition: textdocvisitor.h:98
DocParamSect
Node representing a parameter section
Definition: docparser.h:1150
TextDocVisitor::visitPre
void visitPre(DocHtmlDescTitle *)
Definition: textdocvisitor.h:99
DocHtmlList
Node representing a Html list
Definition: docparser.h:1093
TextDocVisitor::visitPre
void visitPre(DocLink *)
Definition: textdocvisitor.h:126
TextDocVisitor::visitPost
void visitPost(DocHtmlList *)
Definition: textdocvisitor.h:94
DocSimpleSect
Node representing a simple section
Definition: docparser.h:1111
DocSection
Node representing a normal section
Definition: docparser.h:1001
DocHorRuler
Node representing a horizontal ruler
Definition: docparser.h:288
DocWord::word
QCString word() const
Definition: docparser.h:221
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
DocDiaFile
Node representing a dia file
Definition: docparser.h:850
TextDocVisitor::visitPre
void visitPre(DocHtmlListItem *)
Definition: textdocvisitor.h:95
TextDocVisitor::visitPost
void visitPost(DocMscFile *)
Definition: textdocvisitor.h:123
TextDocVisitor::visitPre
void visitPre(DocTitle *)
Definition: textdocvisitor.h:85
DocSimpleList
Node representing a simple list
Definition: docparser.h:1082
TextDocVisitor::visitPost
void visitPost(DocHtmlListItem *)
Definition: textdocvisitor.h:96
DocSimpleListItem
Node representing a simple list item
Definition: docparser.h:1266
TextDocVisitor::visitPost
void visitPost(DocLink *)
Definition: textdocvisitor.h:127
DocWhiteSpace
Node representing some amount of white space
Definition: docparser.h:484
TextDocVisitor::visitPost
void visitPost(DocSimpleListItem *)
Definition: textdocvisitor.h:90
TextDocVisitor::visitPost
void visitPost(DocRef *)
Definition: textdocvisitor.h:129
DocHtmlCell
Node representing a HTML table cell
Definition: docparser.h:1316
TextDocVisitor::visit
void visit(DocWord *w)
Definition: textdocvisitor.h:53
TextDocVisitor::visitPre
void visitPre(DocDiaFile *)
Definition: textdocvisitor.h:124
DocInternalRef
Node representing an internal reference to some item
Definition: docparser.h:919
TextDocVisitor::visitPost
void visitPost(DocAutoListItem *)
Definition: textdocvisitor.h:78
TextDocVisitor::filter
void filter(const QCString &str)
Definition: textdocvisitor.cpp:53
DocHtmlRow
Node representing a HTML table row
Definition: docparser.h:1371
TextDocVisitor::visitPre
void visitPre(DocAutoListItem *)
Definition: textdocvisitor.h:77
TextDocVisitor
Concrete visitor implementation for TEXT output.
Definition: textdocvisitor.h:28
TextDocVisitor::visitPost
void visitPost(DocSimpleList *)
Definition: textdocvisitor.h:88
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108