My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mangen.h
Go to the documentation of this file.
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 
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 
55  void writePageLink(const char *,bool) {}
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();
66  void endParagraph();
67  void writeString(const char *text);
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);
101  void endHeaderSection();
102  void startMemberHeader(const char *);
103  void endMemberHeader();
104  void insertMemberAlign(bool) {}
107  //void writeListItem();
108  void startItemListItem();
109  void endItemListItem();
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();
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 *) {}
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; }
166  void endMemberDeclaration(const char *,const char *) {}
167  void writeInheritedSectionTitle(const char *,const char *,const char *,
168  const char *,const char *,const char *) {}
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();
185  void endClassDiagram(const ClassDiagram &,const char *,const char *) {}
186  void startPageRef() {}
187  void endPageRef(const char *,const char *) {}
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)
203  void endDescTableRow() {}
206  void startDescTableData() { t << endl; firstCol=TRUE; }
208 
209  void startDotGraph() {}
210  void endDotGraph(const DotClassGraph &) {}
215  void startCallGraph() {}
216  void endCallGraph(const DotCallGraph &) {}
217  void startDirDepGraph() {}
218  void endDirDepGraph(const DotDirDeps &) {}
220 
221  void startTextBlock(bool) {}
222  void endTextBlock(bool) {}
223  void lastIndexPage() {}
224 
227  void startMemberDocName(bool) {}
229  void startParameterType(bool,const char *) {}
231  void startParameterName(bool) {}
232  void endParameterName(bool,bool,bool) {}
233  void startParameterList(bool) {}
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;
272  bool inHeader;
273 
274  ManGenerator(const ManGenerator &g);
276 };
277 
278 #endif