textdocvisitor.h
Go to the documentation of this file.
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 "docvisitor.h"
23 #include "docparser.h"
24 #include <qstack.h>
25 #include <qcstring.h>
26 #include "ftextstream.h"
27 
28 
29 /*! @brief Concrete visitor implementation for TEXT output. */
30 class TextDocVisitor : public DocVisitor
31 {
32  public:
34 
35  //--------------------------------------
36  // visitor functions for leaf nodes
37  //--------------------------------------
38 
39  void visit(DocWord *w) { filter(w->word()); }
40  void visit(DocLinkedWord *w) { filter(w->word()); }
41  void visit(DocWhiteSpace *) { m_t << " "; }
42  void visit(DocSymbol *);
43  void visit(DocURL *u) { filter(u->url()); }
44  void visit(DocLineBreak *) { m_t << " "; }
45  void visit(DocHorRuler *) {}
46  void visit(DocStyleChange *) {}
47  void visit(DocVerbatim *s) { filter(s->text()); }
48  void visit(DocAnchor *) {}
49  void visit(DocInclude *) {}
50  void visit(DocIncOperator *) {}
51  void visit(DocFormula *) {}
52  void visit(DocIndexEntry *) {}
54  void visit(DocCite *) {}
55 
56  //--------------------------------------
57  // visitor functions for compound nodes
58  //--------------------------------------
59 
60  void visitPre(DocAutoList *) {}
64  void visitPre(DocPara *) {}
65  void visitPost(DocPara *) {}
66  void visitPre(DocRoot *) {}
67  void visitPost(DocRoot *) {}
70  void visitPre(DocTitle *) {}
71  void visitPost(DocTitle *) {}
76  void visitPre(DocSection *) {}
77  void visitPost(DocSection *) {}
78  void visitPre(DocHtmlList *) {}
90  void visitPre(DocHtmlRow *) {}
91  void visitPost(DocHtmlRow *) {}
92  void visitPre(DocHtmlCell *) {}
96  void visitPre(DocInternal *) {}
98  void visitPre(DocHRef *) {}
99  void visitPost(DocHRef *) {}
102  void visitPre(DocImage *) {}
103  void visitPost(DocImage *) {}
104  void visitPre(DocDotFile *) {}
106 
107  void visitPre(DocMscFile *) {}
109  void visitPre(DocDiaFile *) {}
111  void visitPre(DocLink *) {}
112  void visitPost(DocLink *) {}
113  void visitPre(DocRef *) {}
114  void visitPost(DocRef *) {}
127  void visitPre(DocCopy *) {}
128  void visitPost(DocCopy *) {}
129  void visitPre(DocText *) {}
130  void visitPost(DocText *) {}
137 
138  private:
139 
140  void filter(const char *str);
141 
143 };
144 
145 #endif
void visitPre(DocHtmlRow *)
void visitPre(DocInternalRef *)
void visitPre(DocSecRefList *)
Concrete visitor implementation for TEXT output.
void visitPost(DocMscFile *)
QCString url() const
Definition: docparser.h:239
void visit(DocLineBreak *)
void visitPost(DocRoot *)
void visitPost(DocHtmlCaption *)
void visitPre(DocAutoList *)
void visit(DocInclude *)
void visitPost(DocSimpleListItem *)
void visitPost(DocHtmlListItem *)
void visitPre(DocHtmlBlockQuote *)
void visitPost(DocSimpleList *)
void visitPre(DocHtmlCaption *)
void visitPre(DocHRef *)
void visitPre(DocText *)
void visitPost(DocXRefItem *)
void visitPre(DocHtmlDescTitle *)
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void visitPre(DocMscFile *)
void visitPost(DocParamList *)
void visitPre(DocHtmlDescData *)
void visitPost(DocParamSect *)
void visit(DocCite *)
void visitPre(DocSimpleList *)
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:90
void visitPre(DocHtmlList *)
void visit(DocHorRuler *)
void visit(DocSimpleSectSep *)
const int DocVisitor_Text
Definition: docvisitor.h:28
void visit(DocWord *w)
void visitPost(DocText *)
void visitPost(DocHtmlDescList *)
QCString text() const
Definition: docparser.h:450
FTextStream & m_t
void visitPre(DocTitle *)
void visitPost(DocTitle *)
QCString word() const
Definition: docparser.h:199
void visitPost(DocCopy *)
void visit(DocLinkedWord *w)
void visitPre(DocDiaFile *)
void visitPost(DocHtmlHeader *)
void visitPost(DocAutoListItem *)
void visitPost(DocHtmlCell *)
void visitPre(DocSimpleSect *)
void visitPost(DocHRef *)
void visitPre(DocVhdlFlow *)
void visitPre(DocHtmlHeader *)
void visitPost(DocVhdlFlow *)
void visitPre(DocHtmlTable *)
void visitPost(DocDotFile *)
void visitPost(DocLink *)
void visit(DocStyleChange *)
void visit(DocVerbatim *s)
void visit(DocWhiteSpace *)
void visitPost(DocHtmlRow *)
void visitPost(DocHtmlDescTitle *)
void visitPost(DocImage *)
void visitPost(DocAutoList *)
void visitPre(DocXRefItem *)
QCString word() const
Definition: docparser.h:215
void visitPost(DocDiaFile *)
void visitPost(DocHtmlDescData *)
void visitPost(DocHtmlTable *)
void visit(DocFormula *)
void visitPre(DocImage *)
void visitPre(DocCopy *)
void visitPost(DocParBlock *)
void visitPre(DocInternal *)
void visitPost(DocRef *)
void visitPre(DocSection *)
void visitPost(DocInternalRef *)
void visitPre(DocHtmlCell *)
void visitPost(DocInternal *)
void visitPost(DocSecRefItem *)
void visitPre(DocDotFile *)
void visitPre(DocPara *)
void visit(DocIndexEntry *)
void visitPre(DocRoot *)
void visitPost(DocSimpleSect *)
void visitPost(DocHtmlList *)
void visit(DocIncOperator *)
void visitPost(DocSection *)
void visitPost(DocSecRefList *)
void visit(DocURL *u)
void visitPre(DocHtmlListItem *)
void visitPre(DocParBlock *)
void visitPre(DocAutoListItem *)
void visitPre(DocRef *)
void visitPre(DocParamList *)
void visitPost(DocHtmlBlockQuote *)
void visit(DocAnchor *)
void visitPost(DocPara *)
void visitPre(DocHtmlDescList *)
void visitPre(DocParamSect *)
static QCString * s
Definition: config.cpp:1042
void filter(const char *str)
static QCString str
void visitPre(DocSimpleListItem *)
TextDocVisitor(FTextStream &t)
void visitPre(DocSecRefItem *)
void visitPre(DocLink *)