Doxygen
mandocvisitor.h
浏览该文件的文档.
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 <iostream>
23 
24 #include "qcstring.h"
25 #include "docvisitor.h"
26 
28 class TextStream;
29 
30 /*! @brief Concrete visitor implementation for LaTeX output. */
31 class ManDocVisitor : public DocVisitor
32 {
33  public:
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(DocEmoji *);
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  void visit(DocCite *);
57 
58  //--------------------------------------
59  // visitor functions for compound nodes
60  //--------------------------------------
61 
62  void visitPre(DocAutoList *);
63  void visitPost(DocAutoList *);
64  void visitPre(DocAutoListItem *);
65  void visitPost(DocAutoListItem *);
66  void visitPre(DocPara *);
67  void visitPost(DocPara *);
68  void visitPre(DocRoot *);
69  void visitPost(DocRoot *);
70  void visitPre(DocSimpleSect *);
71  void visitPost(DocSimpleSect *);
72  void visitPre(DocTitle *);
73  void visitPost(DocTitle *);
74  void visitPre(DocSimpleList *);
75  void visitPost(DocSimpleList *);
78  void visitPre(DocSection *s);
79  void visitPost(DocSection *);
80  void visitPre(DocHtmlList *s);
81  void visitPost(DocHtmlList *s);
82  void visitPre(DocHtmlListItem *);
83  void visitPost(DocHtmlListItem *);
84  //void visitPre(DocHtmlPre *);
85  //void visitPost(DocHtmlPre *);
86  void visitPre(DocHtmlDescList *);
87  void visitPost(DocHtmlDescList *);
88  void visitPre(DocHtmlDescTitle *);
90  void visitPre(DocHtmlDescData *);
91  void visitPost(DocHtmlDescData *);
92  void visitPre(DocHtmlTable *t);
93  void visitPost(DocHtmlTable *t);
94  void visitPre(DocHtmlCaption *);
95  void visitPost(DocHtmlCaption *);
96  void visitPre(DocHtmlRow *);
97  void visitPost(DocHtmlRow *) ;
98  void visitPre(DocHtmlCell *);
99  void visitPost(DocHtmlCell *);
100  void visitPre(DocInternal *);
101  void visitPost(DocInternal *);
102  void visitPre(DocHRef *);
103  void visitPost(DocHRef *);
104  void visitPre(DocHtmlHeader *);
105  void visitPost(DocHtmlHeader *) ;
106  void visitPre(DocImage *);
107  void visitPost(DocImage *);
108  void visitPre(DocDotFile *);
109  void visitPost(DocDotFile *);
110  void visitPre(DocMscFile *);
111  void visitPost(DocMscFile *);
112  void visitPre(DocDiaFile *);
113  void visitPost(DocDiaFile *);
114  void visitPre(DocLink *lnk);
115  void visitPost(DocLink *);
116  void visitPre(DocRef *ref);
117  void visitPost(DocRef *);
118  void visitPre(DocSecRefItem *);
119  void visitPost(DocSecRefItem *);
120  void visitPre(DocSecRefList *);
121  void visitPost(DocSecRefList *);
122  //void visitPre(DocLanguage *);
123  //void visitPost(DocLanguage *);
124  void visitPre(DocParamSect *);
125  void visitPost(DocParamSect *);
126  void visitPre(DocParamList *);
127  void visitPost(DocParamList *);
128  void visitPre(DocXRefItem *);
129  void visitPost(DocXRefItem *);
130  void visitPre(DocInternalRef *);
131  void visitPost(DocInternalRef *);
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 QCString &str);
148 
149  //--------------------------------------
150  // state variables
151  //--------------------------------------
152 
156  bool m_hide;
158  int m_indent;
160 };
161 
163 {
164  int number;
165  char type;
166 };
167 
168 const int man_maxIndentLevels = 13;
169 
171 #endif
DocHtmlBlockQuote
Node representing an HTML blockquote
Definition: docparser.h:1433
DocAutoListItem
Node representing an item of a auto list
Definition: docparser.h:720
DocHRef
Node representing a Hypertext reference
Definition: docparser.h:936
DocStyleChange
Node representing a style change
Definition: docparser.h:343
ManDocVisitor::filter
void filter(const QCString &str)
Definition: mandocvisitor.cpp:1100
DocVerbatim
Node representing a verbatim, unparsed text fragment
Definition: docparser.h:510
DocTitle
Node representing a simple section title
Definition: docparser.h:736
ManDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: mandocvisitor.cpp:460
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
ManDocVisitor::m_langExt
QCString m_langExt
Definition: mandocvisitor.h:159
DocDotFile
Node representing a dot file
Definition: docparser.h:830
DocHtmlTable
Node representing a HTML table
Definition: docparser.h:1405
man_maxIndentLevels
const int man_maxIndentLevels
Definition: mandocvisitor.h:168
DocRoot
Root node of documentation tree
Definition: docparser.h:1457
DocHtmlHeader
Node Html heading
Definition: docparser.h:957
docvisitor.h
DocHtmlListItem
Node representing a HTML list item
Definition: docparser.h:1286
DocVhdlFlow
Node representing a VHDL flow chart
Definition: docparser.h:860
DocHtmlDescData
Node representing a HTML description data
Definition: docparser.h:1303
DocHtmlDescTitle
Node representing a Html description item
Definition: docparser.h:973
DocEmoji
Node representing a n emoji
Definition: docparser.h:469
DocMscFile
Node representing a msc file
Definition: docparser.h:840
ManDocVisitor
Concrete visitor implementation for LaTeX output.
Definition: mandocvisitor.h:31
DocSecRefItem
Node representing a reference to a section
Definition: docparser.h:1023
DocAnchor
Node representing an anchor
Definition: docparser.h:303
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DocText
Root node of a text fragment
Definition: docparser.h:1447
DocVisitor
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:92
qcstring.h
ManListItemInfo::type
char type
Definition: mandocvisitor.h:165
ManListItemInfo::number
int number
Definition: mandocvisitor.h:164
DocFormula
Node representing an item of a cross-referenced list
Definition: docparser.h:658
DocHtmlDescList
Node representing a Html description list
Definition: docparser.h:987
DocIncOperator
Node representing a include/dontinclude operator block
Definition: docparser.h:606
DocIndexEntry
Node representing an entry in the index.
Definition: docparser.h:682
ManDocVisitor::m_t
TextStream & m_t
Definition: mandocvisitor.h:153
DocSecRefList
Node representing a list of section references
Definition: docparser.h:1048
DocLineBreak
Node representing a line break
Definition: docparser.h:272
DocWord
Node representing a word
Definition: docparser.h:217
DocSymbol
Node representing a special symbol
Definition: docparser.h:385
DocXRefItem
Node representing an item of a cross-referenced list
Definition: docparser.h:749
man_listItemInfo
ManListItemInfo man_listItemInfo[man_maxIndentLevels]
Definition: mandocvisitor.cpp:31
DocImage
Node representing an image
Definition: docparser.h:771
DocURL
Node representing a URL (or email address)
Definition: docparser.h:256
DocHtmlCaption
Node representing a HTML table caption
Definition: docparser.h:1352
ManDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: mandocvisitor.cpp:466
DocParamList
Node representing a parameter list.
Definition: docparser.h:1228
DocParBlock
Node representing an block of paragraphs
Definition: docparser.h:1070
DocSimpleSectSep
Node representing a separator between two simple sections of the same type.
Definition: docparser.h:1139
DocCite
Node representing a citation of some bibliographic reference
Definition: docparser.h:321
DocRef
Node representing a reference to some item
Definition: docparser.h:891
DocParamSect
Node representing a parameter section
Definition: docparser.h:1150
ManListItemInfo
Definition: mandocvisitor.h:162
DocHtmlList
Node representing a Html list
Definition: docparser.h:1093
ManDocVisitor::m_ci
CodeOutputInterface & m_ci
Definition: mandocvisitor.h:154
DocSimpleSect
Node representing a simple section
Definition: docparser.h:1111
DocSection
Node representing a normal section
Definition: docparser.h:1001
DocHorRuler
Node representing a horizontal ruler
Definition: docparser.h:288
DocInclude
Node representing an included text block from file
Definition: docparser.h:563
DocAutoList
Node representing an auto List
Definition: docparser.h:703
DocInternal
Node representing an internal section of documentation
Definition: docparser.h:1059
ManDocVisitor::m_insidePre
bool m_insidePre
Definition: mandocvisitor.h:155
DocLinkedWord
Node representing a word that can be linked to something
Definition: docparser.h:231
CodeOutputInterface
Output interface for code parser.
Definition: outputgen.h:61
DocDiaFile
Node representing a dia file
Definition: docparser.h:850
ManDocVisitor::ManDocVisitor
ManDocVisitor(TextStream &t, CodeOutputInterface &ci, const QCString &langExt)
Definition: mandocvisitor.cpp:33
ManDocVisitor::m_indent
int m_indent
Definition: mandocvisitor.h:158
DocSimpleList
Node representing a simple list
Definition: docparser.h:1082
DocSimpleListItem
Node representing a simple list item
Definition: docparser.h:1266
DocWhiteSpace
Node representing some amount of white space
Definition: docparser.h:484
ManDocVisitor::m_firstCol
bool m_firstCol
Definition: mandocvisitor.h:157
DocHtmlCell
Node representing a HTML table cell
Definition: docparser.h:1316
DocInternalRef
Node representing an internal reference to some item
Definition: docparser.h:919
ManDocVisitor::m_hide
bool m_hide
Definition: mandocvisitor.h:156
DocHtmlRow
Node representing a HTML table row
Definition: docparser.h:1371
ManDocVisitor::visit
void visit(DocWord *)
Definition: mandocvisitor.cpp:44
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108