Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/latexdocvisitor.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 _LATEXDOCVISITOR_H
20#define _LATEXDOCVISITOR_H
21
22#include "docvisitor.h"
23#include <qstack.h>
24#include <qcstring.h>
25#include <qmap.h>
26
27class FTextStream;
28class CodeOutputInterface;
29
30/*! @brief Concrete visitor implementation for LaTeX output. */
31class LatexDocVisitor : public DocVisitor
32{
33 public:
34 LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
35 const char *langExt,bool insideTabbing);
36
37 //--------------------------------------
38 // visitor functions for leaf nodes
39 //--------------------------------------
40
41 void visit(DocWord *);
42 void visit(DocLinkedWord *);
43 void visit(DocWhiteSpace *);
44 void visit(DocSymbol *);
45 void visit(DocURL *);
46 void visit(DocLineBreak *);
47 void visit(DocHorRuler *);
48 void visit(DocStyleChange *);
49 void visit(DocVerbatim *);
50 void visit(DocAnchor *);
51 void visit(DocInclude *);
52 void visit(DocIncOperator *);
53 void visit(DocFormula *);
54 void visit(DocIndexEntry *);
55 void visit(DocSimpleSectSep *);
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 *);
75 void visitPre(DocSimpleListItem *);
76 void visitPost(DocSimpleListItem *);
77 void visitPre(DocSection *s);
78 void visitPost(DocSection *);
79 void visitPre(DocHtmlList *s);
80 void visitPost(DocHtmlList *s);
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 *);
88 void visitPost(DocHtmlDescTitle *);
89 void visitPre(DocHtmlDescData *);
90 void visitPost(DocHtmlDescData *);
91 void visitPre(DocHtmlTable *t);
92 void visitPost(DocHtmlTable *t);
93 void visitPre(DocHtmlCaption *);
94 void visitPost(DocHtmlCaption *);
95 void visitPre(DocHtmlRow *);
96 void visitPost(DocHtmlRow *) ;
97 void visitPre(DocHtmlCell *);
98 void visitPost(DocHtmlCell *);
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 void visitPre(DocMscFile *);
110 void visitPost(DocMscFile *);
111 void visitPre(DocLink *lnk);
112 void visitPost(DocLink *);
113 void visitPre(DocRef *ref);
114 void visitPost(DocRef *);
115 void visitPre(DocSecRefItem *);
116 void visitPost(DocSecRefItem *);
117 void visitPre(DocSecRefList *);
118 void visitPost(DocSecRefList *);
119 //void visitPre(DocLanguage *);
120 //void visitPost(DocLanguage *);
121 void visitPre(DocParamSect *);
122 void visitPost(DocParamSect *);
123 void visitPre(DocParamList *);
124 void visitPost(DocParamList *);
125 void visitPre(DocXRefItem *);
126 void visitPost(DocXRefItem *);
127 void visitPre(DocInternalRef *);
128 void visitPost(DocInternalRef *);
129 void visitPre(DocCopy *);
130 void visitPost(DocCopy *);
131 void visitPre(DocText *);
132 void visitPost(DocText *);
133
134 private:
135
136 //--------------------------------------
137 // helper functions
138 //--------------------------------------
139
140 void filter(const char *str);
141 void startLink(const QCString &ref,const QCString &file,
142 const QCString &anchor);
143 void endLink(const QCString &ref,const QCString &file,
144 const QCString &anchor);
145 QCString escapeMakeIndexChars(const char *s);
146 void startDotFile(const QCString &fileName,const QCString &width,
147 const QCString &height, bool hasCaption);
148 void endDotFile(bool hasCaption);
149
150 void startMscFile(const QCString &fileName,const QCString &width,
151 const QCString &height, bool hasCaption);
152 void endMscFile(bool hasCaption);
153 void writeMscFile(const QCString &fileName);
154
155 void pushEnabled();
156 void popEnabled();
157
158 //--------------------------------------
159 // state variables
160 //--------------------------------------
161
162 FTextStream &m_t;
163 CodeOutputInterface &m_ci;
164 bool m_insidePre;
165 bool m_insideItem;
166 bool m_hide;
167 bool m_insideTabbing;
168 QStack<bool> m_enabled;
169 QCString m_langExt;
170QMap<int, int> m_rowspanIndices;
171int m_currentColumn;
172bool m_inRowspan;
173};
174
175#endif
176

Archive Download this file

Revision: 1322