Doxygen
Loading...
Searching...
No Matches
mangen.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2022 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16/* http://www.cubic.org/source/archive/fileform/txt/man/ has some
17 nice introductions to groff and man pages. */
18
19#include <stdlib.h>
20#include <string.h>
21
22#include "message.h"
23#include "mangen.h"
24#include "config.h"
25#include "util.h"
26#include "doxygen.h"
27#include "docparser.h"
28#include "mandocvisitor.h"
29#include "language.h"
30#include "dir.h"
31#include "utf8.h"
32#include "datetime.h"
33#include "portable.h"
34#include "outputlist.h"
35
37{
38 /*
39 * [.][number][rest]
40 * in case of . missing, just ignore it
41 * in case number missing, just place a 3 in front of it
42 */
43 QCString ext = Config_getString(MAN_EXTENSION);
44 if (ext.isEmpty())
45 {
46 ext = "3";
47 }
48 else
49 {
50 if (ext.at(0)=='.')
51 {
52 if (ext.length()==1)
53 {
54 ext = "3";
55 }
56 else // strip .
57 {
58 ext = ext.mid(1);
59 }
60 }
61 if (ext.at(0)<'0' || ext.at(0)>'9')
62 {
63 ext.prepend("3");
64 }
65 }
66 return ext;
67}
68
70{
71 QCString dir = Config_getString(MAN_SUBDIR);
72 if (dir.isEmpty())
73 {
74 dir = "man" + getExtension();
75 }
76 return dir;
77}
78
80{
81 QCString result;
82 result.reserve(str.length());
83 if (!str.isEmpty())
84 {
85 const char *p=str.data();
86 char c=0;
87 while ((c=*p++))
88 {
89 switch(c)
90 {
91 case '-': result += "\\-"; break; // see bug747780
92 case '.': result += "\\&."; break; // see bug652277
93 case '\\': result += "\\\\"; break;
94 case '\n': result += "\n"; break;
95 case '\"': c = '\''; // no break!
96 default: result += c; break;
97 }
98 }
99 //printf("%s",str);fflush(stdout);
100 }
101 return result;
102}
103
105{
106 return "\\fB" + docifyToString(text) + "\\fP";
107}
108
109//-------------------------------------------------------------------------------
110
114
116{
117 *m_t << "\n";
118 *m_t << ".nf\n";
119}
120
122{
123 if (m_col>0) *m_t << "\n";
124 *m_t << ".PP\n";
125 *m_t << ".fi\n";
126 m_col=0;
127}
128
129void ManCodeGenerator::writeLineNumber(const QCString &,const QCString &,const QCString &,int l, bool)
130{
131 if (m_hide) return;
132 *m_t << l << " ";
133 m_col=0;
134}
135
137 const QCString &,const QCString &,
138 const QCString &, const QCString &name,
139 const QCString &)
140{
141 if (m_hide) return;
142 if (!name.isEmpty())
143 {
144 const char *p=name.data();
145 char c=0;
146 while ((c=*p++))
147 {
148 switch(c)
149 {
150 case '-': *m_t << "\\-"; break; // see bug747780
151 case '.': *m_t << "\\&."; break; // see bug652277
152 case '\\': *m_t << "\\\\"; m_col++; break;
153 case '\n': *m_t << "\n"; m_col=0; break;
154 case '\"': c = '\''; // no break!
155 default: *m_t << c; m_col++; break;
156 }
157 }
158 //printf("%s",str);fflush(stdout);
159 }
160}
161
163{
164 const int tabSize = Config_getInt(TAB_SIZE);
165 const size_t stripAmount = m_stripIndentAmount;
166 if (!str.isEmpty())
167 {
168 char c;
169 const char *p=str.data();
170 if (m_hide)
171 {
173 }
174 else
175 {
176 while ((c=*p++))
177 {
178 switch(c)
179 {
180 case '-': *m_t << "\\-"; break; // see bug747780
181 case '.': *m_t << "\\&."; break; // see bug652277
182 case '\t': {
183 int spacesToNextTabStop = tabSize - (m_col%tabSize);
184 while (spacesToNextTabStop--)
185 {
186 if (m_col>=stripAmount) *m_t << " ";
187 m_col++;
188 }
189 }
190 break;
191 case ' ': if (m_col>=stripAmount) *m_t << " ";
192 m_col++;
193 break;
194 case '\n': *m_t << "\n"; m_col=0; break;
195 case '\\': *m_t << "\\\\"; m_col++; break;
196 case '\"': // no break!
197 default: p=writeUTF8Char(*m_t,p-1); m_col++; break;
198 }
199 }
200 //printf("%s",str);fflush(stdout);
201 }
202 }
203}
204
209
214
216{
217 m_hide = false;
218}
219
221{
222 m_stripIndentAmount = amount;
223}
224
225//-------------------------------------------------------------------------------
226
228 : OutputGenerator(Config_getString(MAN_OUTPUT)+"/"+getSubdir())
229 , m_codeList(std::make_unique<OutputCodeList>())
230{
232}
233
235{
236 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
238 m_codeGen->setTextStream(&m_t);
240 m_col = og.m_col;
245}
246
248{
249 if (this!=&og)
250 {
251 m_dir = og.m_dir;
252 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
254 m_codeGen->setTextStream(&m_t);
256 m_col = og.m_col;
261 }
262 return *this;
263}
264
266
271
273{
274 QCString manOutput = Config_getString(MAN_OUTPUT);
275
276 Dir d(manOutput.str());
277 if (!d.exists() && !d.mkdir(manOutput.str()))
278 {
279 term("Could not create output directory {}\n",manOutput);
280 }
281 std::string manDir = manOutput.str()+"/"+getSubdir().str();
282 if (!d.exists(manDir) && !d.mkdir(manDir))
283 {
284 term("Could not create output directory {}/{}\n",manOutput,getSubdir());
285 }
286 createSubDirs(d);
287}
288
290{
291 QCString dname = Config_getString(MAN_OUTPUT);
292 Dir d(dname.str());
293 clearSubDirs(d);
294}
295
296static QCString buildFileName(const QCString &name)
297{
298 QCString fileName;
299 if (name.isEmpty()) return "noname";
300
301 const char *p=name.data();
302 char c = 0;
303 while ((c=*p++))
304 {
305 switch (c)
306 {
307 case ':':
308 fileName+="_";
309 if (*p==':') p++;
310 break;
311 case '<':
312 case '>':
313 case '&':
314 case '*':
315 case '!':
316 case '^':
317 case '~':
318 case '%':
319 case '+':
320 case '/':
321 fileName+="_";
322 break;
323 default:
324 fileName+=c;
325 }
326 }
327
328 QCString manExtension = "." + getExtension();
329 if (fileName.right(manExtension.length())!=manExtension)
330 {
331 fileName+=manExtension;
332 }
333
334 return fileName;
335}
336
337void ManGenerator::startFile(const QCString &,bool,const QCString &manName,const QCString &,int,int)
338{
339 startPlainFile( buildFileName( manName ) );
341}
342
344{
345 m_t << "\n";
346 endPlainFile();
347}
348
350{
351 m_t << ".TH \"" << name << "\" " << getExtension() << " \"";
352 switch (Config_getEnum(TIMESTAMP))
353 {
354 case TIMESTAMP_t::YES:
355 case TIMESTAMP_t::DATETIME:
357 break;
358 case TIMESTAMP_t::DATE:
359 m_t << dateToString(DateTimeType::Date) << "\" \"";
360 break;
361 case TIMESTAMP_t::NO:
362 break;
363 }
364 if (!Config_getString(PROJECT_NUMBER).isEmpty())
365 m_t << "Version " << Config_getString(PROJECT_NUMBER) << "\" \"";
366 if (Config_getString(PROJECT_NAME).isEmpty())
367 m_t << "Doxygen";
368 else
369 m_t << Config_getString(PROJECT_NAME);
370 m_t << "\" \\\" -*- nroff -*-\n";
371 m_t << ".ad l\n";
372 m_t << ".nh\n";
373 m_t << ".SH NAME\n";
374 m_t << name;
378}
379
381{
382 if (!m_paragraph)
383 {
384 if (!m_firstCol) m_t << "\n";
385 m_t << ".PP\n";
387 }
389}
390
392{
393 if (!m_paragraph)
394 {
395 if (!m_firstCol) m_t << "\n";
396 m_t << ".PP\n";
398 }
400}
401
405
407{
408 docify(text);
409}
410
412{
413}
414
416{
417}
418
420 const QCString &,const QCString &)
421{
422}
423
425 const QCString &, const QCString &name)
426{
427 startBold(); docify(name); endBold();
428}
429
431{
432 if (!m_firstCol) m_t << "\n";
433 m_t << ".SH \"";
436}
437
439{
440 m_t << "\"\n.PP \n";
444}
445
447{
448 if (!m_firstCol) m_t << "\n";
449 m_t << ".SS \"";
450}
451
453{
454 m_t << "\"\n";
457}
458
460{
461 if (!str.isEmpty())
462 {
463 const char *p=str.data();
464 char c=0;
465 while ((c=*p++))
466 {
467 switch(c)
468 {
469 case '-': m_t << "\\-"; break; // see bug747780
470 case '.': m_t << "\\&."; break; // see bug652277
471 case '\\': m_t << "\\\\"; m_col++; break;
472 case '\n': m_t << "\n"; m_col=0; break;
473 case '\"': c = '\''; // no break!
474 default: m_t << c; m_col++; break;
475 }
476 }
477 m_firstCol=(c=='\n');
478 //printf("%s",str);fflush(stdout);
479 }
481}
482
484{
485 m_firstCol=(c=='\n');
486 if (m_firstCol) m_col=0; else m_col++;
487 switch (c)
488 {
489 case '\\': m_t << "\\\\"; break;
490 case '\"': c = '\''; // no break!
491 default: m_t << c; break;
492 }
493 //printf("%c",c);fflush(stdout);
495}
496
498{
499 if (!m_firstCol) m_t << "\n";
500 m_t << ".TP\n";
503 m_col=0;
504}
505
509
510void ManGenerator::startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool)
511{
512 if (!m_firstCol) m_t << "\n";
513 m_t << ".SS \"";
516}
517
519 const QCString &, const QCString &name,
520 const QCString &)
521{
522 // something to be done?
523 if( !Config_getBool(MAN_LINKS) )
524 {
525 return; // no
526 }
527
528 // the name of the link file is derived from the name of the anchor:
529 // - truncate after an (optional) ::
530 QCString baseName = name;
531 int i=baseName.findRev("::");
532 if (i!=-1) baseName=baseName.right(baseName.length()-i-2);
533
534 //printf("Converting man link '%s'->'%s'->'%s'\n",
535 // name,qPrint(baseName),qPrint(buildFileName(baseName)));
536
537 // - remove dangerous characters and append suffix, then add dir prefix
538 QCString fileName=dir()+"/"+buildFileName( baseName );
539 FileInfo fi(fileName.str());
540 if (!fi.exists())
541 {
542 std::ofstream linkStream = Portable::openOutputStream(fileName);
543 if (linkStream.is_open())
544 {
545 linkStream << ".so " << getSubdir() << "/" << buildFileName( manName ) << "\n";
546 }
547 }
548}
549
551{
552}
553
555{
556 m_t << "\"\n";
557}
558
560{
561 if (!m_firstCol) m_t << "\n";
562 m_t << "\n.SS \"";
565}
566
568{
569 m_t << "\"";
570}
572{
573 if (!m_firstCol) m_t << "\n";
574 m_t << ".SH SYNOPSIS\n.br\n.PP\n";
577}
578
580{
581 if (!m_firstCol) m_t << "\n";
582 if (!m_paragraph) m_t << ".in -1c\n";
583 m_t << ".in +1c\n";
586 m_col=0;
587}
588
592
594{
595 if (indentLevel==0)
596 {
598 }
599}
600
602{
603 if (indentLevel==0)
604 {
606 }
607}
608
609
611{
612 if (m_firstCol && !m_insideTabbing) m_t << ".in +1c\n";
613 m_t << "\n.ti -1c\n.RI \"";
615}
616
618{
619 m_t << "\"\n.br";
620}
621
623{
624 if (!m_insideTabbing)
625 {
626 m_t << "\n.in +1c"; m_firstCol=FALSE;
627 }
628}
629
631{
632 if (!m_insideTabbing)
633 {
634 m_t << "\n.in -1c"; m_firstCol=FALSE;
635 }
636}
637
639{
640 m_t << "\n.PP\n.RI \"\\fB";
641}
642
644{
645 m_t << "\\fP\"\n.br\n";
647}
648
652
654{
655 m_t << "\n.PP";
656}
657
659{
660 m_t << "\n.in +1c";
661}
662
664{
665 m_t << "\n.in -1c";
667}
668
670{
671 if( !m_inHeader )
672 {
673 switch(type.level())
674 {
675 case SectionType::Page: // fall through
676 case SectionType::Section: startGroupHeader("",0); break;
677 case SectionType::Subsection: // fall through
678 case SectionType::Subsubsection: // fall through
679 case SectionType::Paragraph: // fall through
680 case SectionType::Subparagraph: // fall through
682 default: ASSERT(0); break;
683 }
684 }
685}
686
688{
689 if( !m_inHeader )
690 {
691 switch(type.level())
692 {
693 case SectionType::Page: // fall through
694 case SectionType::Section: endGroupHeader(0); break;
695 case SectionType::Subsection: // fall through
696 case SectionType::Subsubsection: // fall through
697 case SectionType::Paragraph: // fall through
698 case SectionType::Subparagraph: // fall through
700 default: ASSERT(0); break;
701 }
702 }
703 else
704 {
705 m_t << "\n.PP\n";
709 }
710}
711
713{
714 if (!m_firstCol)
715 { m_t << "\n" << ".PP\n";
717 m_col=0;
718 }
720 startBold();
721 docify(theTranslator->trExamples());
722 endBold();
724}
725
729
730void ManGenerator::startDescTable(const QCString &title,const bool hasInits)
731{
732 if (!m_firstCol)
733 { m_t << "\n.PP\n";
735 m_col=0;
736 }
738 startBold();
739 docify(title);
740 endBold();
743}
744
749
750void ManGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int,int)
751{
752 const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST *>(ast);
753 if (astImpl)
754 {
756 std::visit(visitor,astImpl->root);
757 }
760}
761
763{
764 if (!m_firstCol)
765 { m_t << "\n.PP\n";
767 m_col=0;
768 }
770 startBold();
771 docify(header);
772 endBold();
774}
775
781
783{
784 endEmphasis();
786 m_t << " : ";
787}
788
793
798
802
804{
805 m_t << "\n"; m_firstCol=TRUE;
806}
807
811
812
814{
815 if (!m_firstCol)
816 {
817 m_t << "\n.PP\n" << ".in -1c\n";
818 }
819 m_t << ".RI \"\\fB";
820}
821
823{
824 m_t << "\\fP\"\n" << ".in +1c\n";
826}
827
829{
830 if (!m_firstCol)
831 {
832 m_t << "\n.PP\n";
833 }
834 m_t << "\\fB";
835 if (isEnum)
836 {
837 docify(theTranslator->trEnumerationValues());
838 }
839 else
840 {
841 docify(theTranslator->trCompoundMembers());
842 }
843 m_t << ":\\fP\n";
844 m_t << ".RS 4\n";
845}
846
848{
849 if (!m_firstCol) m_t << "\n";
850 m_t << ".RE\n";
851 m_t << ".PP\n";
853}
854
858
860{
861 m_t << " ";
862}
863
865{
866 m_t << "\\fI";
867}
868
870{
871 m_t << "\\fP ";
872}
873
877
879{
880 if (!m_firstCol) m_t << "\n";
881 m_t << ".br\n";
882 m_t << ".PP\n";
884}
885
889
890void ManGenerator::writeLabel(const QCString &l,bool isLast)
891{
892 m_t << "\\fR [" << l << "]\\fP";
893 if (!isLast) m_t << ", ";
894}
895
897{
898}
899
903
905 const QCString &/*id*/, const QCString &/*ref*/,
906 const QCString &/*file*/, const QCString &/*anchor*/,
907 const QCString &title, const QCString &name)
908{
909 m_t << "\n\n";
910 m_t << theTranslator->trInheritedFrom(docifyToString(title), objectLinkToString(name));
912}
913
915{
916 if (openBracket) m_t << "(";
917}
918
919void ManGenerator::endParameterExtra(bool last,bool /* emptyList */, bool closeBracket)
920{
921 if (last && closeBracket)
922 {
923 m_t << ")";
924 }
925}
927{
928 m_t << " ";
929}
930
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual QCString getDefFileExtension() const =0
Class representing a directory in the file system.
Definition dir.h:75
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Definition dir.cpp:295
bool exists() const
Definition dir.cpp:257
Class representing the abstract syntax tree of a documentation block.
Definition docnode.h:1466
DocNodeVariant root
Definition docnode.h:1491
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
bool exists() const
Definition fileinfo.cpp:30
opaque representation of the abstract syntax tree (AST)
Definition docparser.h:50
Generator for Man page code fragments.
Definition mangen.h:25
size_t m_stripIndentAmount
Definition mangen.h:64
void codify(const QCString &text) override
Definition mangen.cpp:162
void stripCodeComments(bool b) override
Definition mangen.cpp:205
ManCodeGenerator(TextStream *t)
Definition mangen.cpp:111
void endSpecialComment() override
Definition mangen.cpp:215
void startSpecialComment() override
Definition mangen.cpp:210
size_t m_col
Definition mangen.h:60
TextStream * m_t
Definition mangen.h:61
void writeLineNumber(const QCString &, const QCString &, const QCString &, int l, bool) override
Definition mangen.cpp:129
void startCodeFragment(const QCString &style) override
Definition mangen.cpp:115
void setStripIndentAmount(size_t amount) override
Definition mangen.cpp:220
bool m_stripCodeComments
Definition mangen.h:62
void endCodeFragment(const QCString &) override
Definition mangen.cpp:121
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
Definition mangen.cpp:136
Concrete visitor implementation for LaTeX output.
void newParagraph()
Definition mangen.cpp:380
void startConstraintDocs() override
Definition mangen.cpp:799
OutputType type() const override
Definition mangen.h:84
void startAnonTypeScope(int) override
Definition mangen.cpp:593
void endTitleHead(const QCString &, const QCString &) override
Definition mangen.cpp:349
void startBold() override
Definition mangen.h:168
void endMemberItem(MemberItemType) override
Definition mangen.cpp:617
void startEmphasis() override
Definition mangen.h:166
void endLabels() override
Definition mangen.cpp:896
void startMemberGroupHeader(const QCString &, bool) override
Definition mangen.cpp:638
ManCodeGenerator * m_codeGen
Definition mangen.h:300
void addCodeGen(OutputCodeList &list) override
Definition mangen.cpp:267
void endAnonTypeScope(int) override
Definition mangen.cpp:601
void endGroupHeader(int) override
Definition mangen.cpp:438
void endSection(const QCString &, SectionType) override
Definition mangen.cpp:687
void endMemberGroup(bool) override
Definition mangen.cpp:663
void endConstraintDocs() override
Definition mangen.cpp:803
void cleanup() override
Definition mangen.cpp:289
std::unique_ptr< OutputCodeList > m_codeList
Definition mangen.h:299
void endMemberList() override
Definition mangen.cpp:630
void startParagraph(const QCString &classDef) override
Definition mangen.cpp:391
void endParameterExtra(bool, bool, bool) override
Definition mangen.cpp:919
void startMemberItem(const QCString &, MemberItemType, const QCString &) override
Definition mangen.cpp:610
void startGroupHeader(const QCString &, int) override
Definition mangen.cpp:430
void startSection(const QCString &, const QCString &, SectionType) override
Definition mangen.cpp:669
void endDescTable() override
Definition mangen.cpp:745
void endMemberGroupHeader() override
Definition mangen.cpp:643
void startDoxyAnchor(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
Definition mangen.cpp:518
bool m_paragraph
Definition mangen.h:295
void endInlineMemberType() override
Definition mangen.cpp:859
void startMemberHeader(const QCString &, int) override
Definition mangen.cpp:446
void endMemberHeader() override
Definition mangen.cpp:452
void startMemberDocSimple(bool) override
Definition mangen.cpp:828
void startExamples() override
Definition mangen.cpp:712
void startConstraintParam() override
Definition mangen.cpp:776
void endInlineMemberDoc() override
Definition mangen.cpp:878
void endDescForItem() override
Definition mangen.cpp:589
void endParagraph() override
Definition mangen.cpp:402
void endConstraintList() override
Definition mangen.cpp:808
void endItemListItem() override
Definition mangen.cpp:506
void writeLabel(const QCString &l, bool isLast) override
Definition mangen.cpp:890
void endPlainFile() override
Definition mangen.h:290
void startParameterList(bool) override
Definition mangen.cpp:914
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name) override
Definition mangen.cpp:424
void startMemberGroupDocs() override
Definition mangen.cpp:649
void endInlineHeader() override
Definition mangen.cpp:822
bool m_inHeader
Definition mangen.h:298
void startItemListItem() override
Definition mangen.cpp:497
void endExamples() override
Definition mangen.cpp:726
ManGenerator & operator=(const ManGenerator &)
Definition mangen.cpp:247
void endIndexItem(const QCString &ref, const QCString &file) override
Definition mangen.cpp:415
void endInlineMemberName() override
Definition mangen.cpp:869
void startInlineMemberType() override
Definition mangen.cpp:855
void writeStartAnnoItem(const QCString &type, const QCString &file, const QCString &path, const QCString &name) override
Definition mangen.cpp:419
void startIndexItem(const QCString &ref, const QCString &file) override
Definition mangen.cpp:411
void startConstraintList(const QCString &) override
Definition mangen.cpp:762
void endBold() override
Definition mangen.h:169
void writeDoc(const IDocNodeAST *ast, const Definition *, const MemberDef *, int, int) override
Definition mangen.cpp:750
void writeSynopsis() override
Definition mangen.cpp:571
void endConstraintType() override
Definition mangen.cpp:794
void endCompoundTemplateParams() override
Definition mangen.cpp:567
bool m_firstCol
Definition mangen.h:293
void startMemberDoc(const QCString &, const QCString &, const QCString &, const QCString &, int, int, bool) override
Definition mangen.cpp:510
void startDescTable(const QCString &title, const bool hasInits) override
Definition mangen.cpp:730
void endMemberGroupDocs() override
Definition mangen.cpp:653
static void init()
Definition mangen.cpp:272
bool m_insideTabbing
Definition mangen.h:297
void addLabel(const QCString &, const QCString &) override
Definition mangen.cpp:550
void startConstraintType() override
Definition mangen.cpp:789
void writeInheritedSectionTitle(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
Definition mangen.cpp:904
void startFile(const QCString &name, bool isSource, const QCString &manName, const QCString &title, int id, int hierarchyLevel) override
Definition mangen.cpp:337
void writeChar(char c) override
Definition mangen.cpp:483
void endParameterType() override
Definition mangen.cpp:926
void writeString(const QCString &text) override
Definition mangen.cpp:406
void startDescForItem() override
Definition mangen.cpp:579
void startCompoundTemplateParams() override
Definition mangen.cpp:559
void startMemberList() override
Definition mangen.cpp:622
void startInlineHeader() override
Definition mangen.cpp:813
void startMemberGroup() override
Definition mangen.cpp:658
void endHeaderSection() override
Definition mangen.cpp:900
void startInlineMemberDoc() override
Definition mangen.cpp:874
void endConstraintParam() override
Definition mangen.cpp:782
void startLabels() override
Definition mangen.cpp:886
void startInlineMemberName() override
Definition mangen.cpp:864
bool m_upperCase
Definition mangen.h:296
void docify(const QCString &text) override
Definition mangen.cpp:459
void startPlainFile(const QCString &name) override
Definition mangen.h:289
void endFile() override
Definition mangen.cpp:343
void endMemberDocSimple(bool) override
Definition mangen.cpp:847
void endMemberDoc(bool) override
Definition mangen.cpp:554
void endEmphasis() override
Definition mangen.h:167
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
Class representing a list of different code generators.
Definition outputlist.h:165
void add(OutputCodeIntfPtr &&p)
Definition outputlist.h:195
Abstract interface for output generators.
Definition outputgen.h:127
QCString dir() const
Definition outputgen.cpp:52
QCString m_dir
Definition outputgen.h:117
TextStream m_t
Definition outputgen.h:116
QCString fileName() const
Definition outputgen.cpp:57
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString & prepend(const char *s)
Definition qcstring.h:422
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
const std::string & str() const
Definition qcstring.h:552
QCString right(size_t len) const
Definition qcstring.h:234
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition qcstring.h:185
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:96
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
static constexpr int Section
Definition section.h:33
static constexpr int Subsection
Definition section.h:34
static constexpr int Subsubsection
Definition section.h:35
static constexpr int Page
Definition section.h:31
static constexpr int Paragraph
Definition section.h:36
static constexpr int Subsubparagraph
Definition section.h:38
static constexpr int Subparagraph
Definition section.h:37
Text streaming class that buffers data.
Definition textstream.h:36
#define Config_getInt(name)
Definition config.h:34
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
#define Config_getEnum(name)
Definition config.h:35
QCString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
Definition datetime.cpp:63
static QCString objectLinkToString(const QCString &, const QCString &f, const QCString &anchor, const QCString &text)
Translator * theTranslator
Definition language.cpp:71
static QCString getSubdir()
Definition mangen.cpp:69
static QCString getExtension()
Definition mangen.cpp:36
static QCString docifyToString(const QCString &str)
Definition mangen.cpp:79
static QCString objectLinkToString(const QCString &text)
Definition mangen.cpp:104
static QCString buildFileName(const QCString &name)
Definition mangen.cpp:296
#define term(fmt,...)
Definition message.h:137
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:649
OutputCodeDefer< ManCodeGenerator > ManCodeGeneratorDefer
Definition outputlist.h:105
Portable versions of functions that are platform dependent.
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
#define ASSERT(x)
Definition qcstring.h:39
CodeSymbolType
Definition types.h:481
const char * writeUTF8Char(TextStream &t, const char *s)
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
Definition utf8.cpp:197
Various UTF8 related helper functions.
size_t updateColumnCount(const char *s, size_t col)
Definition util.cpp:6810
void clearSubDirs(const Dir &d)
Definition util.cpp:3597
void createSubDirs(const Dir &d)
Definition util.cpp:3570
A bunch of utility functions.