1 /******************************************************************************
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
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.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
21 #include "outputgen.h"
25 /** Generator for Man page output. */
26 class ManGenerator : public OutputGenerator
32 //OutputGenerator *copy() { return new ManGenerator; }
33 //OutputGenerator *clone() { return new ManGenerator(*this); }
34 //void append(const OutputGenerator *o);
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; }
44 void writeDoc(DocNode *,Definition *,MemberDef *);
47 void startFile(const char *name,const char *manName,const char *title);
48 void writeSearchInfo() {}
49 void writeFooter(const char *) {}
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 *);
65 void startParagraph(const char *classDef);
67 void writeString(const char *text);
68 void startIndexListItem() {}
69 void endIndexListItem() {}
70 void startIndexList() {}
71 void endIndexList() { newParagraph(); }
72 void startIndexKey() {}
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,
87 void writeTooltip(const char *, const DocLinkInfo &, const char *,
88 const char *, const SourceLinkInfo &, const SourceLinkInfo &
90 void startTextLink(const char *,const char *) {}
92 void startHtmlLink(const char *url);
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 *,int);
103 void endMemberHeader();
104 void insertMemberAlign(bool) {}
105 void insertMemberAlignLeft(int,bool){}
106 void startMemberSubtitle() {}
107 void endMemberSubtitle() {}
108 //void writeListItem();
109 void startItemListItem();
110 void endItemListItem();
111 void startMemberDocList() {}
112 void endMemberDocList() {}
113 void startMemberList();
114 void endMemberList();
115 void startInlineHeader();
116 void endInlineHeader();
117 void startAnonTypeScope(int);
118 void endAnonTypeScope(int);
119 void startMemberItem(const char *,int,const char *);
120 void endMemberItem();
121 void startMemberTemplateParams() {}
122 void endMemberTemplateParams(const char *,const char *) {}
124 void startMemberGroupHeader(bool);
125 void endMemberGroupHeader();
126 void startMemberGroupDocs();
127 void endMemberGroupDocs();
128 void startMemberGroup();
129 void endMemberGroup(bool);
132 void writeAnchor(const char *,const char *) {}
133 void startCodeFragment();
134 void endCodeFragment();
135 void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
136 void startCodeLine(bool) {}
137 void endCodeLine() { codify("\n"); col=0; }
138 void startEmphasis() { t << "\\fI"; firstCol=FALSE; }
139 void endEmphasis() { t << "\\fP"; firstCol=FALSE; }
140 void startBold() { t << "\\fB"; firstCol=FALSE; }
141 void endBold() { t << "\\fP"; firstCol=FALSE; }
142 void startDescription() {}
143 void endDescription() {}
144 void startDescItem();
146 void lineBreak(const char *) { t << "\n.br" << endl; }
147 void writeChar(char c);
148 void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
149 void endMemberDoc(bool);
150 void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
151 void endDoxyAnchor(const char *,const char *) {}
152 void writeLatexSpacing() {}
153 void writeStartAnnoItem(const char *type,const char *file,
154 const char *path,const char *name);
155 void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; }
156 void startSubsection();
157 void endSubsection();
158 void startSubsubsection();
159 void endSubsubsection();
160 void startCenter() {}
164 void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; firstCol=FALSE; }
165 void endMemberDescription() { t << "\""; firstCol=FALSE; }
166 void startMemberDeclaration() {}
167 void endMemberDeclaration(const char *,const char *) {}
168 void writeInheritedSectionTitle(const char *,const char *,const char *,
169 const char *,const char *,const char *) {}
170 void startDescList(SectionTypes);
171 void endDescList() {}
172 void startExamples();
174 void startParamList(ParamListTypes,const char *title);
176 //void writeDescItem();
177 void startDescForItem();
178 void endDescForItem();
179 void startSection(const char *,const char *,SectionInfo::SectionType);
180 void endSection(const char *,SectionInfo::SectionType);
181 void addIndexItem(const char *,const char *) {}
182 void startIndent() {}
184 void writeSynopsis();
185 void startClassDiagram() {}
186 void endClassDiagram(const ClassDiagram &,const char *,const char *) {}
187 void startPageRef() {}
188 void endPageRef(const char *,const char *) {}
189 void startQuickIndices() {}
190 void endQuickIndices() {}
191 void writeSplitBar(const char *) {}
192 void writeNavigationPath(const char *) {}
194 void writeQuickLinks(bool,HighlightedItem,const char *) {}
195 void writeSummaryLink(const char *,const char *,const char *,bool) {}
196 void startContents() {}
197 void endContents() {}
198 void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
200 void startDescTable(const char *t);
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() {}
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 &) {}
221 void startTextBlock(bool) {}
222 void endTextBlock(bool) {}
223 void lastIndexPage() {}
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) {}
237 void startFontClass(const char *) {}
238 void endFontClass() {}
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();
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();
259 void writeLabel(const char *l,bool isLast);
262 void writeCodeAnchor(const char *) {}
263 void setCurrentDoc(Definition *,const char *,bool) {}
264 void addWord(const char *,bool) {}
274 ManGenerator(const ManGenerator &g);
275 ManGenerator &operator=(const ManGenerator &g);