Doxygen
Loading...
Searching...
No Matches
mandocvisitor.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2020 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#include "mandocvisitor.h"
17#include "docparser.h"
18#include "language.h"
19#include "doxygen.h"
20#include "outputgen.h"
21#include "code.h"
22#include "dot.h"
23#include "util.h"
24#include "message.h"
25#include "parserintf.h"
26#include "filedef.h"
27#include "htmlentity.h"
28#include "emoji.h"
29#include "fileinfo.h"
30#include "codefragment.h"
31#include "cite.h"
32
39
40 //--------------------------------------
41 // visitor functions for leaf nodes
42 //--------------------------------------
43
45{
46 if (m_hide) return;
47 filter(w.word());
49}
50
52{
53 if (m_hide) return;
54 m_t << "\\fB";
55 filter(w.word());
56 m_t << "\\fP";
58}
59
61{
62 if (m_hide) return;
63 if (m_insidePre)
64 {
65 m_t << w.chars();
66 m_firstCol=w.chars().at(w.chars().length()-1)=='\n';
67 }
68 else
69 {
70 m_t << " ";
72 }
73}
74
76{
77 if (m_hide) return;
78 const char *res = HtmlEntityMapper::instance().man(s.symbol());
79 if (res)
80 {
81 m_t << res;
82 }
83 else
84 {
85 // no error or warning to be supplied
86 // err("man: non supported HTML-entity found: &{};\n",get_symbol_item(s->symbol()));
87 }
89}
90
92{
93 if (m_hide) return;
94 const char *res = EmojiEntityMapper::instance().name(s.index());
95 if (res)
96 {
97 m_t << res;
98 }
99 else
100 {
101 m_t << s.name();
102 }
104}
105
107{
108 if (m_hide) return;
109 m_t << u.url();
111}
112
114{
115 if (m_hide) return;
116 m_t << "\n.br\n";
118}
119
121{
122 if (m_hide) return;
123 if (!m_firstCol) m_t << "\n";
124 m_t << ".PP\n";
126}
127
129{
130 if (m_hide) return;
131 switch (s.style())
132 {
134 if (s.enable()) m_t << "\\fB"; else m_t << "\\fP";
136 break;
140 /* not supported */
141 break;
142 case DocStyleChange::Underline: //underline is shown as emphasis
144 if (s.enable()) m_t << "\\fI"; else m_t << "\\fP";
146 break;
148 if (s.enable()) m_t << "\\fI"; else m_t << "\\fP";
150 break;
154 if (s.enable()) m_t << "\\fR"; else m_t << "\\fP";
156 break;
158 if (s.enable()) m_t << "\\*<"; else m_t << "\\*> ";
160 break;
162 if (s.enable()) m_t << "\\*{"; else m_t << "\\*} ";
164 break;
166 /* not supported */
167 break;
169 /* not supported */
170 break;
172 /* not supported */
173 break;
175 if (s.enable())
176 {
177 if (!m_firstCol) m_t << "\n";
178 m_t << ".PP\n";
179 m_t << ".nf\n";
181 }
182 else
183 {
185 if (!m_firstCol) m_t << "\n";
186 m_t << ".fi\n";
187 m_t << ".PP\n";
189 }
190 break;
191 case DocStyleChange::Div: /* HTML only */ break;
192 case DocStyleChange::Span: /* HTML only */ break;
193 }
194}
195
197{
198 if (m_hide) return;
199 QCString lang = m_langExt;
200 if (!s.language().isEmpty()) // explicit language setting
201 {
202 lang = s.language();
203 }
204 SrcLangExt langExt = getLanguageFromCodeLang(lang);
205 switch (s.type())
206 {
208 if (!m_firstCol) m_t << "\n";
209 m_t << ".PP\n";
210 m_t << ".nf\n";
212 langExt,
213 Config_getBool(STRIP_CODE_COMMENTS),
214 CodeParserOptions().setExample(s.isExample(),s.exampleFile())
215 );
216 if (!m_firstCol) m_t << "\n";
217 m_t << ".fi\n";
218 m_t << ".PP\n";
220 break;
222 filter(s.text(),true);
223 break;
225 m_t << "\\fR\n";
226 filter(s.text(),true);
227 m_t << "\\fP\n";
228 break;
230 if (!m_firstCol) m_t << "\n";
231 m_t << ".PP\n";
232 m_t << ".nf\n";
233 filter(s.text(),true);
234 if (!m_firstCol) m_t << "\n";
235 m_t << ".fi\n";
236 m_t << ".PP\n";
238 break;
240 m_t << s.text();
241 break;
247 case DocVerbatim::Dot:
248 case DocVerbatim::Msc:
251 /* nothing */
252 break;
253 }
254}
255
257{
258 /* no support for anchors in man pages */
259}
260
262{
263 if (m_hide) return;
265 switch(inc.type())
266 {
268 {
269 if (!m_firstCol) m_t << "\n";
270 m_t << ".PP\n";
271 m_t << ".nf\n";
272 FileInfo cfi( inc.file().str() );
273 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
275 inc.text(),
276 langExt,
277 inc.stripCodeComments(),
279 .setExample(inc.isExample(),inc.exampleFile())
280 .setFileDef(fd.get())
281 .setInlineFragment(true)
282 );
283 m_t << ".fi\n";
284 m_t << ".PP\n";
286 }
287 break;
289 if (!m_firstCol) m_t << "\n";
290 m_t << ".PP\n";
291 m_t << ".nf\n";
293 inc.text(),
294 langExt,
295 inc.stripCodeComments(),
297 .setExample(inc.isExample(),inc.exampleFile())
298 .setInlineFragment(true)
299 .setShowLineNumbers(false)
300 );
301 m_t << ".fi\n";
302 m_t << ".PP\n";
304 break;
312 break;
314 m_t << inc.text();
315 break;
317 if (!m_firstCol) m_t << "\n";
318 m_t << ".PP\n";
319 m_t << ".nf\n";
320 m_t << inc.text();
321 if (!m_firstCol) m_t << "\n";
322 m_t << ".fi\n";
323 m_t << ".PP\n";
325 break;
328 if (!m_firstCol) m_t << "\n";
329 m_t << ".PP\n";
330 m_t << ".nf\n";
332 inc.file(),
333 inc.blockId(),
334 inc.context(),
336 inc.trimLeft(),
338 );
339 m_t << ".fi\n";
340 m_t << ".PP\n";
342 break;
343 }
344}
345
347{
349 if (locLangExt.isEmpty()) locLangExt = m_langExt;
350 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
351 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
352 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
353 if (op.isFirst())
354 {
355 if (!m_hide)
356 {
357 if (!m_firstCol) m_t << "\n";
358 m_t << ".PP\n";
359 m_t << ".nf\n";
360 }
362 m_hide = TRUE;
363 }
364 if (op.type()!=DocIncOperator::Skip)
365 {
366 m_hide = popHidden();
367 if (!m_hide)
368 {
369 std::unique_ptr<FileDef> fd;
370 if (!op.includeFileName().isEmpty())
371 {
372 FileInfo cfi( op.includeFileName().str() );
373 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
374 }
375
376 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
379 .setExample(op.isExample(),op.exampleFile())
380 .setFileDef(fd.get())
382 );
383 }
385 m_hide=TRUE;
386 }
387 if (op.isLast())
388 {
389 m_hide = popHidden();
390 if (!m_hide)
391 {
392 if (!m_firstCol) m_t << "\n";
393 m_t << ".fi\n";
394 m_t << ".PP\n";
396 }
397 }
398 else
399 {
400 if (!m_hide) m_t << "\n";
401 }
402}
403
405{
406 if (m_hide) return;
407 m_t << f.text();
408}
409
413
417
419{
420 if (m_hide) return;
421 m_t << "\\fB";
422 auto opt = cite.option();
423 QCString txt;
424 if (!cite.file().isEmpty())
425 {
426 txt = cite.getText();
427 }
428 else
429 {
430 if (!opt.noPar()) txt += "[";
431 txt += cite.target();
432 if (!opt.noPar()) txt += "]";
433 }
434 filter(txt);
435 m_t << "\\fP";
436}
437
439{
440 if (m_hide) return;
441 m_t << s.chars();
442}
443
444
445//--------------------------------------
446// visitor functions for compound nodes
447//--------------------------------------
448
450{
451 if (m_hide) return;
452 m_indent++;
453 visitChildren(l);
454 m_indent--;
455 m_t << ".PP\n";
456}
457
459{
460 if (m_hide) return;
461 QCString ws;
462 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
463 if (!m_firstCol) m_t << "\n";
464 m_t << ".IP \"" << ws;
465 const DocAutoList *list = std::get_if<DocAutoList>(li.parent());
466 if (list && list->isEnumList())
467 {
468 m_t << li.itemNumber() << ".\" " << (2*(m_indent+1));
469 }
470 else // bullet list
471 {
472 switch (li.itemNumber())
473 {
474 case DocAutoList::Unchecked: // unchecked
475 m_t << "[ ]\" " << (2*m_indent) + 2;
476 break;
477 case DocAutoList::Checked_x: // checked with x
478 m_t << "[x]\" " << (2*m_indent) + 2;
479 break;
480 case DocAutoList::Checked_X: // checked with X
481 m_t << "[X]\" " << (2*m_indent) + 2;
482 break;
483 default:
484 m_t << "\\(bu\" " << (2*m_indent);
485 break;
486 }
487 }
488 m_t << "\n";
490 visitChildren(li);
491 m_t << "\n";
493}
494
496{
497 if (m_hide) return;
498 visitChildren(p);
499 if (!p.isLast() && // omit <p> for last paragraph
500 !(p.parent() && // and for parameter sections
501 std::get_if<DocParamSect>(p.parent())
502 )
503 )
504 {
505 if (!m_firstCol) m_t << "\n";
506 m_t << "\n.PP\n";
508 }
509}
510
512{
513 visitChildren(r);
514}
515
517{
518 if (m_hide) return;
519 if (!m_firstCol)
520 {
521 m_t << "\n";
522 m_t << ".PP\n";
523 }
524 m_t << "\\fB";
525 switch(s.type())
526 {
528 m_t << theTranslator->trSeeAlso(); break;
530 m_t << theTranslator->trReturns(); break;
532 m_t << theTranslator->trAuthor(TRUE,TRUE); break;
534 m_t << theTranslator->trAuthor(TRUE,FALSE); break;
536 m_t << theTranslator->trVersion(); break;
538 m_t << theTranslator->trSince(); break;
540 m_t << theTranslator->trDate(); break;
542 m_t << theTranslator->trNote(); break;
544 m_t << theTranslator->trWarning(); break;
546 m_t << theTranslator->trPrecondition(); break;
548 m_t << theTranslator->trPostcondition(); break;
550 m_t << theTranslator->trCopyright(); break;
552 m_t << theTranslator->trInvariant(); break;
554 m_t << theTranslator->trRemarks(); break;
556 m_t << theTranslator->trAttention(); break;
558 m_t << theTranslator->trImportant(); break;
559 case DocSimpleSect::User: break;
560 case DocSimpleSect::Rcs: break;
561 case DocSimpleSect::Unknown: break;
562 }
563
564 // special case 1: user defined title
565 if (s.title())
566 {
567 std::visit(*this,*s.title());
568 }
569 m_t << "\\fP\n";
570 m_t << ".RS 4\n";
571 visitChildren(s);
572 if (!m_firstCol) m_t << "\n";
573 m_t << ".RE\n";
574 m_t << ".PP\n";
576}
577
579{
580 if (m_hide) return;
581 visitChildren(t);
582}
583
585{
586 if (m_hide) return;
587 m_indent++;
588 if (!m_firstCol) m_t << "\n";
589 m_t << ".PD 0\n";
590 m_firstCol=true;
591 visitChildren(l);
592 m_indent--;
593 m_t << ".PP\n";
594}
595
597{
598 if (m_hide) return;
599 QCString ws;
600 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
601 if (!m_firstCol) m_t << "\n";
602 m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
604 if (li.paragraph())
605 {
606 visit(*this,*li.paragraph());
607 }
608 m_t << "\n";
610}
611
613{
614 if (m_hide) return;
615 if (!m_firstCol) m_t << "\n";
616 if (s.level()==1) m_t << ".SH"; else m_t << ".SS";
617 m_t << " \"";
618 if (s.title())
619 {
620 std::visit(*this,*s.title());
621 }
622 m_t << "\"\n";
623 if (s.level()==1) m_t << ".PP\n";
625 visitChildren(s);
626}
627
629{
630 if (m_hide) return;
631 m_indent++;
632 if (!m_firstCol) m_t << "\n";
633 m_t << ".PD 0\n";
634 m_firstCol=true;
635 int indent = std::min(m_indent,maxIndentLevels-1);
636 m_listItemInfo[indent].number = 1;
637 m_listItemInfo[indent].type = '1';
638 for (const auto &opt : l.attribs())
639 {
640 if (opt.name=="type")
641 {
642 m_listItemInfo[indent].type = opt.value[0];
643 }
644 if (opt.name=="start")
645 {
646 bool ok = false;
647 int val = opt.value.toInt(&ok);
648 if (ok) m_listItemInfo[indent].number = val;
649 }
650 }
651 visitChildren(l);
652 m_indent--;
653 if (!m_firstCol) m_t << "\n";
654 m_t << ".PP\n";
655}
656
658{
659 if (m_hide) return;
660 QCString ws;
661 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
662 if (!m_firstCol) m_t << "\n";
663 m_t << ".IP \"" << ws;
664 const DocHtmlList *list = std::get_if<DocHtmlList>(li.parent());
665 if (list && list->type()==DocHtmlList::Ordered)
666 {
667 int indent = std::min(m_indent,maxIndentLevels-1);
668 for (const auto &opt : li.attribs())
669 {
670 if (opt.name=="value")
671 {
672 bool ok = false;
673 int val = opt.value.toInt(&ok);
674 if (ok) m_listItemInfo[indent].number = val;
675 }
676 }
677 switch (m_listItemInfo[indent].type)
678 {
679 case '1':
680 m_t << m_listItemInfo[indent].number;
681 break;
682 case 'a':
683 m_t << integerToAlpha(m_listItemInfo[indent].number,false);
684 break;
685 case 'A':
686 m_t << integerToAlpha(m_listItemInfo[indent].number);
687 break;
688 case 'i':
689 m_t << integerToRoman(m_listItemInfo[indent].number,false);
690 break;
691 case 'I':
692 m_t << integerToRoman(m_listItemInfo[indent].number);
693 break;
694 default:
695 m_t << m_listItemInfo[indent].number;
696 break;
697 }
698 m_t << ".\" " << ((m_indent+1)*2);
699 m_listItemInfo[indent].number++;
700 }
701 else // bullet list
702 {
703 m_t << "\\(bu\" " << (m_indent*2);
704 }
705 m_t << "\n";
707 visitChildren(li);
708 m_t << "\n";
710}
711
713{
714 if (m_hide) return;
715 m_indent+=2;
716 visitChildren(dl);
717 m_indent-=2;
718 if (!m_firstCol) m_t << "\n";
719 m_t << "\n.PP\n";
721}
722
724{
725 if (m_hide) return;
726 if (!m_firstCol) m_t << "\n";
727 m_t << "\n.PP";
728 m_t << "\n.IP \"\\fB";
730 visitChildren(dt);
731}
732
734{
735 if (!m_firstCol) m_t << "\n";
736 m_t << ".IP \"\" 1c\n";
738 visitChildren(dd);
739}
740
742{
743 visitChildren(t);
744}
745
750
752{
753 visitChildren(r);
754}
755
757{
758 visitChildren(c);
759}
760
762{
763 visitChildren(i);
764}
765
767{
768 if (m_hide) return;
769 m_t << "\\fR";
770 visitChildren(href);
771 m_t << "\\fP";
772}
773
775{
776 m_t << "\\fB";
777 visitChildren(s);
778 m_t << "\\fP\n.PP\n";
779}
780
782{
783 if (m_hide) return;
784 if (!m_firstCol)
785 {
786 m_t << "\n";
787 m_t << ".PP\n";
788 }
789 auto summary = d.summary();
790 if (summary)
791 {
792 std::visit(*this,*summary);
793 m_t << ".PP\n";
794 m_t << ".RS 4\n";
795 }
796 visitChildren(d);
797 if (!m_firstCol) m_t << "\n";
798 if (summary)
799 {
800 m_t << ".RE\n";
801 }
802 m_t << ".PP\n";
804}
805
807{
808 if (m_hide) return;
809 if (!m_firstCol) m_t << "\n";
810 if (header.level()==1) m_t << ".SH"; else m_t << ".SS";
811 m_t << " \"";
812 visitChildren(header);
813 m_t << "\"\n";
814 if (header.level()==1) m_t << ".PP\n";
816}
817
819{
820}
821
823{
824}
825
827{
828}
829
831{
832}
833
837
841
843{
844 if (m_hide) return;
845 m_t << "\\fB";
846 visitChildren(dl);
847 m_t << "\\fP";
848}
849
851{
852 if (m_hide) return;
853 m_t << "\\fB";
854 if (!ref.hasLinkText()) filter(ref.targetTitle());
855 visitChildren(ref);
856 m_t << "\\fP";
857}
858
860{
861 if (m_hide) return;
862 QCString ws;
863 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
864 if (!m_firstCol) m_t << "\n";
865 m_t << ".IP \"" << ws << "\\(bu\" " << (2*m_indent) << "\n";
867 visitChildren(ref);
868 m_t << "\n";
870}
871
873{
874 if (m_hide) return;
875 m_indent++;
876 visitChildren(l);
877 m_indent--;
878 if (!m_firstCol) m_t << "\n";
879 m_t << ".PP\n";
880}
881
883{
884 if (m_hide) return;
885 if (!m_firstCol)
886 {
887 m_t << "\n";
888 m_t << ".PP\n";
889 }
890 m_t << "\\fB";
891 switch(s.type())
892 {
894 m_t << theTranslator->trParameters(); break;
896 m_t << theTranslator->trReturnValues(); break;
898 m_t << theTranslator->trExceptions(); break;
900 m_t << theTranslator->trTemplateParameters(); break;
901 default:
902 ASSERT(0);
903 }
904 m_t << "\\fP\n";
905 m_t << ".RS 4\n";
906 visitChildren(s);
907 if (!m_firstCol) m_t << "\n";
908 m_t << ".RE\n";
909 m_t << ".PP\n";
911}
912
914{
915 if (m_hide) return;
916 m_t << "\\fI";
917 bool first=TRUE;
918 for (const auto &param : pl.parameters())
919 {
920 if (!first) m_t << ","; else first=FALSE;
921 std::visit(*this,param);
922 }
923 m_t << "\\fP ";
924 for (const auto &par : pl.paragraphs())
925 {
926 std::visit(*this,par);
927 }
928 if (!pl.isLast())
929 {
930 if (!m_firstCol) m_t << "\n";
931 m_t << ".br\n";
932 }
933}
934
936{
937 if (m_hide) return;
938 if (x.title().isEmpty()) return;
939 if (!m_firstCol)
940 {
941 m_t << "\n";
942 m_t << ".PP\n";
943 }
944 m_t << "\\fB";
945 filter(x.title());
946 m_t << "\\fP\n";
947 m_t << ".RS 4\n";
948 visitChildren(x);
949 if (x.title().isEmpty()) return;
950 if (!m_firstCol) m_t << "\n";
951 m_t << ".RE\n";
952 m_t << ".PP\n";
954}
955
957{
958 if (m_hide) return;
959 m_t << "\\fB";
960 visitChildren(ref);
961 m_t << "\\fP";
962}
963
965{
966 visitChildren(t);
967}
968
970{
971 if (m_hide) return;
972 if (!m_firstCol)
973 {
974 m_t << "\n";
975 m_t << ".PP\n";
976 }
977 m_t << ".RS 4\n"; // TODO: add support for nested block quotes
978 visitChildren(q);
979 if (!m_firstCol) m_t << "\n";
980 m_t << ".RE\n";
981 m_t << ".PP\n";
983}
984
988
990{
991 visitChildren(pb);
992}
993
994void ManDocVisitor::filter(const QCString &str, const bool retainNewline)
995{
996 if (!str.isEmpty())
997 {
998 const char *p=str.data();
999 char c=0;
1000 bool insideDoubleQuote = false;
1001 while ((c=*p++))
1002 {
1003 switch(c)
1004 {
1005 case '.': m_t << "\\&."; break; // see bug652277
1006 case '\\': m_t << "\\\\"; break;
1007 case '\"': m_t << "\""; insideDoubleQuote = !insideDoubleQuote; break;
1008 case '\n': if (retainNewline || !insideDoubleQuote) m_t << c; break;
1009 default: m_t << c; break;
1010 }
1011 }
1012 }
1013}
1014
void parseCodeFragment(OutputCodeList &codeOutList, const QCString &fileName, const QCString &blockId, const QCString &scopeName, bool showLineNumbers, bool trimLeft, bool stripCodeComments)
static CodeFragmentManager & instance()
virtual void parseCode(OutputCodeList &codeOutList, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, const CodeParserOptions &options)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
Node representing an anchor.
Definition docnode.h:229
Node representing an auto List.
Definition docnode.h:571
bool isEnumList() const
Definition docnode.h:580
Node representing an item of a auto list.
Definition docnode.h:595
int itemNumber() const
Definition docnode.h:598
Node representing a citation of some bibliographic reference.
Definition docnode.h:245
QCString getText() const
Definition docnode.cpp:974
CiteInfoOption option() const
Definition docnode.h:253
QCString target() const
Definition docnode.h:252
QCString file() const
Definition docnode.h:248
Node representing a dia file.
Definition docnode.h:731
Node representing a dot file.
Definition docnode.h:713
Node representing an emoji.
Definition docnode.h:341
int index() const
Definition docnode.h:345
QCString name() const
Definition docnode.h:344
Node representing an item of a cross-referenced list.
Definition docnode.h:529
QCString text() const
Definition docnode.h:533
Node representing a Hypertext reference.
Definition docnode.h:832
Node representing a horizontal ruler.
Definition docnode.h:216
Node representing an HTML blockquote.
Definition docnode.h:1297
Node representing a HTML table caption.
Definition docnode.h:1234
Node representing a HTML table cell.
Definition docnode.h:1199
Node representing a HTML description data.
Definition docnode.h:1187
Node representing a Html description list.
Definition docnode.h:910
Node representing a Html description item.
Definition docnode.h:897
Node Html details.
Definition docnode.h:866
const DocNodeVariant * summary() const
Definition docnode.h:873
Node Html heading.
Definition docnode.h:882
int level() const
Definition docnode.h:886
Node representing a Html list.
Definition docnode.h:1009
const HtmlAttribList & attribs() const
Definition docnode.h:1015
Type type() const
Definition docnode.h:1014
Node representing a HTML list item.
Definition docnode.h:1171
const HtmlAttribList & attribs() const
Definition docnode.h:1176
Node representing a HTML table row.
Definition docnode.h:1252
Node Html summary.
Definition docnode.h:853
Node representing a HTML table.
Definition docnode.h:1275
Node representing an image.
Definition docnode.h:642
Node representing a include/dontinclude operator block.
Definition docnode.h:477
bool stripCodeComments() const
Definition docnode.h:506
bool isLast() const
Definition docnode.h:503
QCString includeFileName() const
Definition docnode.h:509
QCString text() const
Definition docnode.h:499
QCString context() const
Definition docnode.h:501
QCString exampleFile() const
Definition docnode.h:508
Type type() const
Definition docnode.h:485
bool isFirst() const
Definition docnode.h:502
bool showLineNo() const
Definition docnode.h:498
bool isExample() const
Definition docnode.h:507
Node representing an included text block from file.
Definition docnode.h:435
QCString blockId() const
Definition docnode.h:454
QCString extension() const
Definition docnode.h:450
bool stripCodeComments() const
Definition docnode.h:455
@ LatexInclude
Definition docnode.h:437
@ SnippetWithLines
Definition docnode.h:438
@ DontIncWithLines
Definition docnode.h:439
@ IncWithLines
Definition docnode.h:438
@ HtmlInclude
Definition docnode.h:437
@ VerbInclude
Definition docnode.h:437
@ DontInclude
Definition docnode.h:437
@ DocbookInclude
Definition docnode.h:439
Type type() const
Definition docnode.h:451
QCString exampleFile() const
Definition docnode.h:457
QCString text() const
Definition docnode.h:452
QCString file() const
Definition docnode.h:449
bool trimLeft() const
Definition docnode.h:459
bool isExample() const
Definition docnode.h:456
QCString context() const
Definition docnode.h:453
Node representing an entry in the index.
Definition docnode.h:552
Node representing an internal section of documentation.
Definition docnode.h:978
Node representing an internal reference to some item.
Definition docnode.h:816
Node representing a line break.
Definition docnode.h:202
Node representing a word that can be linked to something.
Definition docnode.h:165
QCString word() const
Definition docnode.h:170
Node representing a mermaid file.
Definition docnode.h:749
Node representing a msc file.
Definition docnode.h:722
DocNodeVariant * parent()
Definition docnode.h:90
Node representing an block of paragraphs.
Definition docnode.h:988
Node representing a paragraph in the documentation tree.
Definition docnode.h:1089
bool isLast() const
Definition docnode.h:1097
Node representing a parameter list.
Definition docnode.h:1131
const DocNodeList & parameters() const
Definition docnode.h:1135
bool isLast() const
Definition docnode.h:1143
const DocNodeList & paragraphs() const
Definition docnode.h:1137
Node representing a parameter section.
Definition docnode.h:1062
Type type() const
Definition docnode.h:1077
Node representing a uml file.
Definition docnode.h:740
Node representing a reference to some item.
Definition docnode.h:787
QCString targetTitle() const
Definition docnode.h:795
bool hasLinkText() const
Definition docnode.h:797
Root node of documentation tree.
Definition docnode.h:1319
Node representing a reference to a section.
Definition docnode.h:944
Node representing a list of section references.
Definition docnode.h:968
Node representing a normal section.
Definition docnode.h:923
int level() const
Definition docnode.h:927
const DocNodeVariant * title() const
Definition docnode.h:928
Node representing a separator.
Definition docnode.h:365
QCString chars() const
Definition docnode.h:369
Node representing a simple list.
Definition docnode.h:999
Node representing a simple list item.
Definition docnode.h:1159
const DocNodeVariant * paragraph() const
Definition docnode.h:1163
Node representing a simple section.
Definition docnode.h:1026
Type type() const
Definition docnode.h:1035
const DocNodeVariant * title() const
Definition docnode.h:1042
Node representing a separator between two simple sections of the same type.
Definition docnode.h:1053
Node representing a style change.
Definition docnode.h:268
Style style() const
Definition docnode.h:307
bool enable() const
Definition docnode.h:309
Node representing a special symbol.
Definition docnode.h:328
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:332
Root node of a text fragment.
Definition docnode.h:1310
Node representing a simple section title.
Definition docnode.h:608
Node representing a URL (or email address).
Definition docnode.h:188
QCString url() const
Definition docnode.h:192
Node representing a verbatim, unparsed text fragment.
Definition docnode.h:376
QCString language() const
Definition docnode.h:388
bool isExample() const
Definition docnode.h:385
QCString context() const
Definition docnode.h:384
Type type() const
Definition docnode.h:382
QCString text() const
Definition docnode.h:383
QCString exampleFile() const
Definition docnode.h:386
@ JavaDocLiteral
Definition docnode.h:378
Node representing a VHDL flow chart.
Definition docnode.h:758
CodeParserInterface & getCodeParser(const QCString &langExt)
void pushHidden(bool hide)
bool popHidden()
Node representing some amount of white space.
Definition docnode.h:354
QCString chars() const
Definition docnode.h:358
Node representing a word.
Definition docnode.h:153
QCString word() const
Definition docnode.h:156
Node representing an item of a cross-referenced list.
Definition docnode.h:621
QCString title() const
Definition docnode.h:626
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:2026
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1978
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
std::string fileName() const
Definition fileinfo.cpp:118
std::string dirPath(bool absPath=true) const
Definition fileinfo.cpp:137
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const char * man(SymType symb) const
Access routine to the man code of the HTML entity.
std::array< ManListItemInfo, maxIndentLevels > m_listItemInfo
TextStream & m_t
void operator()(const DocWord &)
void filter(const QCString &str, const bool retainNewline=false)
OutputCodeList & m_ci
QCString m_langExt
static const int maxIndentLevels
void visitChildren(const T &t)
ManDocVisitor(TextStream &t, OutputCodeList &ci, const QCString &langExt)
Class representing a list of different code generators.
Definition outputlist.h:165
This is an alternative implementation of QCString.
Definition qcstring.h:101
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
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
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
Definition qcstring.h:193
const std::string & str() const
Definition qcstring.h:552
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
Text streaming class that buffers data.
Definition textstream.h:36
#define Config_getBool(name)
Definition config.h:33
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
Translator * theTranslator
Definition language.cpp:71
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
#define ASSERT(x)
Definition qcstring.h:39
Options to configure the code parser.
Definition parserintf.h:78
CodeParserOptions & setInlineFragment(bool enable)
Definition parserintf.h:107
CodeParserOptions & setShowLineNumbers(bool enable)
Definition parserintf.h:113
CodeParserOptions & setFileDef(const FileDef *fd)
Definition parserintf.h:98
SrcLangExt
Definition types.h:207
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5221
QCString integerToRoman(int n, bool upper)
Definition util.cpp:6728
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5239
QCString integerToAlpha(int n, bool upper)
Definition util.cpp:6712
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5263
A bunch of utility functions.