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:
250 /* nothing */
251 break;
252 }
253}
254
256{
257 /* no support for anchors in man pages */
258}
259
261{
262 if (m_hide) return;
264 switch(inc.type())
265 {
267 {
268 if (!m_firstCol) m_t << "\n";
269 m_t << ".PP\n";
270 m_t << ".nf\n";
271 FileInfo cfi( inc.file().str() );
272 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
274 inc.text(),
275 langExt,
276 inc.stripCodeComments(),
278 .setExample(inc.isExample(),inc.exampleFile())
279 .setFileDef(fd.get())
280 .setInlineFragment(true)
281 );
282 m_t << ".fi\n";
283 m_t << ".PP\n";
285 }
286 break;
288 if (!m_firstCol) m_t << "\n";
289 m_t << ".PP\n";
290 m_t << ".nf\n";
292 inc.text(),
293 langExt,
294 inc.stripCodeComments(),
296 .setExample(inc.isExample(),inc.exampleFile())
297 .setInlineFragment(true)
298 .setShowLineNumbers(false)
299 );
300 m_t << ".fi\n";
301 m_t << ".PP\n";
303 break;
311 break;
313 m_t << inc.text();
314 break;
316 if (!m_firstCol) m_t << "\n";
317 m_t << ".PP\n";
318 m_t << ".nf\n";
319 m_t << inc.text();
320 if (!m_firstCol) m_t << "\n";
321 m_t << ".fi\n";
322 m_t << ".PP\n";
324 break;
327 if (!m_firstCol) m_t << "\n";
328 m_t << ".PP\n";
329 m_t << ".nf\n";
331 inc.file(),
332 inc.blockId(),
333 inc.context(),
335 inc.trimLeft(),
337 );
338 m_t << ".fi\n";
339 m_t << ".PP\n";
341 break;
342 }
343}
344
346{
348 if (locLangExt.isEmpty()) locLangExt = m_langExt;
349 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
350 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
351 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
352 if (op.isFirst())
353 {
354 if (!m_hide)
355 {
356 if (!m_firstCol) m_t << "\n";
357 m_t << ".PP\n";
358 m_t << ".nf\n";
359 }
361 m_hide = TRUE;
362 }
363 if (op.type()!=DocIncOperator::Skip)
364 {
365 m_hide = popHidden();
366 if (!m_hide)
367 {
368 std::unique_ptr<FileDef> fd;
369 if (!op.includeFileName().isEmpty())
370 {
371 FileInfo cfi( op.includeFileName().str() );
372 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
373 }
374
375 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
378 .setExample(op.isExample(),op.exampleFile())
379 .setFileDef(fd.get())
381 );
382 }
384 m_hide=TRUE;
385 }
386 if (op.isLast())
387 {
388 m_hide = popHidden();
389 if (!m_hide)
390 {
391 if (!m_firstCol) m_t << "\n";
392 m_t << ".fi\n";
393 m_t << ".PP\n";
395 }
396 }
397 else
398 {
399 if (!m_hide) m_t << "\n";
400 }
401}
402
404{
405 if (m_hide) return;
406 m_t << f.text();
407}
408
412
416
418{
419 if (m_hide) return;
420 m_t << "\\fB";
421 auto opt = cite.option();
422 QCString txt;
423 if (!cite.file().isEmpty())
424 {
425 txt = cite.getText();
426 }
427 else
428 {
429 if (!opt.noPar()) txt += "[";
430 txt += cite.target();
431 if (!opt.noPar()) txt += "]";
432 }
433 filter(txt);
434 m_t << "\\fP";
435}
436
438{
439 if (m_hide) return;
440 m_t << s.chars();
441}
442
443
444//--------------------------------------
445// visitor functions for compound nodes
446//--------------------------------------
447
449{
450 if (m_hide) return;
451 m_indent++;
452 visitChildren(l);
453 m_indent--;
454 m_t << ".PP\n";
455}
456
458{
459 if (m_hide) return;
460 QCString ws;
461 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
462 if (!m_firstCol) m_t << "\n";
463 m_t << ".IP \"" << ws;
464 const DocAutoList *list = std::get_if<DocAutoList>(li.parent());
465 if (list && list->isEnumList())
466 {
467 m_t << li.itemNumber() << ".\" " << (2*(m_indent+1));
468 }
469 else // bullet list
470 {
471 switch (li.itemNumber())
472 {
473 case DocAutoList::Unchecked: // unchecked
474 m_t << "[ ]\" " << (2*m_indent) + 2;
475 break;
476 case DocAutoList::Checked_x: // checked with x
477 m_t << "[x]\" " << (2*m_indent) + 2;
478 break;
479 case DocAutoList::Checked_X: // checked with X
480 m_t << "[X]\" " << (2*m_indent) + 2;
481 break;
482 default:
483 m_t << "\\(bu\" " << (2*m_indent);
484 break;
485 }
486 }
487 m_t << "\n";
489 visitChildren(li);
490 m_t << "\n";
492}
493
495{
496 if (m_hide) return;
497 visitChildren(p);
498 if (!p.isLast() && // omit <p> for last paragraph
499 !(p.parent() && // and for parameter sections
500 std::get_if<DocParamSect>(p.parent())
501 )
502 )
503 {
504 if (!m_firstCol) m_t << "\n";
505 m_t << "\n.PP\n";
507 }
508}
509
511{
512 visitChildren(r);
513}
514
516{
517 if (m_hide) return;
518 if (!m_firstCol)
519 {
520 m_t << "\n";
521 m_t << ".PP\n";
522 }
523 m_t << "\\fB";
524 switch(s.type())
525 {
527 m_t << theTranslator->trSeeAlso(); break;
529 m_t << theTranslator->trReturns(); break;
531 m_t << theTranslator->trAuthor(TRUE,TRUE); break;
533 m_t << theTranslator->trAuthor(TRUE,FALSE); break;
535 m_t << theTranslator->trVersion(); break;
537 m_t << theTranslator->trSince(); break;
539 m_t << theTranslator->trDate(); break;
541 m_t << theTranslator->trNote(); break;
543 m_t << theTranslator->trWarning(); break;
545 m_t << theTranslator->trPrecondition(); break;
547 m_t << theTranslator->trPostcondition(); break;
549 m_t << theTranslator->trCopyright(); break;
551 m_t << theTranslator->trInvariant(); break;
553 m_t << theTranslator->trRemarks(); break;
555 m_t << theTranslator->trAttention(); break;
557 m_t << theTranslator->trImportant(); break;
558 case DocSimpleSect::User: break;
559 case DocSimpleSect::Rcs: break;
560 case DocSimpleSect::Unknown: break;
561 }
562
563 // special case 1: user defined title
564 if (s.title())
565 {
566 std::visit(*this,*s.title());
567 }
568 m_t << "\\fP\n";
569 m_t << ".RS 4\n";
570 visitChildren(s);
571 if (!m_firstCol) m_t << "\n";
572 m_t << ".RE\n";
573 m_t << ".PP\n";
575}
576
578{
579 if (m_hide) return;
580 visitChildren(t);
581}
582
584{
585 if (m_hide) return;
586 m_indent++;
587 if (!m_firstCol) m_t << "\n";
588 m_t << ".PD 0\n";
589 m_firstCol=true;
590 visitChildren(l);
591 m_indent--;
592 m_t << ".PP\n";
593}
594
596{
597 if (m_hide) return;
598 QCString ws;
599 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
600 if (!m_firstCol) m_t << "\n";
601 m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
603 if (li.paragraph())
604 {
605 visit(*this,*li.paragraph());
606 }
607 m_t << "\n";
609}
610
612{
613 if (m_hide) return;
614 if (!m_firstCol) m_t << "\n";
615 if (s.level()==1) m_t << ".SH"; else m_t << ".SS";
616 m_t << " \"";
617 if (s.title())
618 {
619 std::visit(*this,*s.title());
620 }
621 m_t << "\"\n";
622 if (s.level()==1) m_t << ".PP\n";
624 visitChildren(s);
625}
626
628{
629 if (m_hide) return;
630 m_indent++;
631 if (!m_firstCol) m_t << "\n";
632 m_t << ".PD 0\n";
633 m_firstCol=true;
634 int indent = std::min(m_indent,maxIndentLevels-1);
635 m_listItemInfo[indent].number = 1;
636 m_listItemInfo[indent].type = '1';
637 for (const auto &opt : l.attribs())
638 {
639 if (opt.name=="type")
640 {
641 m_listItemInfo[indent].type = opt.value[0];
642 }
643 if (opt.name=="start")
644 {
645 bool ok = false;
646 int val = opt.value.toInt(&ok);
647 if (ok) m_listItemInfo[indent].number = val;
648 }
649 }
650 visitChildren(l);
651 m_indent--;
652 if (!m_firstCol) m_t << "\n";
653 m_t << ".PP\n";
654}
655
657{
658 if (m_hide) return;
659 QCString ws;
660 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
661 if (!m_firstCol) m_t << "\n";
662 m_t << ".IP \"" << ws;
663 const DocHtmlList *list = std::get_if<DocHtmlList>(li.parent());
664 if (list && list->type()==DocHtmlList::Ordered)
665 {
666 int indent = std::min(m_indent,maxIndentLevels-1);
667 for (const auto &opt : li.attribs())
668 {
669 if (opt.name=="value")
670 {
671 bool ok = false;
672 int val = opt.value.toInt(&ok);
673 if (ok) m_listItemInfo[indent].number = val;
674 }
675 }
676 switch (m_listItemInfo[indent].type)
677 {
678 case '1':
679 m_t << m_listItemInfo[indent].number;
680 break;
681 case 'a':
682 m_t << integerToAlpha(m_listItemInfo[indent].number,false);
683 break;
684 case 'A':
685 m_t << integerToAlpha(m_listItemInfo[indent].number);
686 break;
687 case 'i':
688 m_t << integerToRoman(m_listItemInfo[indent].number,false);
689 break;
690 case 'I':
691 m_t << integerToRoman(m_listItemInfo[indent].number);
692 break;
693 default:
694 m_t << m_listItemInfo[indent].number;
695 break;
696 }
697 m_t << ".\" " << ((m_indent+1)*2);
698 m_listItemInfo[indent].number++;
699 }
700 else // bullet list
701 {
702 m_t << "\\(bu\" " << (m_indent*2);
703 }
704 m_t << "\n";
706 visitChildren(li);
707 m_t << "\n";
709}
710
712{
713 if (m_hide) return;
714 m_indent+=2;
715 visitChildren(dl);
716 m_indent-=2;
717 if (!m_firstCol) m_t << "\n";
718 m_t << "\n.PP\n";
720}
721
723{
724 if (m_hide) return;
725 if (!m_firstCol) m_t << "\n";
726 m_t << "\n.PP";
727 m_t << "\n.IP \"\\fB";
729 visitChildren(dt);
730}
731
733{
734 if (!m_firstCol) m_t << "\n";
735 m_t << ".IP \"\" 1c\n";
737 visitChildren(dd);
738}
739
741{
742 visitChildren(t);
743}
744
749
751{
752 visitChildren(r);
753}
754
756{
757 visitChildren(c);
758}
759
761{
762 visitChildren(i);
763}
764
766{
767 if (m_hide) return;
768 m_t << "\\fR";
769 visitChildren(href);
770 m_t << "\\fP";
771}
772
774{
775 m_t << "\\fB";
776 visitChildren(s);
777 m_t << "\\fP\n.PP\n";
778}
779
781{
782 if (m_hide) return;
783 if (!m_firstCol)
784 {
785 m_t << "\n";
786 m_t << ".PP\n";
787 }
788 auto summary = d.summary();
789 if (summary)
790 {
791 std::visit(*this,*summary);
792 m_t << ".PP\n";
793 m_t << ".RS 4\n";
794 }
795 visitChildren(d);
796 if (!m_firstCol) m_t << "\n";
797 if (summary)
798 {
799 m_t << ".RE\n";
800 }
801 m_t << ".PP\n";
803}
804
806{
807 if (m_hide) return;
808 if (!m_firstCol) m_t << "\n";
809 if (header.level()==1) m_t << ".SH"; else m_t << ".SS";
810 m_t << " \"";
811 visitChildren(header);
812 m_t << "\"\n";
813 if (header.level()==1) m_t << ".PP\n";
815}
816
818{
819}
820
822{
823}
824
826{
827}
828
830{
831}
832
836
838{
839 if (m_hide) return;
840 m_t << "\\fB";
841 visitChildren(dl);
842 m_t << "\\fP";
843}
844
846{
847 if (m_hide) return;
848 m_t << "\\fB";
849 if (!ref.hasLinkText()) filter(ref.targetTitle());
850 visitChildren(ref);
851 m_t << "\\fP";
852}
853
855{
856 if (m_hide) return;
857 QCString ws;
858 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
859 if (!m_firstCol) m_t << "\n";
860 m_t << ".IP \"" << ws << "\\(bu\" " << (2*m_indent) << "\n";
862 visitChildren(ref);
863 m_t << "\n";
865}
866
868{
869 if (m_hide) return;
870 m_indent++;
871 visitChildren(l);
872 m_indent--;
873 if (!m_firstCol) m_t << "\n";
874 m_t << ".PP\n";
875}
876
878{
879 if (m_hide) return;
880 if (!m_firstCol)
881 {
882 m_t << "\n";
883 m_t << ".PP\n";
884 }
885 m_t << "\\fB";
886 switch(s.type())
887 {
889 m_t << theTranslator->trParameters(); break;
891 m_t << theTranslator->trReturnValues(); break;
893 m_t << theTranslator->trExceptions(); break;
895 m_t << theTranslator->trTemplateParameters(); break;
896 default:
897 ASSERT(0);
898 }
899 m_t << "\\fP\n";
900 m_t << ".RS 4\n";
901 visitChildren(s);
902 if (!m_firstCol) m_t << "\n";
903 m_t << ".RE\n";
904 m_t << ".PP\n";
906}
907
909{
910 if (m_hide) return;
911 m_t << "\\fI";
912 bool first=TRUE;
913 for (const auto &param : pl.parameters())
914 {
915 if (!first) m_t << ","; else first=FALSE;
916 std::visit(*this,param);
917 }
918 m_t << "\\fP ";
919 for (const auto &par : pl.paragraphs())
920 {
921 std::visit(*this,par);
922 }
923 if (!pl.isLast())
924 {
925 if (!m_firstCol) m_t << "\n";
926 m_t << ".br\n";
927 }
928}
929
931{
932 if (m_hide) return;
933 if (x.title().isEmpty()) return;
934 if (!m_firstCol)
935 {
936 m_t << "\n";
937 m_t << ".PP\n";
938 }
939 m_t << "\\fB";
940 filter(x.title());
941 m_t << "\\fP\n";
942 m_t << ".RS 4\n";
943 visitChildren(x);
944 if (x.title().isEmpty()) return;
945 if (!m_firstCol) m_t << "\n";
946 m_t << ".RE\n";
947 m_t << ".PP\n";
949}
950
952{
953 if (m_hide) return;
954 m_t << "\\fB";
955 visitChildren(ref);
956 m_t << "\\fP";
957}
958
960{
961 visitChildren(t);
962}
963
965{
966 if (m_hide) return;
967 if (!m_firstCol)
968 {
969 m_t << "\n";
970 m_t << ".PP\n";
971 }
972 m_t << ".RS 4\n"; // TODO: add support for nested block quotes
973 visitChildren(q);
974 if (!m_firstCol) m_t << "\n";
975 m_t << ".RE\n";
976 m_t << ".PP\n";
978}
979
983
985{
986 visitChildren(pb);
987}
988
989void ManDocVisitor::filter(const QCString &str, const bool retainNewline)
990{
991 if (!str.isEmpty())
992 {
993 const char *p=str.data();
994 char c=0;
995 bool insideDoubleQuote = false;
996 while ((c=*p++))
997 {
998 switch(c)
999 {
1000 case '.': m_t << "\\&."; break; // see bug652277
1001 case '\\': m_t << "\\\\"; break;
1002 case '\"': m_t << "\""; insideDoubleQuote = !insideDoubleQuote; break;
1003 case '\n': if (retainNewline || !insideDoubleQuote) m_t << c; break;
1004 default: m_t << c; break;
1005 }
1006 }
1007 }
1008}
1009
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:959
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:823
Node representing a horizontal ruler.
Definition docnode.h:216
Node representing an HTML blockquote.
Definition docnode.h:1291
Node representing a HTML table caption.
Definition docnode.h:1228
Node representing a HTML table cell.
Definition docnode.h:1193
Node representing a HTML description data.
Definition docnode.h:1181
Node representing a Html description list.
Definition docnode.h:901
Node representing a Html description item.
Definition docnode.h:888
Node Html details.
Definition docnode.h:857
const DocNodeVariant * summary() const
Definition docnode.h:864
Node Html heading.
Definition docnode.h:873
int level() const
Definition docnode.h:877
Node representing a Html list.
Definition docnode.h:1000
const HtmlAttribList & attribs() const
Definition docnode.h:1006
Type type() const
Definition docnode.h:1005
Node representing a HTML list item.
Definition docnode.h:1165
const HtmlAttribList & attribs() const
Definition docnode.h:1170
Node representing a HTML table row.
Definition docnode.h:1246
Node Html summary.
Definition docnode.h:844
Node representing a HTML table.
Definition docnode.h:1269
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:969
Node representing an internal reference to some item.
Definition docnode.h:807
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 msc file.
Definition docnode.h:722
DocNodeVariant * parent()
Definition docnode.h:90
Node representing an block of paragraphs.
Definition docnode.h:979
Node representing a paragraph in the documentation tree.
Definition docnode.h:1080
bool isLast() const
Definition docnode.h:1088
Node representing a parameter list.
Definition docnode.h:1125
const DocNodeList & parameters() const
Definition docnode.h:1129
bool isLast() const
Definition docnode.h:1137
const DocNodeList & paragraphs() const
Definition docnode.h:1131
Node representing a parameter section.
Definition docnode.h:1053
Type type() const
Definition docnode.h:1068
Node representing a uml file.
Definition docnode.h:740
Node representing a reference to some item.
Definition docnode.h:778
QCString targetTitle() const
Definition docnode.h:786
bool hasLinkText() const
Definition docnode.h:788
Root node of documentation tree.
Definition docnode.h:1313
Node representing a reference to a section.
Definition docnode.h:935
Node representing a list of section references.
Definition docnode.h:959
Node representing a normal section.
Definition docnode.h:914
int level() const
Definition docnode.h:918
const DocNodeVariant * title() const
Definition docnode.h:919
Node representing a separator.
Definition docnode.h:365
QCString chars() const
Definition docnode.h:369
Node representing a simple list.
Definition docnode.h:990
Node representing a simple list item.
Definition docnode.h:1153
const DocNodeVariant * paragraph() const
Definition docnode.h:1157
Node representing a simple section.
Definition docnode.h:1017
Type type() const
Definition docnode.h:1026
const DocNodeVariant * title() const
Definition docnode.h:1033
Node representing a separator between two simple sections of the same type.
Definition docnode.h:1044
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:1304
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:749
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:5147
QCString integerToRoman(int n, bool upper)
Definition util.cpp:6648
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5165
QCString integerToAlpha(int n, bool upper)
Definition util.cpp:6632
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5189
A bunch of utility functions.