Chameleon

Chameleon Svn Source Tree

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

Source at commit 1322 created 9 years 5 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 _HTMLDOCVISITOR_H
20#define _HTMLDOCVISITOR_H
21
22#include "docvisitor.h"
23#include <qstack.h>
24#include <qcstring.h>
25
26class DocNode;
27class FTextStream;
28class CodeOutputInterface;
29
30/*! @brief Concrete visitor implementation for HTML output. */
31class HtmlDocVisitor : public DocVisitor
32{
33 public:
34 HtmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
35
36 //--------------------------------------
37 // visitor functions for leaf nodes
38 //--------------------------------------
39
40 void visit(DocWord *);
41 void visit(DocLinkedWord *);
42 void visit(DocWhiteSpace *);
43 void visit(DocSymbol *);
44 void visit(DocURL *);
45 void visit(DocLineBreak *);
46 void visit(DocHorRuler *);
47 void visit(DocStyleChange *);
48 void visit(DocVerbatim *);
49 void visit(DocAnchor *);
50 void visit(DocInclude *);
51 void visit(DocIncOperator *);
52 void visit(DocFormula *);
53 void visit(DocIndexEntry *);
54 void visit(DocSimpleSectSep *);
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 *);
74 void visitPre(DocSimpleListItem *);
75 void visitPost(DocSimpleListItem *);
76 void visitPre(DocSection *);
77 void visitPost(DocSection *);
78 void visitPre(DocHtmlList *);
79 void visitPost(DocHtmlList *) ;
80 void visitPre(DocHtmlListItem *);
81 void visitPost(DocHtmlListItem *);
82 void visitPre(DocHtmlDescList *);
83 void visitPost(DocHtmlDescList *);
84 void visitPre(DocHtmlDescTitle *);
85 void visitPost(DocHtmlDescTitle *);
86 void visitPre(DocHtmlDescData *);
87 void visitPost(DocHtmlDescData *);
88 void visitPre(DocHtmlTable *);
89 void visitPost(DocHtmlTable *);
90 void visitPre(DocHtmlRow *);
91 void visitPost(DocHtmlRow *) ;
92 void visitPre(DocHtmlCell *);
93 void visitPost(DocHtmlCell *);
94 void visitPre(DocHtmlCaption *);
95 void visitPost(DocHtmlCaption *);
96 void visitPre(DocInternal *);
97 void visitPost(DocInternal *);
98 void visitPre(DocHRef *);
99 void visitPost(DocHRef *);
100 void visitPre(DocHtmlHeader *);
101 void visitPost(DocHtmlHeader *);
102 void visitPre(DocImage *);
103 void visitPost(DocImage *);
104 void visitPre(DocDotFile *);
105 void visitPost(DocDotFile *);
106 void visitPre(DocMscFile *);
107 void visitPost(DocMscFile *);
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(DocParamSect *);
117 void visitPost(DocParamSect *);
118 void visitPre(DocParamList *);
119 void visitPost(DocParamList *);
120 void visitPre(DocXRefItem *);
121 void visitPost(DocXRefItem *);
122 void visitPre(DocInternalRef *);
123 void visitPost(DocInternalRef *);
124 void visitPre(DocCopy *);
125 void visitPost(DocCopy *);
126 void visitPre(DocText *);
127 void visitPost(DocText *);
128
129 private:
130
131 //--------------------------------------
132 // helper functions
133 //--------------------------------------
134
135 void filter(const char *str);
136 void filterQuotedCdataAttr(const char* str);
137 void startLink(const QCString &ref,const QCString &file,
138 const QCString &relPath,const QCString &anchor,
139 const QCString &tooltip = "");
140 void endLink();
141 void writeDotFile(const QCString &fileName,const QCString &relPath,const QCString &context);
142 void writeMscFile(const QCString &fileName,const QCString &relPath,const QCString &context);
143
144 void pushEnabled();
145 void popEnabled();
146
147 void forceEndParagraph(DocNode *n);
148 void forceStartParagraph(DocNode *n);
149
150 //--------------------------------------
151 // state variables
152 //--------------------------------------
153
154 FTextStream &m_t;
155 CodeOutputInterface &m_ci;
156 bool m_insidePre;
157 bool m_hide;
158 QStack<bool> m_enabled;
159 QCString m_langExt;
160};
161
162#endif
163

Archive Download this file

Revision: 1322