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