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
38
39 //--------------------------------------
40 // visitor functions for leaf nodes
41 //--------------------------------------
42
44{
45 if (m_hide) return;
46 filter(w.word());
48}
49
51{
52 if (m_hide) return;
53 m_t << "\\fB";
54 filter(w.word());
55 m_t << "\\fP";
57}
58
60{
61 if (m_hide) return;
62 if (m_insidePre)
63 {
64 m_t << w.chars();
65 m_firstCol=w.chars().at(w.chars().length()-1)=='\n';
66 }
67 else
68 {
69 m_t << " ";
71 }
72}
73
75{
76 if (m_hide) return;
77 const char *res = HtmlEntityMapper::instance().man(s.symbol());
78 if (res)
79 {
80 m_t << res;
81 }
82 else
83 {
84 // no error or warning to be supplied
85 // err("man: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
86 }
88}
89
91{
92 if (m_hide) return;
93 const char *res = EmojiEntityMapper::instance().name(s.index());
94 if (res)
95 {
96 m_t << res;
97 }
98 else
99 {
100 m_t << s.name();
101 }
103}
104
106{
107 if (m_hide) return;
108 m_t << u.url();
110}
111
113{
114 if (m_hide) return;
115 m_t << "\n.br\n";
117}
118
120{
121 if (m_hide) return;
122 if (!m_firstCol) m_t << "\n";
123 m_t << ".PP\n";
125}
126
128{
129 if (m_hide) return;
130 switch (s.style())
131 {
133 if (s.enable()) m_t << "\\fB"; else m_t << "\\fP";
135 break;
139 /* not supported */
140 break;
141 case DocStyleChange::Underline: //underline is shown as emphasis
143 if (s.enable()) m_t << "\\fI"; else m_t << "\\fP";
145 break;
147 if (s.enable()) m_t << "\\fI"; else m_t << "\\fP";
149 break;
152 if (s.enable()) m_t << "\\fR"; else m_t << "\\fP";
154 break;
156 if (s.enable()) m_t << "\\*<"; else m_t << "\\*> ";
158 break;
160 if (s.enable()) m_t << "\\*{"; else m_t << "\\*} ";
162 break;
164 /* not supported */
165 break;
167 /* not supported */
168 break;
170 /* not supported */
171 break;
173 if (s.enable())
174 {
175 if (!m_firstCol) m_t << "\n";
176 m_t << ".PP\n";
177 m_t << ".nf\n";
179 }
180 else
181 {
183 if (!m_firstCol) m_t << "\n";
184 m_t << ".fi\n";
185 m_t << ".PP\n";
187 }
188 break;
189 case DocStyleChange::Div: /* HTML only */ break;
190 case DocStyleChange::Span: /* HTML only */ break;
191 }
192}
193
195{
196 if (m_hide) return;
197 QCString lang = m_langExt;
198 if (!s.language().isEmpty()) // explicit language setting
199 {
200 lang = s.language();
201 }
202 SrcLangExt langExt = getLanguageFromCodeLang(lang);
203 switch (s.type())
204 {
206 if (!m_firstCol) m_t << "\n";
207 m_t << ".PP\n";
208 m_t << ".nf\n";
210 langExt,
211 Config_getBool(STRIP_CODE_COMMENTS),
212 s.isExample(),s.exampleFile());
213 if (!m_firstCol) m_t << "\n";
214 m_t << ".fi\n";
215 m_t << ".PP\n";
217 break;
219 filter(s.text());
220 break;
222 m_t << "\\fR\n";
223 filter(s.text());
224 m_t << "\\fP\n";
225 break;
227 if (!m_firstCol) m_t << "\n";
228 m_t << ".PP\n";
229 m_t << ".nf\n";
230 filter(s.text());
231 if (!m_firstCol) m_t << "\n";
232 m_t << ".fi\n";
233 m_t << ".PP\n";
235 break;
237 m_t << s.text();
238 break;
244 case DocVerbatim::Dot:
245 case DocVerbatim::Msc:
247 /* nothing */
248 break;
249 }
250}
251
253{
254 /* no support for anchors in man pages */
255}
256
258{
259 if (m_hide) return;
261 switch(inc.type())
262 {
264 {
265 if (!m_firstCol) m_t << "\n";
266 m_t << ".PP\n";
267 m_t << ".nf\n";
268 FileInfo cfi( inc.file().str() );
269 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
271 inc.text(),
272 langExt,
273 inc.stripCodeComments(),
274 inc.isExample(),
275 inc.exampleFile(),
276 fd.get(), // fileDef,
277 -1, // start line
278 -1, // end line
279 FALSE, // inline fragment
280 nullptr, // memberDef
281 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(),
296 inc.isExample(),
297 inc.exampleFile(),
298 nullptr, // fileDef
299 -1, // startLine
300 -1, // endLine
301 TRUE, // inlineFragment
302 nullptr, // memberDef
303 FALSE
304 );
305 m_t << ".fi\n";
306 m_t << ".PP\n";
308 break;
316 break;
318 m_t << inc.text();
319 break;
321 if (!m_firstCol) m_t << "\n";
322 m_t << ".PP\n";
323 m_t << ".nf\n";
324 m_t << inc.text();
325 if (!m_firstCol) m_t << "\n";
326 m_t << ".fi\n";
327 m_t << ".PP\n";
329 break;
332 if (!m_firstCol) m_t << "\n";
333 m_t << ".PP\n";
334 m_t << ".nf\n";
336 inc.file(),
337 inc.blockId(),
338 inc.context(),
340 inc.trimLeft(),
342 );
343 m_t << ".fi\n";
344 m_t << ".PP\n";
346 break;
347 }
348}
349
351{
352 QCString locLangExt = getFileNameExtension(op.includeFileName());
353 if (locLangExt.isEmpty()) locLangExt = m_langExt;
354 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
355 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
356 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
357 if (op.isFirst())
358 {
359 if (!m_hide)
360 {
361 if (!m_firstCol) m_t << "\n";
362 m_t << ".PP\n";
363 m_t << ".nf\n";
364 }
366 m_hide = TRUE;
367 }
368 if (op.type()!=DocIncOperator::Skip)
369 {
370 m_hide = popHidden();
371 if (!m_hide)
372 {
373 std::unique_ptr<FileDef> fd;
374 if (!op.includeFileName().isEmpty())
375 {
376 FileInfo cfi( op.includeFileName().str() );
377 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
378 }
379
380 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
382 op.isExample(),op.exampleFile(),
383 fd.get(), // fileDef
384 op.line(), // startLine
385 -1, // endLine
386 FALSE, // inline fragment
387 nullptr, // memberDef
388 op.showLineNo() // show line numbers
389 );
390 }
392 m_hide=TRUE;
393 }
394 if (op.isLast())
395 {
396 m_hide = popHidden();
397 if (!m_hide)
398 {
399 if (!m_firstCol) m_t << "\n";
400 m_t << ".fi\n";
401 m_t << ".PP\n";
403 }
404 }
405 else
406 {
407 if (!m_hide) m_t << "\n";
408 }
409}
410
412{
413 if (m_hide) return;
414 m_t << f.text();
415}
416
420
424
426{
427 if (m_hide) return;
428 m_t << "\\fB";
429 if (cite.file().isEmpty()) m_t << "[";
430 filter(cite.text());
431 if (cite.file().isEmpty()) m_t << "]";
432 m_t << "\\fP";
433}
434
436{
437 if (m_hide) return;
438 m_t << s.chars();
439}
440
441
442//--------------------------------------
443// visitor functions for compound nodes
444//--------------------------------------
445
447{
448 if (m_hide) return;
449 m_indent++;
450 visitChildren(l);
451 m_indent--;
452 m_t << ".PP\n";
453}
454
456{
457 if (m_hide) return;
458 QCString ws;
459 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
460 if (!m_firstCol) m_t << "\n";
461 m_t << ".IP \"" << ws;
462 const DocAutoList *list = std::get_if<DocAutoList>(li.parent());
463 if (list && list->isEnumList())
464 {
465 m_t << li.itemNumber() << ".\" " << (2*(m_indent+1));
466 }
467 else // bullet list
468 {
469 switch (li.itemNumber())
470 {
471 case DocAutoList::Unchecked: // unchecked
472 m_t << "[ ]\" " << (2*m_indent) + 2;
473 break;
474 case DocAutoList::Checked_x: // checked with x
475 m_t << "[x]\" " << (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 default:
481 m_t << "\\(bu\" " << (2*m_indent);
482 break;
483 }
484 }
485 m_t << "\n";
487 visitChildren(li);
488 m_t << "\n";
490}
491
493{
494 if (m_hide) return;
495 visitChildren(p);
496 if (!p.isLast() && // omit <p> for last paragraph
497 !(p.parent() && // and for parameter sections
498 std::get_if<DocParamSect>(p.parent())
499 )
500 )
501 {
502 if (!m_firstCol) m_t << "\n";
503 m_t << "\n.PP\n";
505 }
506}
507
509{
510 visitChildren(r);
511}
512
514{
515 if (m_hide) return;
516 if (!m_firstCol)
517 {
518 m_t << "\n";
519 m_t << ".PP\n";
520 }
521 m_t << "\\fB";
522 switch(s.type())
523 {
525 m_t << theTranslator->trSeeAlso(); break;
527 m_t << theTranslator->trReturns(); break;
529 m_t << theTranslator->trAuthor(TRUE,TRUE); break;
531 m_t << theTranslator->trAuthor(TRUE,FALSE); break;
533 m_t << theTranslator->trVersion(); break;
535 m_t << theTranslator->trSince(); break;
537 m_t << theTranslator->trDate(); break;
539 m_t << theTranslator->trNote(); break;
541 m_t << theTranslator->trWarning(); break;
543 m_t << theTranslator->trPrecondition(); break;
545 m_t << theTranslator->trPostcondition(); break;
547 m_t << theTranslator->trCopyright(); break;
549 m_t << theTranslator->trInvariant(); break;
551 m_t << theTranslator->trRemarks(); break;
553 m_t << theTranslator->trAttention(); break;
555 m_t << theTranslator->trImportant(); break;
556 case DocSimpleSect::User: break;
557 case DocSimpleSect::Rcs: break;
558 case DocSimpleSect::Unknown: break;
559 }
560
561 // special case 1: user defined title
562 if (s.title())
563 {
564 std::visit(*this,*s.title());
565 }
566 m_t << "\\fP\n";
567 m_t << ".RS 4\n";
568 visitChildren(s);
569 if (!m_firstCol) m_t << "\n";
570 m_t << ".RE\n";
571 m_t << ".PP\n";
573}
574
576{
577 if (m_hide) return;
578 visitChildren(t);
579}
580
582{
583 if (m_hide) return;
584 m_indent++;
585 if (!m_firstCol) m_t << "\n";
586 m_t << ".PD 0\n";
587 m_firstCol=true;
588 visitChildren(l);
589 m_indent--;
590 m_t << ".PP\n";
591}
592
594{
595 if (m_hide) return;
596 QCString ws;
597 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
598 if (!m_firstCol) m_t << "\n";
599 m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
601 if (li.paragraph())
602 {
603 visit(*this,*li.paragraph());
604 }
605 m_t << "\n";
607}
608
610{
611 if (m_hide) return;
612 if (!m_firstCol) m_t << "\n";
613 if (s.level()==1) m_t << ".SH"; else m_t << ".SS";
614 m_t << " \"";
615 if (s.title())
616 {
617 std::visit(*this,*s.title());
618 }
619 m_t << "\"\n";
620 if (s.level()==1) m_t << ".PP\n";
622 visitChildren(s);
623}
624
626{
627 if (m_hide) return;
628 m_indent++;
629 if (!m_firstCol) m_t << "\n";
630 m_t << ".PD 0\n";
631 m_firstCol=true;
632 int indent = std::min(m_indent,maxIndentLevels-1);
633 m_listItemInfo[indent].number = 1;
634 m_listItemInfo[indent].type = '1';
635 for (const auto &opt : l.attribs())
636 {
637 if (opt.name=="type")
638 {
639 m_listItemInfo[indent].type = opt.value[0];
640 }
641 if (opt.name=="start")
642 {
643 bool ok = false;
644 int val = opt.value.toInt(&ok);
645 if (ok) m_listItemInfo[indent].number = val;
646 }
647 }
648 visitChildren(l);
649 m_indent--;
650 if (!m_firstCol) m_t << "\n";
651 m_t << ".PP\n";
652}
653
655{
656 if (m_hide) return;
657 QCString ws;
658 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
659 if (!m_firstCol) m_t << "\n";
660 m_t << ".IP \"" << ws;
661 const DocHtmlList *list = std::get_if<DocHtmlList>(li.parent());
662 if (list && list->type()==DocHtmlList::Ordered)
663 {
664 int indent = std::min(m_indent,maxIndentLevels-1);
665 for (const auto &opt : li.attribs())
666 {
667 if (opt.name=="value")
668 {
669 bool ok = false;
670 int val = opt.value.toInt(&ok);
671 if (ok) m_listItemInfo[indent].number = val;
672 }
673 }
674 switch (m_listItemInfo[indent].type)
675 {
676 case '1':
677 m_t << m_listItemInfo[indent].number;
678 break;
679 case 'a':
680 m_t << integerToAlpha(m_listItemInfo[indent].number,false);
681 break;
682 case 'A':
683 m_t << integerToAlpha(m_listItemInfo[indent].number);
684 break;
685 case 'i':
686 m_t << integerToRoman(m_listItemInfo[indent].number,false);
687 break;
688 case 'I':
689 m_t << integerToRoman(m_listItemInfo[indent].number);
690 break;
691 default:
692 m_t << m_listItemInfo[indent].number;
693 break;
694 }
695 m_t << ".\" " << ((m_indent+1)*2);
696 m_listItemInfo[indent].number++;
697 }
698 else // bullet list
699 {
700 m_t << "\\(bu\" " << (m_indent*2);
701 }
702 m_t << "\n";
704 visitChildren(li);
705 m_t << "\n";
707}
708
710{
711 if (m_hide) return;
712 m_indent+=2;
713 visitChildren(dl);
714 m_indent-=2;
715 if (!m_firstCol) m_t << "\n";
716 m_t << "\n.PP\n";
718}
719
721{
722 if (m_hide) return;
723 if (!m_firstCol) m_t << "\n";
724 m_t << "\n.PP";
725 m_t << "\n.IP \"\\fB";
727 visitChildren(dt);
728}
729
731{
732 if (!m_firstCol) m_t << "\n";
733 m_t << ".IP \"\" 1c\n";
735 visitChildren(dd);
736}
737
739{
740 visitChildren(t);
741}
742
747
749{
750 visitChildren(r);
751}
752
754{
755 visitChildren(c);
756}
757
759{
760 visitChildren(i);
761}
762
764{
765 if (m_hide) return;
766 m_t << "\\fR";
767 visitChildren(href);
768 m_t << "\\fP";
769}
770
772{
773 m_t << "\\fB";
774 visitChildren(s);
775 m_t << "\\fP\n.PP\n";
776}
777
779{
780 if (m_hide) return;
781 if (!m_firstCol)
782 {
783 m_t << "\n";
784 m_t << ".PP\n";
785 }
786 auto summary = d.summary();
787 if (summary)
788 {
789 std::visit(*this,*summary);
790 m_t << ".PP\n";
791 m_t << ".RS 4\n";
792 }
793 visitChildren(d);
794 if (!m_firstCol) m_t << "\n";
795 if (summary)
796 {
797 m_t << ".RE\n";
798 }
799 m_t << ".PP\n";
801}
802
804{
805 if (m_hide) return;
806 if (!m_firstCol) m_t << "\n";
807 if (header.level()==1) m_t << ".SH"; else m_t << ".SS";
808 m_t << " \"";
809 visitChildren(header);
810 m_t << "\"\n";
811 if (header.level()==1) m_t << ".PP\n";
813}
814
816{
817}
818
820{
821}
822
824{
825}
826
828{
829}
830
834
836{
837 if (m_hide) return;
838 m_t << "\\fB";
839 visitChildren(dl);
840 m_t << "\\fP";
841}
842
844{
845 if (m_hide) return;
846 m_t << "\\fB";
847 if (!ref.hasLinkText()) filter(ref.targetTitle());
848 visitChildren(ref);
849 m_t << "\\fP";
850}
851
853{
854 if (m_hide) return;
855 QCString ws;
856 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
857 if (!m_firstCol) m_t << "\n";
858 m_t << ".IP \"" << ws << "\\(bu\" " << (2*m_indent) << "\n";
860 visitChildren(ref);
861 m_t << "\n";
863}
864
866{
867 if (m_hide) return;
868 m_indent++;
869 visitChildren(l);
870 m_indent--;
871 if (!m_firstCol) m_t << "\n";
872 m_t << ".PP\n";
873}
874
876{
877 if (m_hide) return;
878 if (!m_firstCol)
879 {
880 m_t << "\n";
881 m_t << ".PP\n";
882 }
883 m_t << "\\fB";
884 switch(s.type())
885 {
887 m_t << theTranslator->trParameters(); break;
889 m_t << theTranslator->trReturnValues(); break;
891 m_t << theTranslator->trExceptions(); break;
894 default:
895 ASSERT(0);
896 }
897 m_t << "\\fP\n";
898 m_t << ".RS 4\n";
899 visitChildren(s);
900 if (!m_firstCol) m_t << "\n";
901 m_t << ".RE\n";
902 m_t << ".PP\n";
904}
905
907{
908 if (m_hide) return;
909 m_t << "\\fI";
910 bool first=TRUE;
911 for (const auto &param : pl.parameters())
912 {
913 if (!first) m_t << ","; else first=FALSE;
914 std::visit(*this,param);
915 }
916 m_t << "\\fP ";
917 for (const auto &par : pl.paragraphs())
918 {
919 std::visit(*this,par);
920 }
921 if (!pl.isLast())
922 {
923 if (!m_firstCol) m_t << "\n";
924 m_t << ".br\n";
925 }
926}
927
929{
930 if (m_hide) return;
931 if (x.title().isEmpty()) return;
932 if (!m_firstCol)
933 {
934 m_t << "\n";
935 m_t << ".PP\n";
936 }
937 m_t << "\\fB";
938 filter(x.title());
939 m_t << "\\fP\n";
940 m_t << ".RS 4\n";
941 visitChildren(x);
942 if (x.title().isEmpty()) return;
943 if (!m_firstCol) m_t << "\n";
944 m_t << ".RE\n";
945 m_t << ".PP\n";
947}
948
950{
951 if (m_hide) return;
952 m_t << "\\fB";
953 visitChildren(ref);
954 m_t << "\\fP";
955}
956
958{
959 visitChildren(t);
960}
961
963{
964 if (m_hide) return;
965 if (!m_firstCol)
966 {
967 m_t << "\n";
968 m_t << ".PP\n";
969 }
970 m_t << ".RS 4\n"; // TODO: add support for nested block quotes
971 visitChildren(q);
972 if (!m_firstCol) m_t << "\n";
973 m_t << ".RE\n";
974 m_t << ".PP\n";
976}
977
981
983{
984 visitChildren(pb);
985}
986
988{
989 if (!str.isEmpty())
990 {
991 const char *p=str.data();
992 char c=0;
993 while ((c=*p++))
994 {
995 switch(c)
996 {
997 case '.': m_t << "\\&."; break; // see bug652277
998 case '\\': m_t << "\\\\"; break;
999 case '"': c = '\''; // fall through
1000 default: m_t << c; break;
1001 }
1002 }
1003 }
1004}
1005
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, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
Node representing an anchor.
Definition docnode.h:228
Node representing an auto List.
Definition docnode.h:552
bool isEnumList() const
Definition docnode.h:561
Node representing an item of a auto list.
Definition docnode.h:576
int itemNumber() const
Definition docnode.h:579
Node representing a citation of some bibliographic reference.
Definition docnode.h:244
QCString text() const
Definition docnode.h:251
QCString file() const
Definition docnode.h:247
Node representing a dia file.
Definition docnode.h:711
Node representing a dot file.
Definition docnode.h:693
Node representing an emoji.
Definition docnode.h:322
int index() const
Definition docnode.h:326
QCString name() const
Definition docnode.h:325
Node representing an item of a cross-referenced list.
Definition docnode.h:510
QCString text() const
Definition docnode.h:514
Node representing a Hypertext reference.
Definition docnode.h:803
Node representing a horizontal ruler.
Definition docnode.h:215
Node representing an HTML blockquote.
Definition docnode.h:1271
Node representing a HTML table caption.
Definition docnode.h:1208
Node representing a HTML table cell.
Definition docnode.h:1173
Node representing a HTML description data.
Definition docnode.h:1161
Node representing a Html description list.
Definition docnode.h:881
Node representing a Html description item.
Definition docnode.h:868
Node Html details.
Definition docnode.h:837
const DocNodeVariant * summary() const
Definition docnode.h:844
Node Html heading.
Definition docnode.h:853
int level() const
Definition docnode.h:857
Node representing a Html list.
Definition docnode.h:980
const HtmlAttribList & attribs() const
Definition docnode.h:986
Type type() const
Definition docnode.h:985
Node representing a HTML list item.
Definition docnode.h:1145
const HtmlAttribList & attribs() const
Definition docnode.h:1150
Node representing a HTML table row.
Definition docnode.h:1226
Node Html summary.
Definition docnode.h:824
Node representing a HTML table.
Definition docnode.h:1249
Node representing an image.
Definition docnode.h:622
Node representing a include/dontinclude operator block.
Definition docnode.h:458
bool stripCodeComments() const
Definition docnode.h:487
bool isLast() const
Definition docnode.h:484
QCString includeFileName() const
Definition docnode.h:490
QCString text() const
Definition docnode.h:480
QCString context() const
Definition docnode.h:482
QCString exampleFile() const
Definition docnode.h:489
int line() const
Definition docnode.h:478
Type type() const
Definition docnode.h:466
bool isFirst() const
Definition docnode.h:483
bool showLineNo() const
Definition docnode.h:479
bool isExample() const
Definition docnode.h:488
Node representing an included text block from file.
Definition docnode.h:416
QCString blockId() const
Definition docnode.h:435
QCString extension() const
Definition docnode.h:431
bool stripCodeComments() const
Definition docnode.h:436
@ LatexInclude
Definition docnode.h:418
@ SnippetWithLines
Definition docnode.h:419
@ DontIncWithLines
Definition docnode.h:420
@ IncWithLines
Definition docnode.h:419
@ HtmlInclude
Definition docnode.h:418
@ VerbInclude
Definition docnode.h:418
@ DontInclude
Definition docnode.h:418
@ DocbookInclude
Definition docnode.h:420
Type type() const
Definition docnode.h:432
QCString exampleFile() const
Definition docnode.h:438
QCString text() const
Definition docnode.h:433
QCString file() const
Definition docnode.h:430
bool trimLeft() const
Definition docnode.h:440
bool isExample() const
Definition docnode.h:437
QCString context() const
Definition docnode.h:434
Node representing an entry in the index.
Definition docnode.h:533
Node representing an internal section of documentation.
Definition docnode.h:949
Node representing an internal reference to some item.
Definition docnode.h:787
Node representing a line break.
Definition docnode.h:201
Node representing a word that can be linked to something.
Definition docnode.h:164
QCString word() const
Definition docnode.h:169
Node representing a msc file.
Definition docnode.h:702
DocNodeVariant * parent()
Definition docnode.h:89
Node representing an block of paragraphs.
Definition docnode.h:959
Node representing a paragraph in the documentation tree.
Definition docnode.h:1060
bool isLast() const
Definition docnode.h:1068
Node representing a parameter list.
Definition docnode.h:1105
const DocNodeList & parameters() const
Definition docnode.h:1109
bool isLast() const
Definition docnode.h:1117
const DocNodeList & paragraphs() const
Definition docnode.h:1111
Node representing a parameter section.
Definition docnode.h:1033
Type type() const
Definition docnode.h:1048
Node representing a uml file.
Definition docnode.h:720
Node representing a reference to some item.
Definition docnode.h:758
QCString targetTitle() const
Definition docnode.h:766
bool hasLinkText() const
Definition docnode.h:768
Root node of documentation tree.
Definition docnode.h:1293
Node representing a reference to a section.
Definition docnode.h:915
Node representing a list of section references.
Definition docnode.h:939
Node representing a normal section.
Definition docnode.h:894
int level() const
Definition docnode.h:898
const DocNodeVariant * title() const
Definition docnode.h:899
Node representing a separator.
Definition docnode.h:346
QCString chars() const
Definition docnode.h:350
Node representing a simple list.
Definition docnode.h:970
Node representing a simple list item.
Definition docnode.h:1133
const DocNodeVariant * paragraph() const
Definition docnode.h:1137
Node representing a simple section.
Definition docnode.h:997
Type type() const
Definition docnode.h:1006
const DocNodeVariant * title() const
Definition docnode.h:1013
Node representing a separator between two simple sections of the same type.
Definition docnode.h:1024
Node representing a style change.
Definition docnode.h:264
Style style() const
Definition docnode.h:292
bool enable() const
Definition docnode.h:294
Node representing a special symbol.
Definition docnode.h:309
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:313
Root node of a text fragment.
Definition docnode.h:1284
Node representing a simple section title.
Definition docnode.h:589
Node representing a URL (or email address)
Definition docnode.h:187
QCString url() const
Definition docnode.h:191
Node representing a verbatim, unparsed text fragment.
Definition docnode.h:357
QCString language() const
Definition docnode.h:369
bool isExample() const
Definition docnode.h:366
QCString context() const
Definition docnode.h:365
Type type() const
Definition docnode.h:363
QCString text() const
Definition docnode.h:364
QCString exampleFile() const
Definition docnode.h:367
@ JavaDocLiteral
Definition docnode.h:359
Node representing a VHDL flow chart.
Definition docnode.h:729
CodeParserInterface & getCodeParser(const QCString &langExt)
void pushHidden(bool hide)
bool popHidden()
Node representing some amount of white space.
Definition docnode.h:335
QCString chars() const
Definition docnode.h:339
Node representing a word.
Definition docnode.h:152
QCString word() const
Definition docnode.h:155
Node representing an item of a cross-referenced list.
Definition docnode.h:601
QCString title() const
Definition docnode.h:606
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
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
void filter(const QCString &str)
TextStream & m_t
void operator()(const DocWord &)
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:164
This is an alternative implementation of QCString.
Definition qcstring.h:101
void fill(char c, int len=-1)
Fills a string with a predefined character.
Definition qcstring.h:180
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
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
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
Text streaming class that buffers data.
Definition textstream.h:36
virtual QCString trPrecondition()=0
virtual QCString trSince()=0
virtual QCString trVersion()=0
virtual QCString trReturns()=0
virtual QCString trExceptions()=0
virtual QCString trRemarks()=0
virtual QCString trNote()=0
virtual QCString trPostcondition()=0
virtual QCString trAttention()=0
virtual QCString trCopyright()=0
virtual QCString trDate()=0
virtual QCString trParameters()=0
virtual QCString trTemplateParameters()=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
virtual QCString trWarning()=0
virtual QCString trSeeAlso()=0
virtual QCString trImportant()=0
virtual QCString trReturnValues()=0
virtual QCString trInvariant()=0
#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:265
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
SrcLangExt
Language as given by extension.
Definition types.h:42
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5549
QCString integerToRoman(int n, bool upper)
Definition util.cpp:7025
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5567
QCString integerToAlpha(int n, bool upper)
Definition util.cpp:7009
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5591
A bunch of utility functions.