1 /******************************************************************************
5 * Copyright (C) 1997-2012 by Dimitri van Heesch.
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
18 #ifndef _DOCBOOKDOCVISITOR_H
19 #define _DOCBOOKDOCVISITOR_H
21 #include "docvisitor.h"
26 class CodeOutputInterface;
29 /*! @brief Concrete visitor implementation for Docbook output. */
30 class DocbookDocVisitor : public DocVisitor
33 DocbookDocVisitor(FTextStream &t,CodeOutputInterface &ci);
34 //--------------------------------------
35 // visitor functions for leaf nodes
36 //--------------------------------------
37 void visit(DocWord *);
38 void visit(DocLinkedWord *);
39 void visit(DocWhiteSpace *);
40 void visit(DocSymbol *);
42 void visit(DocLineBreak *);
43 void visit(DocHorRuler *);
44 void visit(DocStyleChange *);
45 void visit(DocVerbatim *);
46 void visit(DocAnchor *);
47 void visit(DocInclude *);
48 void visit(DocIncOperator *);
49 void visit(DocFormula *);
50 void visit(DocIndexEntry *);
51 void visit(DocSimpleSectSep *);
52 void visit(DocCite *);
53 //--------------------------------------
54 // visitor functions for compound nodes
55 //--------------------------------------
56 void visitPre(DocAutoList *);
57 void visitPost(DocAutoList *);
58 void visitPre(DocAutoListItem *);
59 void visitPost(DocAutoListItem *);
60 void visitPre(DocPara *) ;
61 void visitPost(DocPara *);
62 void visitPre(DocRoot *);
63 void visitPost(DocRoot *);
64 void visitPre(DocSimpleSect *);
65 void visitPost(DocSimpleSect *);
66 void visitPre(DocTitle *);
67 void visitPost(DocTitle *);
68 void visitPre(DocSimpleList *);
69 void visitPost(DocSimpleList *);
70 void visitPre(DocSimpleListItem *);
71 void visitPost(DocSimpleListItem *);
72 void visitPre(DocSection *);
73 void visitPost(DocSection *);
74 void visitPre(DocHtmlList *);
75 void visitPost(DocHtmlList *) ;
76 void visitPre(DocHtmlListItem *);
77 void visitPost(DocHtmlListItem *);
78 //void visitPre(DocHtmlPre *);
79 //void visitPost(DocHtmlPre *);
80 void visitPre(DocHtmlDescList *);
81 void visitPost(DocHtmlDescList *);
82 void visitPre(DocHtmlDescTitle *);
83 void visitPost(DocHtmlDescTitle *);
84 void visitPre(DocHtmlDescData *);
85 void visitPost(DocHtmlDescData *);
86 void visitPre(DocHtmlTable *);
87 void visitPost(DocHtmlTable *);
88 void visitPre(DocHtmlRow *);
89 void visitPost(DocHtmlRow *) ;
90 void visitPre(DocHtmlCell *);
91 void visitPost(DocHtmlCell *);
92 void visitPre(DocHtmlCaption *);
93 void visitPost(DocHtmlCaption *);
94 void visitPre(DocInternal *);
95 void visitPost(DocInternal *);
96 void visitPre(DocHRef *);
97 void visitPost(DocHRef *);
98 void visitPre(DocHtmlHeader *);
99 void visitPost(DocHtmlHeader *);
100 void visitPre(DocImage *);
101 void visitPost(DocImage *);
102 void visitPre(DocDotFile *);
103 void visitPost(DocDotFile *);
104 void visitPre(DocMscFile *);
105 void visitPost(DocMscFile *);
106 void visitPre(DocDiaFile *);
107 void visitPost(DocDiaFile *);
108 void visitPre(DocLink *);
109 void visitPost(DocLink *);
110 void visitPre(DocRef *);
111 void visitPost(DocRef *);
112 void visitPre(DocSecRefItem *);
113 void visitPost(DocSecRefItem *);
114 void visitPre(DocSecRefList *);
115 void visitPost(DocSecRefList *);
116 //void visitPre(DocLanguage *);
117 //void visitPost(DocLanguage *);
118 void visitPre(DocParamSect *);
119 void visitPost(DocParamSect *);
120 void visitPre(DocParamList *);
121 void visitPost(DocParamList *);
122 void visitPre(DocXRefItem *);
123 void visitPost(DocXRefItem *);
124 void visitPre(DocInternalRef *);
125 void visitPost(DocInternalRef *);
126 void visitPre(DocCopy *);
127 void visitPost(DocCopy *);
128 void visitPre(DocText *);
129 void visitPost(DocText *);
130 void visitPre(DocHtmlBlockQuote *);
131 void visitPost(DocHtmlBlockQuote *);
132 void visitPre(DocVhdlFlow *);
133 void visitPost(DocVhdlFlow *);
134 void visitPre(DocParBlock *);
135 void visitPost(DocParBlock *);
138 //--------------------------------------
140 //--------------------------------------
141 void filter(const char *str);
142 void startLink(const QCString &file,
143 const QCString &anchor);
147 void startMscFile(const QCString &fileName,const QCString &width,
148 const QCString &height, bool hasCaption);
149 void endMscFile(bool hasCaption);
150 void writeMscFile(const QCString &fileName);
151 void startDiaFile(const QCString &fileName,const QCString &width,
152 const QCString &height, bool hasCaption);
153 void endDiaFile(bool hasCaption);
154 void writeDiaFile(const QCString &fileName);
155 void startDotFile(const QCString &fileName,const QCString &width,
156 const QCString &height, bool hasCaption);
157 void endDotFile(bool hasCaption);
158 void writeDotFile(const QCString &fileName);
159 //--------------------------------------
161 //--------------------------------------
163 CodeOutputInterface &m_ci;
166 QStack<bool> m_enabled;