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{
231 m_codeGen = m_codeList->add<ManCodeGenerator>(&m_t);
232}
233
235{
236 m_codeList = std::make_unique<OutputCodeList>(*og.m_codeList);
237 m_codeGen = m_codeList->get<ManCodeGenerator>(OutputType::Man);
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);
253 m_codeGen = m_codeList->get<ManCodeGenerator>(OutputType::Man);
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 %s\n",qPrint(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 %s/%s\n",qPrint(manOutput), qPrint(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 &,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 << ".SH \"";
503}
504
506{
507 m_t << "\"";
508}
509
511{
512 if (!m_firstCol) m_t << "\n";
513 m_t << ".TP\n";
516 m_col=0;
517}
518
522
523void ManGenerator::startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool)
524{
525 if (!m_firstCol) m_t << "\n";
526 m_t << ".SS \"";
529}
530
532 const QCString &, const QCString &name,
533 const QCString &)
534{
535 // something to be done?
536 if( !Config_getBool(MAN_LINKS) )
537 {
538 return; // no
539 }
540
541 // the name of the link file is derived from the name of the anchor:
542 // - truncate after an (optional) ::
543 QCString baseName = name;
544 int i=baseName.findRev("::");
545 if (i!=-1) baseName=baseName.right(baseName.length()-i-2);
546
547 //printf("Converting man link '%s'->'%s'->'%s'\n",
548 // name,qPrint(baseName),qPrint(buildFileName(baseName)));
549
550 // - remove dangerous characters and append suffix, then add dir prefix
551 QCString fileName=dir()+"/"+buildFileName( baseName );
552 FileInfo fi(fileName.str());
553 if (!fi.exists())
554 {
555 std::ofstream linkStream = Portable::openOutputStream(fileName);
556 if (linkStream.is_open())
557 {
558 linkStream << ".so " << getSubdir() << "/" << buildFileName( manName ) << "\n";
559 }
560 }
561}
562
564{
565}
566
568{
569 m_t << "\"\n";
570}
571
573{
574 if (!m_firstCol) m_t << "\n";
575 m_t << "\n.SS \"";
578}
579
581{
582 m_t << "\"";
583}
585{
586 if (!m_firstCol) m_t << "\n";
587 m_t << ".SH SYNOPSIS\n.br\n.PP\n";
590}
591
593{
594 if (!m_firstCol) m_t << "\n";
595 if (!m_paragraph) m_t << ".in -1c\n";
596 m_t << ".in +1c\n";
599 m_col=0;
600}
601
605
607{
608 if (indentLevel==0)
609 {
611 }
612}
613
615{
616 if (indentLevel==0)
617 {
619 }
620}
621
622
624{
625 if (m_firstCol && !m_insideTabbing) m_t << ".in +1c\n";
626 m_t << "\n.ti -1c\n.RI \"";
628}
629
631{
632 m_t << "\"\n.br";
633}
634
636{
637 if (!m_insideTabbing)
638 {
639 m_t << "\n.in +1c"; m_firstCol=FALSE;
640 }
641}
642
644{
645 if (!m_insideTabbing)
646 {
647 m_t << "\n.in -1c"; m_firstCol=FALSE;
648 }
649}
650
652{
653 m_t << "\n.PP\n.RI \"\\fB";
654}
655
657{
658 m_t << "\\fP\"\n.br\n";
660}
661
665
667{
668 m_t << "\n.PP";
669}
670
672{
673 m_t << "\n.in +1c";
674}
675
677{
678 m_t << "\n.in -1c";
680}
681
683{
684 if( !m_inHeader )
685 {
686 switch(type.level())
687 {
688 case SectionType::Page: // fall through
690 case SectionType::Subsection: // fall through
691 case SectionType::Subsubsection: // fall through
692 case SectionType::Paragraph: // fall through
693 case SectionType::Subparagraph: // fall through
694 case SectionType::Subsubparagraph: startMemberHeader(QCString(), -1); break;
695 default: ASSERT(0); break;
696 }
697 }
698}
699
701{
702 if( !m_inHeader )
703 {
704 switch(type.level())
705 {
706 case SectionType::Page: // fall through
707 case SectionType::Section: endGroupHeader(0); break;
708 case SectionType::Subsection: // fall through
709 case SectionType::Subsubsection: // fall through
710 case SectionType::Paragraph: // fall through
711 case SectionType::Subparagraph: // fall through
713 default: ASSERT(0); break;
714 }
715 }
716 else
717 {
718 m_t << "\n.PP\n";
722 }
723}
724
726{
727 if (!m_firstCol)
728 { m_t << "\n" << ".PP\n";
730 m_col=0;
731 }
733 startBold();
735 endBold();
737}
738
742
743void ManGenerator::startDescTable(const QCString &title,const bool hasInits)
744{
745 if (!m_firstCol)
746 { m_t << "\n.PP\n";
748 m_col=0;
749 }
751 startBold();
752 docify(title);
753 endBold();
756}
757
762
763void ManGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int)
764{
765 const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST *>(ast);
766 if (astImpl)
767 {
768 ManDocVisitor visitor(m_t,*m_codeList,ctx?ctx->getDefFileExtension():QCString(""));
769 std::visit(visitor,astImpl->root);
770 }
773}
774
776{
777 if (!m_firstCol)
778 { m_t << "\n.PP\n";
780 m_col=0;
781 }
783 startBold();
784 docify(header);
785 endBold();
787}
788
794
796{
797 endEmphasis();
799 m_t << " : ";
800}
801
806
811
815
817{
818 m_t << "\n"; m_firstCol=TRUE;
819}
820
824
825
827{
828 if (!m_firstCol)
829 {
830 m_t << "\n.PP\n" << ".in -1c\n";
831 }
832 m_t << ".RI \"\\fB";
833}
834
836{
837 m_t << "\\fP\"\n" << ".in +1c\n";
839}
840
842{
843 if (!m_firstCol)
844 {
845 m_t << "\n.PP\n";
846 }
847 m_t << "\\fB";
848 if (isEnum)
849 {
851 }
852 else
853 {
855 }
856 m_t << ":\\fP\n";
857 m_t << ".RS 4\n";
858}
859
861{
862 if (!m_firstCol) m_t << "\n";
863 m_t << ".RE\n";
864 m_t << ".PP\n";
866}
867
871
873{
874 m_t << " ";
875}
876
878{
879 m_t << "\\fI";
880}
881
883{
884 m_t << "\\fP ";
885}
886
890
892{
893 if (!m_firstCol) m_t << "\n";
894 m_t << ".br\n";
895 m_t << ".PP\n";
897}
898
902
903void ManGenerator::writeLabel(const QCString &l,bool isLast)
904{
905 m_t << "\\fR [" << l << "]\\fP";
906 if (!isLast) m_t << ", ";
907}
908
910{
911}
912
916
918 const QCString &/*id*/, const QCString &/*ref*/,
919 const QCString &/*file*/, const QCString &/*anchor*/,
920 const QCString &title, const QCString &name)
921{
922 m_t << "\n\n";
925}
926
928{
929 if (openBracket) m_t << "(";
930}
931
932void ManGenerator::endParameterExtra(bool last,bool /* emptyList */, bool closeBracket)
933{
934 if (last && closeBracket)
935 {
936 m_t << ")";
937 }
938}
940{
941 m_t << " ";
942}
943
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual QCString getDefFileExtension() const =0
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Definition dir.cpp:295
bool exists() const
Definition dir.cpp:257
DocNodeVariant root
Definition docnode.h:1467
bool exists() const
Definition fileinfo.cpp:30
opaque representation of the abstract syntax tree (AST)
Definition docparser.h:49
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
void newParagraph()
Definition mangen.cpp:380
void startConstraintDocs() override
Definition mangen.cpp:812
OutputType type() const override
Definition mangen.h:84
void startAnonTypeScope(int) override
Definition mangen.cpp:606
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:630
void startEmphasis() override
Definition mangen.h:166
void endLabels() override
Definition mangen.cpp:909
ManCodeGenerator * m_codeGen
Definition mangen.h:299
void addCodeGen(OutputCodeList &list) override
Definition mangen.cpp:267
void endAnonTypeScope(int) override
Definition mangen.cpp:614
void writeDoc(const IDocNodeAST *ast, const Definition *, const MemberDef *, int) override
Definition mangen.cpp:763
void endGroupHeader(int) override
Definition mangen.cpp:438
void endSection(const QCString &, SectionType) override
Definition mangen.cpp:700
void endMemberGroup(bool) override
Definition mangen.cpp:676
void endConstraintDocs() override
Definition mangen.cpp:816
void cleanup() override
Definition mangen.cpp:289
std::unique_ptr< OutputCodeList > m_codeList
Definition mangen.h:298
void endMemberList() override
Definition mangen.cpp:643
void startParagraph(const QCString &classDef) override
Definition mangen.cpp:391
void endParameterExtra(bool, bool, bool) override
Definition mangen.cpp:932
void startMemberItem(const QCString &, MemberItemType, const QCString &) override
Definition mangen.cpp:623
void startSection(const QCString &, const QCString &, SectionType) override
Definition mangen.cpp:682
void endDescTable() override
Definition mangen.cpp:758
void endMemberGroupHeader() override
Definition mangen.cpp:656
void startDoxyAnchor(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
Definition mangen.cpp:531
bool m_paragraph
Definition mangen.h:294
void endInlineMemberType() override
Definition mangen.cpp:872
void endTitle()
Definition mangen.cpp:505
void startMemberHeader(const QCString &, int) override
Definition mangen.cpp:446
void endMemberHeader() override
Definition mangen.cpp:452
void startMemberDocSimple(bool) override
Definition mangen.cpp:841
void startExamples() override
Definition mangen.cpp:725
void startGroupHeader(int) override
Definition mangen.cpp:430
void startConstraintParam() override
Definition mangen.cpp:789
void endInlineMemberDoc() override
Definition mangen.cpp:891
void endDescForItem() override
Definition mangen.cpp:602
void endParagraph() override
Definition mangen.cpp:402
void endConstraintList() override
Definition mangen.cpp:821
void endItemListItem() override
Definition mangen.cpp:519
void writeLabel(const QCString &l, bool isLast) override
Definition mangen.cpp:903
void endPlainFile() override
Definition mangen.h:286
void startParameterList(bool) override
Definition mangen.cpp:927
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:662
void endInlineHeader() override
Definition mangen.cpp:835
bool m_inHeader
Definition mangen.h:297
void startItemListItem() override
Definition mangen.cpp:510
void endExamples() override
Definition mangen.cpp:739
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:882
void startInlineMemberType() override
Definition mangen.cpp:868
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:775
void endBold() override
Definition mangen.h:169
void startMemberGroupHeader(bool) override
Definition mangen.cpp:651
void startFile(const QCString &name, const QCString &manName, const QCString &title, int id, int hierarchyLevel) override
Definition mangen.cpp:337
void writeSynopsis() override
Definition mangen.cpp:584
void endConstraintType() override
Definition mangen.cpp:807
void endCompoundTemplateParams() override
Definition mangen.cpp:580
bool m_firstCol
Definition mangen.h:292
void startMemberDoc(const QCString &, const QCString &, const QCString &, const QCString &, int, int, bool) override
Definition mangen.cpp:523
void startDescTable(const QCString &title, const bool hasInits) override
Definition mangen.cpp:743
void endMemberGroupDocs() override
Definition mangen.cpp:666
static void init()
Definition mangen.cpp:272
bool m_insideTabbing
Definition mangen.h:296
void addLabel(const QCString &, const QCString &) override
Definition mangen.cpp:563
void startConstraintType() override
Definition mangen.cpp:802
void writeInheritedSectionTitle(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
Definition mangen.cpp:917
void writeChar(char c) override
Definition mangen.cpp:483
void endParameterType() override
Definition mangen.cpp:939
void writeString(const QCString &text) override
Definition mangen.cpp:406
void startDescForItem() override
Definition mangen.cpp:592
void startTitle()
Definition mangen.cpp:497
void startCompoundTemplateParams() override
Definition mangen.cpp:572
void startMemberList() override
Definition mangen.cpp:635
void startInlineHeader() override
Definition mangen.cpp:826
void startMemberGroup() override
Definition mangen.cpp:671
void endHeaderSection() override
Definition mangen.cpp:913
void startInlineMemberDoc() override
Definition mangen.cpp:887
void endConstraintParam() override
Definition mangen.cpp:795
void startLabels() override
Definition mangen.cpp:899
void startInlineMemberName() override
Definition mangen.cpp:877
bool m_upperCase
Definition mangen.h:295
void docify(const QCString &text) override
Definition mangen.cpp:459
void startPlainFile(const QCString &name) override
Definition mangen.h:285
void endFile() override
Definition mangen.cpp:343
void endMemberDocSimple(bool) override
Definition mangen.cpp:860
void endMemberDoc(bool) override
Definition mangen.cpp:567
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:164
void add(OutputCodeIntfPtr &&p)
Definition outputlist.h:194
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:407
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:567
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const std::string & str() const
Definition qcstring.h:526
QCString right(size_t len) const
Definition qcstring.h:219
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition qcstring.h:172
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
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:159
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
virtual QCString trInheritedFrom(const QCString &members, const QCString &what)=0
virtual QCString trEnumerationValues()=0
virtual QCString trCompoundMembers()=0
virtual QCString trExamples()=0
#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:94
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
OutputCodeDefer< ManCodeGenerator > ManCodeGeneratorDefer
Definition outputlist.h:104
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
Definition qcstring.h:661
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
#define ASSERT(x)
Definition qcstring.h:39
CodeSymbolType
Definition types.h:319
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:7207
void clearSubDirs(const Dir &d)
Definition util.cpp:4021
void createSubDirs(const Dir &d)
Definition util.cpp:3994
A bunch of utility functions.