Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/rtfdocvisitor.h

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: $
4 *
5 *
6 * Copyright (C) 1997-2011 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 _RTFDOCVISITOR_H
20#define _RTFDOCVISITOR_H
21
22#include "docvisitor.h"
23#include <qstack.h>
24#include <qcstring.h>
25
26class FTextStream;
27class CodeOutputInterface;
28
29/*! @brief Concrete visitor implementation for RTF output. */
30class RTFDocVisitor : public DocVisitor
31{
32 public:
33 RTFDocVisitor(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
55 //--------------------------------------
56 // visitor functions for compound nodes
57 //--------------------------------------
58
59 void visitPre(DocAutoList *);
60 void visitPost(DocAutoList *);
61 void visitPre(DocAutoListItem *);
62 void visitPost(DocAutoListItem *);
63 void visitPre(DocPara *);
64 void visitPost(DocPara *);
65 void visitPre(DocRoot *);
66 void visitPost(DocRoot *);
67 void visitPre(DocSimpleSect *);
68 void visitPost(DocSimpleSect *);
69 void visitPre(DocTitle *);
70 void visitPost(DocTitle *);
71 void visitPre(DocSimpleList *);
72 void visitPost(DocSimpleList *);
73 void visitPre(DocSimpleListItem *);
74 void visitPost(DocSimpleListItem *);
75 void visitPre(DocSection *s);
76 void visitPost(DocSection *);
77 void visitPre(DocHtmlList *s);
78 void visitPost(DocHtmlList *s);
79 void visitPre(DocHtmlListItem *);
80 void visitPost(DocHtmlListItem *);
81 //void visitPre(DocHtmlPre *);
82 //void visitPost(DocHtmlPre *);
83 void visitPre(DocHtmlDescList *);
84 void visitPost(DocHtmlDescList *);
85 void visitPre(DocHtmlDescTitle *);
86 void visitPost(DocHtmlDescTitle *);
87 void visitPre(DocHtmlDescData *);
88 void visitPost(DocHtmlDescData *);
89 void visitPre(DocHtmlTable *t);
90 void visitPost(DocHtmlTable *t);
91 void visitPre(DocHtmlCaption *);
92 void visitPost(DocHtmlCaption *);
93 void visitPre(DocHtmlRow *);
94 void visitPost(DocHtmlRow *) ;
95 void visitPre(DocHtmlCell *);
96 void visitPost(DocHtmlCell *);
97 void visitPre(DocInternal *);
98 void visitPost(DocInternal *);
99 void visitPre(DocHRef *);
100 void visitPost(DocHRef *);
101 void visitPre(DocHtmlHeader *);
102 void visitPost(DocHtmlHeader *) ;
103 void visitPre(DocImage *);
104 void visitPost(DocImage *);
105 void visitPre(DocDotFile *);
106 void visitPost(DocDotFile *);
107 void visitPre(DocMscFile *);
108 void visitPost(DocMscFile *);
109 void visitPre(DocLink *);
110 void visitPost(DocLink *);
111 void visitPre(DocRef *ref);
112 void visitPost(DocRef *);
113 void visitPre(DocSecRefItem *);
114 void visitPost(DocSecRefItem *);
115 void visitPre(DocSecRefList *);
116 void visitPost(DocSecRefList *);
117 //void visitPre(DocLanguage *);
118 //void visitPost(DocLanguage *);
119 void visitPre(DocParamSect *);
120 void visitPost(DocParamSect *);
121 void visitPre(DocParamList *);
122 void visitPost(DocParamList *);
123 void visitPre(DocXRefItem *);
124 void visitPost(DocXRefItem *);
125 void visitPre(DocInternalRef *);
126 void visitPost(DocInternalRef *);
127 void visitPre(DocCopy *);
128 void visitPost(DocCopy *);
129 void visitPre(DocText *);
130 void visitPost(DocText *);
131
132 private:
133
134 //--------------------------------------
135 // helper functions
136 //--------------------------------------
137
138 void filter(const char *str,bool verbatim=FALSE);
139 void startLink(const QCString &ref,const QCString &file,
140 const QCString &anchor);
141 void endLink(const QCString &ref);
142 QCString getStyle(const char *name);
143 void incIndentLevel();
144 void decIndentLevel();
145
146 void pushEnabled();
147 void popEnabled();
148 void writeDotFile(const QCString &fileName);
149 void writeMscFile(const QCString &fileName);
150
151 //--------------------------------------
152 // state variables
153 //--------------------------------------
154
155 FTextStream &m_t;
156 CodeOutputInterface &m_ci;
157 bool m_insidePre;
158 bool m_hide;
159 int m_indentLevel;
160 QStack<bool> m_enabled;
161 bool m_lastIsPara;
162 QCString m_langExt;
163};
164
165#endif
166

Archive Download this file

Revision: 1322