ISLEman
mangen.h
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  */
17 
18 #ifndef MANGEN_H
19 #define MANGEN_H
20 
21 #include "outputgen.h"
22 
23 class QFile;
24 
27 {
28  public:
29  ManGenerator();
30  ~ManGenerator();
31 
32  //OutputGenerator *copy() { return new ManGenerator; }
33  //OutputGenerator *clone() { return new ManGenerator(*this); }
34  //void append(const OutputGenerator *o);
35  void enable()
36  { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
37  void disable() { active=FALSE; }
38  void enableIf(OutputType o) { if (o==Man) enable(); }
39  void disableIf(OutputType o) { if (o==Man) disable(); }
40  void disableIfNot(OutputType o) { if (o!=Man) disable(); }
41  bool isEnabled(OutputType o) { return (o==Man && active); }
42  OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; }
43 
44  void writeDoc(DocNode *,Definition *,MemberDef *);
45 
46  static void init();
47  void startFile(const char *name,const char *manName,const char *title);
48  void writeSearchInfo() {}
49  void writeFooter(const char *) {}
50  void endFile();
51  void clearBuffer();
52 
53  void startIndexSection(IndexSections) {}
54  void endIndexSection(IndexSections) {}
55  void writePageLink(const char *,bool) {}
56  void startProjectNumber() {}
57  void endProjectNumber() {}
58  void writeStyleInfo(int) {}
59  void startTitleHead(const char *) {}
60  void endTitleHead(const char *,const char *);
61  void startTitle();
62  void endTitle();
63 
64  void newParagraph();
65  void startParagraph(const char *classDef);
66  void endParagraph();
67  void writeString(const char *text);
68  void startIndexListItem() {}
69  void endIndexListItem() {}
70  void startIndexList() {}
71  void endIndexList() { newParagraph(); }
72  void startIndexKey() {}
73  void endIndexKey() {}
74  void startIndexValue(bool) {}
75  void endIndexValue(const char *,bool) {}
76  void startItemList() {}
77  void endItemList() { newParagraph(); }
78  void startIndexItem(const char *ref,const char *file);
79  void endIndexItem(const char *ref,const char *file);
80  void docify(const char *text);
81  void codify(const char *text);
82  void writeObjectLink(const char *ref,const char *file,
83  const char *anchor,const char *name);
84  void writeCodeLink(const char *ref,const char *file,
85  const char *anchor,const char *name,
86  const char *tooltip);
87  void writeTooltip(const char *, const DocLinkInfo &, const char *,
88  const char *, const SourceLinkInfo &, const SourceLinkInfo &
89  ) {}
90  void startTextLink(const char *,const char *) {}
91  void endTextLink() {}
92  void startHtmlLink(const char *url);
93  void endHtmlLink();
94  void startTypewriter() { t << "\\fC"; firstCol=FALSE; }
95  void endTypewriter() { t << "\\fP"; firstCol=FALSE; }
96  void startGroupHeader(int);
97  void endGroupHeader(int);
98  void startMemberSections() {}
99  void endMemberSections() {}
100  void startHeaderSection() {}
101  void endHeaderSection();
102  void startMemberHeader(const char *);
103  void endMemberHeader();
104  void insertMemberAlign(bool) {}
105  void startMemberSubtitle() {}
106  void endMemberSubtitle() {}
107  //void writeListItem();
108  void startItemListItem();
109  void endItemListItem();
110  void startMemberDocList() {}
111  void endMemberDocList() {}
112  void startMemberList();
113  void endMemberList();
114  void startInlineHeader();
115  void endInlineHeader();
116  void startAnonTypeScope(int);
117  void endAnonTypeScope(int);
118  void startMemberItem(const char *,int,const char *);
119  void endMemberItem();
120  void startMemberTemplateParams() {}
121  void endMemberTemplateParams(const char *,const char *) {}
122 
123  void startMemberGroupHeader(bool);
124  void endMemberGroupHeader();
125  void startMemberGroupDocs();
126  void endMemberGroupDocs();
127  void startMemberGroup();
128  void endMemberGroup(bool);
129 
130  void writeRuler() {}
131  void writeAnchor(const char *,const char *) {}
132  void startCodeFragment();
133  void endCodeFragment();
134  void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
135  void startCodeLine(bool) {}
136  void endCodeLine() { codify("\n"); col=0; }
137  void startEmphasis() { t << "\\fI"; firstCol=FALSE; }
138  void endEmphasis() { t << "\\fP"; firstCol=FALSE; }
139  void startBold() { t << "\\fB"; firstCol=FALSE; }
140  void endBold() { t << "\\fP"; firstCol=FALSE; }
142  void endDescription() {}
143  void startDescItem();
144  void endDescItem();
145  void lineBreak(const char *) { t << "\n.br" << endl; }
146  void writeChar(char c);
147  void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
148  void endMemberDoc(bool);
149  void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
150  void endDoxyAnchor(const char *,const char *) {}
151  void writeLatexSpacing() {}
152  void writeStartAnnoItem(const char *type,const char *file,
153  const char *path,const char *name);
154  void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; }
155  void startSubsection();
156  void endSubsection();
157  void startSubsubsection();
158  void endSubsubsection();
159  void startCenter() {}
160  void endCenter() {}
161  void startSmall() {}
162  void endSmall() {}
163  void startMemberDescription(const char *,const char *) { t << "\n.RI \""; firstCol=FALSE; }
164  void endMemberDescription() { t << "\""; firstCol=FALSE; }
165  void startMemberDeclaration() {}
166  void endMemberDeclaration(const char *,const char *) {}
167  void writeInheritedSectionTitle(const char *,const char *,const char *,
168  const char *,const char *,const char *) {}
169  void startDescList(SectionTypes);
170  void endDescList() {}
171  void startSimpleSect(SectionTypes,const char *,const char *,const char *);
172  void endSimpleSect();
173  void startParamList(ParamListTypes,const char *title);
174  void endParamList();
175  //void writeDescItem();
176  void startDescForItem();
177  void endDescForItem();
178  void startSection(const char *,const char *,SectionInfo::SectionType);
179  void endSection(const char *,SectionInfo::SectionType);
180  void addIndexItem(const char *,const char *) {}
181  void startIndent() {}
182  void endIndent() {}
183  void writeSynopsis();
184  void startClassDiagram() {}
185  void endClassDiagram(const ClassDiagram &,const char *,const char *) {}
186  void startPageRef() {}
187  void endPageRef(const char *,const char *) {}
188  void startQuickIndices() {}
189  void endQuickIndices() {}
190  void writeSplitBar(const char *) {}
191  void writeNavigationPath(const char *) {}
192  void writeLogo() {}
193  void writeQuickLinks(bool,HighlightedItem,const char *) {}
194  void writeSummaryLink(const char *,const char *,const char *,bool) {}
195  void startContents() {}
196  void endContents() {}
197  void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
198 
199  void startDescTable(const char *t)
200  { startSimpleSect(EnumValues,0,0,t); startDescForItem(); }
201  void endDescTable() { endDescForItem(); endSimpleSect(); }
202  void startDescTableRow() {}
203  void endDescTableRow() {}
204  void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
205  void endDescTableTitle() { endEmphasis(); endBold(); }
206  void startDescTableData() { t << endl; firstCol=TRUE; }
207  void endDescTableData() {}
208 
209  void startDotGraph() {}
210  void endDotGraph(const DotClassGraph &) {}
211  void startInclDepGraph() {}
212  void endInclDepGraph(const DotInclDepGraph &) {}
213  void startGroupCollaboration() {}
214  void endGroupCollaboration(const DotGroupCollaboration &) {}
215  void startCallGraph() {}
216  void endCallGraph(const DotCallGraph &) {}
217  void startDirDepGraph() {}
218  void endDirDepGraph(const DotDirDeps &) {}
219  void writeGraphicalHierarchy(const DotGfxHierarchyTable &) {}
220 
221  void startTextBlock(bool) {}
222  void endTextBlock(bool) {}
223  void lastIndexPage() {}
224 
225  void startMemberDocPrefixItem() {}
226  void endMemberDocPrefixItem() {}
227  void startMemberDocName(bool) {}
228  void endMemberDocName() {}
229  void startParameterType(bool,const char *) {}
230  void endParameterType() {}
231  void startParameterName(bool) {}
232  void endParameterName(bool,bool,bool) {}
233  void startParameterList(bool) {}
234  void endParameterList() {}
235  void exceptionEntry(const char*,bool) {}
236 
237  void startFontClass(const char *) {}
238  void endFontClass() {}
239 
240  void startConstraintList(const char *);
241  void startConstraintParam();
242  void endConstraintParam();
243  void startConstraintType();
244  void endConstraintType();
245  void startConstraintDocs();
246  void endConstraintDocs();
247  void endConstraintList();
248 
249  void startMemberDocSimple(bool);
250  void endMemberDocSimple(bool);
251  void startInlineMemberType();
252  void endInlineMemberType();
253  void startInlineMemberName();
254  void endInlineMemberName();
255  void startInlineMemberDoc();
256  void endInlineMemberDoc();
257 
258  void startLabels();
259  void writeLabel(const char *l,bool isLast);
260  void endLabels();
261 
262  void writeCodeAnchor(const char *) {}
263  void setCurrentDoc(Definition *,const char *,bool) {}
264  void addWord(const char *,bool) {}
265 
266  private:
267  bool firstCol;
268  bool paragraph;
269  int col;
270  bool upperCase;
271  bool insideTabbing;
272  bool inHeader;
273 
274  ManGenerator(const ManGenerator &g);
275  ManGenerator &operator=(const ManGenerator &g);
276 };
277 
278 #endif
void endParagraph()
Definition: mangen.cpp:222
void writeString(const char *text)
Definition: mangen.cpp:226
void writeCodeAnchor(const char *)
Definition: mangen.h:262
void endItemList()
Definition: mangen.h:77
void endBold()
Definition: mangen.h:140
The common base class of all entity definitions found in the sources.
Definition: definition.h:92
A model of a class/file/namespace member symbol.
Definition: memberdef.h:43
void endDescription()
Definition: mangen.h:142
void endHtmlLink()
Definition: mangen.cpp:261
void endDescItem()
Definition: mangen.cpp:532
void startDescItem()
Definition: mangen.cpp:505
void startEmphasis()
Definition: mangen.h:137
void startTypewriter()
Definition: mangen.h:94
void startDescription()
Definition: mangen.h:141
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: mangen.cpp:244
void endEmphasis()
Definition: mangen.h:138
void docify(const char *text)
Definition: mangen.cpp:299
void writeRuler()
Definition: mangen.h:130
void writeChar(char c)
Definition: mangen.cpp:353
void codify(const char *text)
Definition: mangen.cpp:323
Represents a graphical class hierarchy.
Definition: dot.h:149
void startCodeFragment()
Definition: mangen.cpp:404
Representation of a group collaboration graph.
Definition: dot.h:278
void endCodeLine()
Definition: mangen.h:136
void startItemListItem()
Definition: mangen.cpp:391
void writeTooltip(const char *, const DocLinkInfo &, const char *, const char *, const SourceLinkInfo &, const SourceLinkInfo &)
Definition: mangen.h:87
void endItemListItem()
Definition: mangen.cpp:400
void startHtmlLink(const char *url)
Definition: mangen.cpp:257
void endCodeFragment()
Definition: mangen.cpp:412
void startBold()
Definition: mangen.h:139
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void startFontClass(const char *)
Definition: mangen.h:237
Class representing a built-in class diagram.
Definition: diagram.h:29
void writeLineNumber(const char *, const char *, const char *, int l)
Definition: mangen.h:134
Representation of an call graph.
Definition: dot.h:232
void startItemList()
Definition: mangen.h:76
void writeCodeLink(const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)
Definition: mangen.cpp:250
Representation of a class inheritance or dependency graph.
Definition: dot.h:169
Abstract node interface with type information.
Definition: docparser.h:79
Abstract output generator.
Definition: outputgen.h:322
Representation of an include dependency graph.
Definition: dot.h:203
Representation of an directory dependency graph.
Definition: dot.h:258
void endFontClass()
Definition: mangen.h:238
void endTypewriter()
Definition: mangen.h:95
void startParagraph(const char *classDef)
Definition: mangen.cpp:211
Definition: outputgen.h:48
Definition: outputgen.h:40
Generator for Man page output.
Definition: mangen.h:26