docbookvisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 *
4 *
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
6 *
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.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17 
18 #ifndef _DOCBOOKDOCVISITOR_H
19 #define _DOCBOOKDOCVISITOR_H
20 
21 #include "docvisitor.h"
22 #include <qstack.h>
23 #include <qcstring.h>
24 
25 class FTextStream;
27 class QCString;
28 
29 /*! @brief Concrete visitor implementation for Docbook output. */
31 {
32  public:
34  //--------------------------------------
35  // visitor functions for leaf nodes
36  //--------------------------------------
37  void visit(DocWord *);
38  void visit(DocLinkedWord *);
39  void visit(DocWhiteSpace *);
40  void visit(DocSymbol *);
41  void visit(DocURL *);
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 *);
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 *);
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 *);
132  void visitPre(DocVhdlFlow *);
133  void visitPost(DocVhdlFlow *);
134  void visitPre(DocParBlock *);
135  void visitPost(DocParBlock *);
136 
137  private:
138  //--------------------------------------
139  // helper functions
140  //--------------------------------------
141  void filter(const char *str);
142  void startLink(const QCString &file,
143  const QCString &anchor);
144  void endLink();
145  void pushEnabled();
146  void popEnabled();
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, DocVerbatim *s);
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, DocVerbatim *s);
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, DocVerbatim *s);
159  void writePlantUMLFile(const QCString &fileName, DocVerbatim *s);
160  //--------------------------------------
161  // state variables
162  //--------------------------------------
166  bool m_hide;
169 };
170 
171 #endif
void endDiaFile(bool hasCaption)
void visit(DocWord *)
void startLink(const QCString &file, const QCString &anchor)
void startDiaFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
DocbookDocVisitor(FTextStream &t, CodeOutputInterface &ci)
void writeMscFile(const QCString &fileName, DocVerbatim *s)
void writeDotFile(const QCString &fileName, DocVerbatim *s)
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:90
void filter(const char *str)
fileName
Definition: dumpTree.py:9
QStack< bool > m_enabled
void endDotFile(bool hasCaption)
CodeOutputInterface & m_ci
FTextStream & m_t
Concrete visitor implementation for Docbook output.
void writePlantUMLFile(const QCString &fileName, DocVerbatim *s)
void visitPost(DocAutoList *)
void endMscFile(bool hasCaption)
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
void visitPre(DocAutoList *)
void writeDiaFile(const QCString &fileName, DocVerbatim *s)
static QCString * s
Definition: config.cpp:1042
static QCString str