xmldocvisitor.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 _XMLDOCVISITOR_H
20 #define _XMLDOCVISITOR_H
21 
22 #include "docvisitor.h"
23 #include <qstack.h>
24 #include <qcstring.h>
25 
26 class FTextStream;
28 class QCString;
29 
30 /*! @brief Concrete visitor implementation for XML output. */
31 class XmlDocVisitor : public DocVisitor
32 {
33  public:
35 
36  //--------------------------------------
37  // visitor functions for leaf nodes
38  //--------------------------------------
39 
40  void visit(DocWord *);
41  void visit(DocLinkedWord *);
42  void visit(DocWhiteSpace *);
43  void visit(DocSymbol *);
44  void visit(DocURL *);
45  void visit(DocLineBreak *);
46  void visit(DocHorRuler *);
47  void visit(DocStyleChange *);
48  void visit(DocVerbatim *);
49  void visit(DocAnchor *);
50  void visit(DocInclude *);
51  void visit(DocIncOperator *);
52  void visit(DocFormula *);
53  void visit(DocIndexEntry *);
54  void visit(DocSimpleSectSep *);
55  void visit(DocCite *);
56 
57  //--------------------------------------
58  // visitor functions for compound nodes
59  //--------------------------------------
60 
61  void visitPre(DocAutoList *);
62  void visitPost(DocAutoList *);
63  void visitPre(DocAutoListItem *);
64  void visitPost(DocAutoListItem *);
65  void visitPre(DocPara *) ;
66  void visitPost(DocPara *);
67  void visitPre(DocRoot *);
68  void visitPost(DocRoot *);
69  void visitPre(DocSimpleSect *);
70  void visitPost(DocSimpleSect *);
71  void visitPre(DocTitle *);
72  void visitPost(DocTitle *);
73  void visitPre(DocSimpleList *);
74  void visitPost(DocSimpleList *);
77  void visitPre(DocSection *);
78  void visitPost(DocSection *);
79  void visitPre(DocHtmlList *);
80  void visitPost(DocHtmlList *) ;
81  void visitPre(DocHtmlListItem *);
82  void visitPost(DocHtmlListItem *);
83  //void visitPre(DocHtmlPre *);
84  //void visitPost(DocHtmlPre *);
85  void visitPre(DocHtmlDescList *);
86  void visitPost(DocHtmlDescList *);
87  void visitPre(DocHtmlDescTitle *);
89  void visitPre(DocHtmlDescData *);
90  void visitPost(DocHtmlDescData *);
91  void visitPre(DocHtmlTable *);
92  void visitPost(DocHtmlTable *);
93  void visitPre(DocHtmlRow *);
94  void visitPost(DocHtmlRow *) ;
95  void visitPre(DocHtmlCell *);
96  void visitPost(DocHtmlCell *);
97  void visitPre(DocHtmlCaption *);
98  void visitPost(DocHtmlCaption *);
99  void visitPre(DocInternal *);
100  void visitPost(DocInternal *);
101  void visitPre(DocHRef *);
102  void visitPost(DocHRef *);
103  void visitPre(DocHtmlHeader *);
104  void visitPost(DocHtmlHeader *);
105  void visitPre(DocImage *);
106  void visitPost(DocImage *);
107  void visitPre(DocDotFile *);
108  void visitPost(DocDotFile *);
109 
110  void visitPre(DocMscFile *);
111  void visitPost(DocMscFile *);
112  void visitPre(DocDiaFile *);
113  void visitPost(DocDiaFile *);
114  void visitPre(DocLink *);
115  void visitPost(DocLink *);
116  void visitPre(DocRef *);
117  void visitPost(DocRef *);
118  void visitPre(DocSecRefItem *);
119  void visitPost(DocSecRefItem *);
120  void visitPre(DocSecRefList *);
121  void visitPost(DocSecRefList *);
122  //void visitPre(DocLanguage *);
123  //void visitPost(DocLanguage *);
124  void visitPre(DocParamSect *);
125  void visitPost(DocParamSect *);
126  void visitPre(DocParamList *);
127  void visitPost(DocParamList *);
128  void visitPre(DocXRefItem *);
129  void visitPost(DocXRefItem *);
130  void visitPre(DocInternalRef *);
131  void visitPost(DocInternalRef *);
132  void visitPre(DocCopy *);
133  void visitPost(DocCopy *);
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 char *str);
150  void startLink(const QCString &ref,const QCString &file,
151  const QCString &anchor);
152  void endLink();
153 
154  void pushEnabled();
155  void popEnabled();
156 
157  //--------------------------------------
158  // state variables
159  //--------------------------------------
160 
164  bool m_hide;
167 };
168 
169 #endif
void visitPre(DocAutoList *)
void visit(DocWord *)
void filter(const char *str)
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:90
CodeOutputInterface & m_ci
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
Concrete visitor implementation for XML output.
Definition: xmldocvisitor.h:31
QStack< bool > m_enabled
FTextStream & m_t
XmlDocVisitor(FTextStream &t, CodeOutputInterface &ci)
void visitPost(DocAutoList *)
static QCString str
QCString m_langExt