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: &{};\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;
153 if (s.enable()) m_t << "\\fR"; else m_t << "\\fP";
155 break;
157 if (s.enable()) m_t << "\\*<"; else m_t << "\\*> ";
159 break;
161 if (s.enable()) m_t << "\\*{"; else m_t << "\\*} ";
163 break;
165 /* not supported */
166 break;
168 /* not supported */
169 break;
171 /* not supported */
172 break;
174 if (s.enable())
175 {
176 if (!m_firstCol) m_t << "\n";
177 m_t << ".PP\n";
178 m_t << ".nf\n";
180 }
181 else
182 {
184 if (!m_firstCol) m_t << "\n";
185 m_t << ".fi\n";
186 m_t << ".PP\n";
188 }
189 break;
190 case DocStyleChange::Div: /* HTML only */ break;
191 case DocStyleChange::Span: /* HTML only */ break;
192 }
193}
194
196{
197 if (m_hide) return;
198 QCString lang = m_langExt;
199 if (!s.language().isEmpty()) // explicit language setting
200 {
201 lang = s.language();
202 }
203 SrcLangExt langExt = getLanguageFromCodeLang(lang);
204 switch (s.type())
205 {
207 if (!m_firstCol) m_t << "\n";
208 m_t << ".PP\n";
209 m_t << ".nf\n";
211 langExt,
212 Config_getBool(STRIP_CODE_COMMENTS),
213 s.isExample(),s.exampleFile());
214 if (!m_firstCol) m_t << "\n";
215 m_t << ".fi\n";
216 m_t << ".PP\n";
218 break;
220 filter(s.text(),true);
221 break;
223 m_t << "\\fR\n";
224 filter(s.text(),true);
225 m_t << "\\fP\n";
226 break;
228 if (!m_firstCol) m_t << "\n";
229 m_t << ".PP\n";
230 m_t << ".nf\n";
231 filter(s.text(),true);
232 if (!m_firstCol) m_t << "\n";
233 m_t << ".fi\n";
234 m_t << ".PP\n";
236 break;
238 m_t << s.text();
239 break;
245 case DocVerbatim::Dot:
246 case DocVerbatim::Msc:
248 /* nothing */
249 break;
250 }
251}
252
254{
255 /* no support for anchors in man pages */
256}
257
259{
260 if (m_hide) return;
262 switch(inc.type())
263 {
265 {
266 if (!m_firstCol) m_t << "\n";
267 m_t << ".PP\n";
268 m_t << ".nf\n";
269 FileInfo cfi( inc.file().str() );
270 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
272 inc.text(),
273 langExt,
274 inc.stripCodeComments(),
275 inc.isExample(),
276 inc.exampleFile(),
277 fd.get(), // fileDef,
278 -1, // start line
279 -1, // end line
280 FALSE, // inline fragment
281 nullptr, // memberDef
282 TRUE
283 );
284 m_t << ".fi\n";
285 m_t << ".PP\n";
287 }
288 break;
290 if (!m_firstCol) m_t << "\n";
291 m_t << ".PP\n";
292 m_t << ".nf\n";
294 inc.text(),
295 langExt,
296 inc.stripCodeComments(),
297 inc.isExample(),
298 inc.exampleFile(),
299 nullptr, // fileDef
300 -1, // startLine
301 -1, // endLine
302 TRUE, // inlineFragment
303 nullptr, // memberDef
304 FALSE
305 );
306 m_t << ".fi\n";
307 m_t << ".PP\n";
309 break;
317 break;
319 m_t << inc.text();
320 break;
322 if (!m_firstCol) m_t << "\n";
323 m_t << ".PP\n";
324 m_t << ".nf\n";
325 m_t << inc.text();
326 if (!m_firstCol) m_t << "\n";
327 m_t << ".fi\n";
328 m_t << ".PP\n";
330 break;
333 if (!m_firstCol) m_t << "\n";
334 m_t << ".PP\n";
335 m_t << ".nf\n";
337 inc.file(),
338 inc.blockId(),
339 inc.context(),
341 inc.trimLeft(),
343 );
344 m_t << ".fi\n";
345 m_t << ".PP\n";
347 break;
348 }
349}
350
352{
354 if (locLangExt.isEmpty()) locLangExt = m_langExt;
355 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
356 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
357 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
358 if (op.isFirst())
359 {
360 if (!m_hide)
361 {
362 if (!m_firstCol) m_t << "\n";
363 m_t << ".PP\n";
364 m_t << ".nf\n";
365 }
367 m_hide = TRUE;
368 }
369 if (op.type()!=DocIncOperator::Skip)
370 {
371 m_hide = popHidden();
372 if (!m_hide)
373 {
374 std::unique_ptr<FileDef> fd;
375 if (!op.includeFileName().isEmpty())
376 {
377 FileInfo cfi( op.includeFileName().str() );
378 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
379 }
380
381 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
383 op.isExample(),op.exampleFile(),
384 fd.get(), // fileDef
385 op.line(), // startLine
386 -1, // endLine
387 FALSE, // inline fragment
388 nullptr, // memberDef
389 op.showLineNo() // show line numbers
390 );
391 }
393 m_hide=TRUE;
394 }
395 if (op.isLast())
396 {
397 m_hide = popHidden();
398 if (!m_hide)
399 {
400 if (!m_firstCol) m_t << "\n";
401 m_t << ".fi\n";
402 m_t << ".PP\n";
404 }
405 }
406 else
407 {
408 if (!m_hide) m_t << "\n";
409 }
410}
411
413{
414 if (m_hide) return;
415 m_t << f.text();
416}
417
421
425
427{
428 if (m_hide) return;
429 m_t << "\\fB";
430 if (cite.file().isEmpty()) m_t << "[";
431 filter(cite.text());
432 if (cite.file().isEmpty()) m_t << "]";
433 m_t << "\\fP";
434}
435
437{
438 if (m_hide) return;
439 m_t << s.chars();
440}
441
442
443//--------------------------------------
444// visitor functions for compound nodes
445//--------------------------------------
446
448{
449 if (m_hide) return;
450 m_indent++;
451 visitChildren(l);
452 m_indent--;
453 m_t << ".PP\n";
454}
455
457{
458 if (m_hide) return;
459 QCString ws;
460 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
461 if (!m_firstCol) m_t << "\n";
462 m_t << ".IP \"" << ws;
463 const DocAutoList *list = std::get_if<DocAutoList>(li.parent());
464 if (list && list->isEnumList())
465 {
466 m_t << li.itemNumber() << ".\" " << (2*(m_indent+1));
467 }
468 else // bullet list
469 {
470 switch (li.itemNumber())
471 {
472 case DocAutoList::Unchecked: // unchecked
473 m_t << "[ ]\" " << (2*m_indent) + 2;
474 break;
475 case DocAutoList::Checked_x: // checked with x
476 m_t << "[x]\" " << (2*m_indent) + 2;
477 break;
478 case DocAutoList::Checked_X: // checked with X
479 m_t << "[X]\" " << (2*m_indent) + 2;
480 break;
481 default:
482 m_t << "\\(bu\" " << (2*m_indent);
483 break;
484 }
485 }
486 m_t << "\n";
488 visitChildren(li);
489 m_t << "\n";
491}
492
494{
495 if (m_hide) return;
496 visitChildren(p);
497 if (!p.isLast() && // omit <p> for last paragraph
498 !(p.parent() && // and for parameter sections
499 std::get_if<DocParamSect>(p.parent())
500 )
501 )
502 {
503 if (!m_firstCol) m_t << "\n";
504 m_t << "\n.PP\n";
506 }
507}
508
510{
511 visitChildren(r);
512}
513
515{
516 if (m_hide) return;
517 if (!m_firstCol)
518 {
519 m_t << "\n";
520 m_t << ".PP\n";
521 }
522 m_t << "\\fB";
523 switch(s.type())
524 {
526 m_t << theTranslator->trSeeAlso(); break;
528 m_t << theTranslator->trReturns(); break;
530 m_t << theTranslator->trAuthor(TRUE,TRUE); break;
532 m_t << theTranslator->trAuthor(TRUE,FALSE); break;
534 m_t << theTranslator->trVersion(); break;
536 m_t << theTranslator->trSince(); break;
538 m_t << theTranslator->trDate(); break;
540 m_t << theTranslator->trNote(); break;
542 m_t << theTranslator->trWarning(); break;
544 m_t << theTranslator->trPrecondition(); break;
546 m_t << theTranslator->trPostcondition(); break;
548 m_t << theTranslator->trCopyright(); break;
550 m_t << theTranslator->trInvariant(); break;
552 m_t << theTranslator->trRemarks(); break;
554 m_t << theTranslator->trAttention(); break;
556 m_t << theTranslator->trImportant(); break;
557 case DocSimpleSect::User: break;
558 case DocSimpleSect::Rcs: break;
559 case DocSimpleSect::Unknown: break;
560 }
561
562 // special case 1: user defined title
563 if (s.title())
564 {
565 std::visit(*this,*s.title());
566 }
567 m_t << "\\fP\n";
568 m_t << ".RS 4\n";
569 visitChildren(s);
570 if (!m_firstCol) m_t << "\n";
571 m_t << ".RE\n";
572 m_t << ".PP\n";
574}
575
577{
578 if (m_hide) return;
579 visitChildren(t);
580}
581
583{
584 if (m_hide) return;
585 m_indent++;
586 if (!m_firstCol) m_t << "\n";
587 m_t << ".PD 0\n";
588 m_firstCol=true;
589 visitChildren(l);
590 m_indent--;
591 m_t << ".PP\n";
592}
593
595{
596 if (m_hide) return;
597 QCString ws;
598 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
599 if (!m_firstCol) m_t << "\n";
600 m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
602 if (li.paragraph())
603 {
604 visit(*this,*li.paragraph());
605 }
606 m_t << "\n";
608}
609
611{
612 if (m_hide) return;
613 if (!m_firstCol) m_t << "\n";
614 if (s.level()==1) m_t << ".SH"; else m_t << ".SS";
615 m_t << " \"";
616 if (s.title())
617 {
618 std::visit(*this,*s.title());
619 }
620 m_t << "\"\n";
621 if (s.level()==1) m_t << ".PP\n";
623 visitChildren(s);
624}
625
627{
628 if (m_hide) return;
629 m_indent++;
630 if (!m_firstCol) m_t << "\n";
631 m_t << ".PD 0\n";
632 m_firstCol=true;
633 int indent = std::min(m_indent,maxIndentLevels-1);
634 m_listItemInfo[indent].number = 1;
635 m_listItemInfo[indent].type = '1';
636 for (const auto &opt : l.attribs())
637 {
638 if (opt.name=="type")
639 {
640 m_listItemInfo[indent].type = opt.value[0];
641 }
642 if (opt.name=="start")
643 {
644 bool ok = false;
645 int val = opt.value.toInt(&ok);
646 if (ok) m_listItemInfo[indent].number = val;
647 }
648 }
649 visitChildren(l);
650 m_indent--;
651 if (!m_firstCol) m_t << "\n";
652 m_t << ".PP\n";
653}
654
656{
657 if (m_hide) return;
658 QCString ws;
659 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
660 if (!m_firstCol) m_t << "\n";
661 m_t << ".IP \"" << ws;
662 const DocHtmlList *list = std::get_if<DocHtmlList>(li.parent());
663 if (list && list->type()==DocHtmlList::Ordered)
664 {
665 int indent = std::min(m_indent,maxIndentLevels-1);
666 for (const auto &opt : li.attribs())
667 {
668 if (opt.name=="value")
669 {
670 bool ok = false;
671 int val = opt.value.toInt(&ok);
672 if (ok) m_listItemInfo[indent].number = val;
673 }
674 }
675 switch (m_listItemInfo[indent].type)
676 {
677 case '1':
678 m_t << m_listItemInfo[indent].number;
679 break;
680 case 'a':
681 m_t << integerToAlpha(m_listItemInfo[indent].number,false);
682 break;
683 case 'A':
684 m_t << integerToAlpha(m_listItemInfo[indent].number);
685 break;
686 case 'i':
687 m_t << integerToRoman(m_listItemInfo[indent].number,false);
688 break;
689 case 'I':
690 m_t << integerToRoman(m_listItemInfo[indent].number);
691 break;
692 default:
693 m_t << m_listItemInfo[indent].number;
694 break;
695 }
696 m_t << ".\" " << ((m_indent+1)*2);
697 m_listItemInfo[indent].number++;
698 }
699 else // bullet list
700 {
701 m_t << "\\(bu\" " << (m_indent*2);
702 }
703 m_t << "\n";
705 visitChildren(li);
706 m_t << "\n";
708}
709
711{
712 if (m_hide) return;
713 m_indent+=2;
714 visitChildren(dl);
715 m_indent-=2;
716 if (!m_firstCol) m_t << "\n";
717 m_t << "\n.PP\n";
719}
720
722{
723 if (m_hide) return;
724 if (!m_firstCol) m_t << "\n";
725 m_t << "\n.PP";
726 m_t << "\n.IP \"\\fB";
728 visitChildren(dt);
729}
730
732{
733 if (!m_firstCol) m_t << "\n";
734 m_t << ".IP \"\" 1c\n";
736 visitChildren(dd);
737}
738
740{
741 visitChildren(t);
742}
743
748
750{
751 visitChildren(r);
752}
753
755{
756 visitChildren(c);
757}
758
760{
761 visitChildren(i);
762}
763
765{
766 if (m_hide) return;
767 m_t << "\\fR";
768 visitChildren(href);
769 m_t << "\\fP";
770}
771
773{
774 m_t << "\\fB";
775 visitChildren(s);
776 m_t << "\\fP\n.PP\n";
777}
778
780{
781 if (m_hide) return;
782 if (!m_firstCol)
783 {
784 m_t << "\n";
785 m_t << ".PP\n";
786 }
787 auto summary = d.summary();
788 if (summary)
789 {
790 std::visit(*this,*summary);
791 m_t << ".PP\n";
792 m_t << ".RS 4\n";
793 }
794 visitChildren(d);
795 if (!m_firstCol) m_t << "\n";
796 if (summary)
797 {
798 m_t << ".RE\n";
799 }
800 m_t << ".PP\n";
802}
803
805{
806 if (m_hide) return;
807 if (!m_firstCol) m_t << "\n";
808 if (header.level()==1) m_t << ".SH"; else m_t << ".SS";
809 m_t << " \"";
810 visitChildren(header);
811 m_t << "\"\n";
812 if (header.level()==1) m_t << ".PP\n";
814}
815
817{
818}
819
821{
822}
823
825{
826}
827
829{
830}
831
835
837{
838 if (m_hide) return;
839 m_t << "\\fB";
840 visitChildren(dl);
841 m_t << "\\fP";
842}
843
845{
846 if (m_hide) return;
847 m_t << "\\fB";
848 if (!ref.hasLinkText()) filter(ref.targetTitle());
849 visitChildren(ref);
850 m_t << "\\fP";
851}
852
854{
855 if (m_hide) return;
856 QCString ws;
857 if (m_indent>0) ws.fill(' ',2*(m_indent-1));
858 if (!m_firstCol) m_t << "\n";
859 m_t << ".IP \"" << ws << "\\(bu\" " << (2*m_indent) << "\n";
861 visitChildren(ref);
862 m_t << "\n";
864}
865
867{
868 if (m_hide) return;
869 m_indent++;
870 visitChildren(l);
871 m_indent--;
872 if (!m_firstCol) m_t << "\n";
873 m_t << ".PP\n";
874}
875
877{
878 if (m_hide) return;
879 if (!m_firstCol)
880 {
881 m_t << "\n";
882 m_t << ".PP\n";
883 }
884 m_t << "\\fB";
885 switch(s.type())
886 {
888 m_t << theTranslator->trParameters(); break;
890 m_t << theTranslator->trReturnValues(); break;
892 m_t << theTranslator->trExceptions(); break;
894 m_t << theTranslator->trTemplateParameters(); break;
895 default:
896 ASSERT(0);
897 }
898 m_t << "\\fP\n";
899 m_t << ".RS 4\n";
900 visitChildren(s);
901 if (!m_firstCol) m_t << "\n";
902 m_t << ".RE\n";
903 m_t << ".PP\n";
905}
906
908{
909 if (m_hide) return;
910 m_t << "\\fI";
911 bool first=TRUE;
912 for (const auto &param : pl.parameters())
913 {
914 if (!first) m_t << ","; else first=FALSE;
915 std::visit(*this,param);
916 }
917 m_t << "\\fP ";
918 for (const auto &par : pl.paragraphs())
919 {
920 std::visit(*this,par);
921 }
922 if (!pl.isLast())
923 {
924 if (!m_firstCol) m_t << "\n";
925 m_t << ".br\n";
926 }
927}
928
930{
931 if (m_hide) return;
932 if (x.title().isEmpty()) return;
933 if (!m_firstCol)
934 {
935 m_t << "\n";
936 m_t << ".PP\n";
937 }
938 m_t << "\\fB";
939 filter(x.title());
940 m_t << "\\fP\n";
941 m_t << ".RS 4\n";
942 visitChildren(x);
943 if (x.title().isEmpty()) return;
944 if (!m_firstCol) m_t << "\n";
945 m_t << ".RE\n";
946 m_t << ".PP\n";
948}
949
951{
952 if (m_hide) return;
953 m_t << "\\fB";
954 visitChildren(ref);
955 m_t << "\\fP";
956}
957
959{
960 visitChildren(t);
961}
962
964{
965 if (m_hide) return;
966 if (!m_firstCol)
967 {
968 m_t << "\n";
969 m_t << ".PP\n";
970 }
971 m_t << ".RS 4\n"; // TODO: add support for nested block quotes
972 visitChildren(q);
973 if (!m_firstCol) m_t << "\n";
974 m_t << ".RE\n";
975 m_t << ".PP\n";
977}
978
982
984{
985 visitChildren(pb);
986}
987
988void ManDocVisitor::filter(const QCString &str, const bool retainNewline)
989{
990 if (!str.isEmpty())
991 {
992 const char *p=str.data();
993 char c=0;
994 bool insideDoubleQuote = false;
995 while ((c=*p++))
996 {
997 switch(c)
998 {
999 case '.': m_t << "\\&."; break; // see bug652277
1000 case '\\': m_t << "\\\\"; break;
1001 case '\"': m_t << "\""; insideDoubleQuote = !insideDoubleQuote; break;
1002 case '\n': if (retainNewline || !insideDoubleQuote) m_t << c; break;
1003 default: m_t << c; break;
1004 }
1005 }
1006 }
1007}
1008
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:567
bool isEnumList() const
Definition docnode.h:576
Node representing an item of a auto list.
Definition docnode.h:591
int itemNumber() const
Definition docnode.h:594
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:726
Node representing a dot file.
Definition docnode.h:708
Node representing an emoji.
Definition docnode.h:337
int index() const
Definition docnode.h:341
QCString name() const
Definition docnode.h:340
Node representing an item of a cross-referenced list.
Definition docnode.h:525
QCString text() const
Definition docnode.h:529
Node representing a Hypertext reference.
Definition docnode.h:818
Node representing a horizontal ruler.
Definition docnode.h:215
Node representing an HTML blockquote.
Definition docnode.h:1286
Node representing a HTML table caption.
Definition docnode.h:1223
Node representing a HTML table cell.
Definition docnode.h:1188
Node representing a HTML description data.
Definition docnode.h:1176
Node representing a Html description list.
Definition docnode.h:896
Node representing a Html description item.
Definition docnode.h:883
Node Html details.
Definition docnode.h:852
const DocNodeVariant * summary() const
Definition docnode.h:859
Node Html heading.
Definition docnode.h:868
int level() const
Definition docnode.h:872
Node representing a Html list.
Definition docnode.h:995
const HtmlAttribList & attribs() const
Definition docnode.h:1001
Type type() const
Definition docnode.h:1000
Node representing a HTML list item.
Definition docnode.h:1160
const HtmlAttribList & attribs() const
Definition docnode.h:1165
Node representing a HTML table row.
Definition docnode.h:1241
Node Html summary.
Definition docnode.h:839
Node representing a HTML table.
Definition docnode.h:1264
Node representing an image.
Definition docnode.h:637
Node representing a include/dontinclude operator block.
Definition docnode.h:473
bool stripCodeComments() const
Definition docnode.h:502
bool isLast() const
Definition docnode.h:499
QCString includeFileName() const
Definition docnode.h:505
QCString text() const
Definition docnode.h:495
QCString context() const
Definition docnode.h:497
QCString exampleFile() const
Definition docnode.h:504
int line() const
Definition docnode.h:493
Type type() const
Definition docnode.h:481
bool isFirst() const
Definition docnode.h:498
bool showLineNo() const
Definition docnode.h:494
bool isExample() const
Definition docnode.h:503
Node representing an included text block from file.
Definition docnode.h:431
QCString blockId() const
Definition docnode.h:450
QCString extension() const
Definition docnode.h:446
bool stripCodeComments() const
Definition docnode.h:451
@ LatexInclude
Definition docnode.h:433
@ SnippetWithLines
Definition docnode.h:434
@ DontIncWithLines
Definition docnode.h:435
@ IncWithLines
Definition docnode.h:434
@ HtmlInclude
Definition docnode.h:433
@ VerbInclude
Definition docnode.h:433
@ DontInclude
Definition docnode.h:433
@ DocbookInclude
Definition docnode.h:435
Type type() const
Definition docnode.h:447
QCString exampleFile() const
Definition docnode.h:453
QCString text() const
Definition docnode.h:448
QCString file() const
Definition docnode.h:445
bool trimLeft() const
Definition docnode.h:455
bool isExample() const
Definition docnode.h:452
QCString context() const
Definition docnode.h:449
Node representing an entry in the index.
Definition docnode.h:548
Node representing an internal section of documentation.
Definition docnode.h:964
Node representing an internal reference to some item.
Definition docnode.h:802
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:717
DocNodeVariant * parent()
Definition docnode.h:89
Node representing an block of paragraphs.
Definition docnode.h:974
Node representing a paragraph in the documentation tree.
Definition docnode.h:1075
bool isLast() const
Definition docnode.h:1083
Node representing a parameter list.
Definition docnode.h:1120
const DocNodeList & parameters() const
Definition docnode.h:1124
bool isLast() const
Definition docnode.h:1132
const DocNodeList & paragraphs() const
Definition docnode.h:1126
Node representing a parameter section.
Definition docnode.h:1048
Type type() const
Definition docnode.h:1063
Node representing a uml file.
Definition docnode.h:735
Node representing a reference to some item.
Definition docnode.h:773
QCString targetTitle() const
Definition docnode.h:781
bool hasLinkText() const
Definition docnode.h:783
Root node of documentation tree.
Definition docnode.h:1308
Node representing a reference to a section.
Definition docnode.h:930
Node representing a list of section references.
Definition docnode.h:954
Node representing a normal section.
Definition docnode.h:909
int level() const
Definition docnode.h:913
const DocNodeVariant * title() const
Definition docnode.h:914
Node representing a separator.
Definition docnode.h:361
QCString chars() const
Definition docnode.h:365
Node representing a simple list.
Definition docnode.h:985
Node representing a simple list item.
Definition docnode.h:1148
const DocNodeVariant * paragraph() const
Definition docnode.h:1152
Node representing a simple section.
Definition docnode.h:1012
Type type() const
Definition docnode.h:1021
const DocNodeVariant * title() const
Definition docnode.h:1028
Node representing a separator between two simple sections of the same type.
Definition docnode.h:1039
Node representing a style change.
Definition docnode.h:264
Style style() const
Definition docnode.h:303
bool enable() const
Definition docnode.h:305
Node representing a special symbol.
Definition docnode.h:324
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:328
Root node of a text fragment.
Definition docnode.h:1299
Node representing a simple section title.
Definition docnode.h:604
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:372
QCString language() const
Definition docnode.h:384
bool isExample() const
Definition docnode.h:381
QCString context() const
Definition docnode.h:380
Type type() const
Definition docnode.h:378
QCString text() const
Definition docnode.h:379
QCString exampleFile() const
Definition docnode.h:382
@ JavaDocLiteral
Definition docnode.h:374
Node representing a VHDL flow chart.
Definition docnode.h:744
CodeParserInterface & getCodeParser(const QCString &langExt)
void pushHidden(bool hide)
bool popHidden()
Node representing some amount of white space.
Definition docnode.h:350
QCString chars() const
Definition docnode.h:354
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:616
QCString title() const
Definition docnode.h:621
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: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:578
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const std::string & str() const
Definition qcstring.h:537
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
#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
SrcLangExt
Definition types.h:207
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5721
QCString integerToRoman(int n, bool upper)
Definition util.cpp:7175
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5739
QCString integerToAlpha(int n, bool upper)
Definition util.cpp:7159
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5763
A bunch of utility functions.