Doxygen
mandocvisitor.cpp
浏览该文件的文档.
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 
32 
34  const QCString &langExt)
35  : DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(FALSE),
36  m_indent(0), m_langExt(langExt)
37 {
38 }
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: &%s;\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;
137  case DocStyleChange::S:
139  case DocStyleChange::Del:
140  /* not supported */
141  break;
142  case DocStyleChange::Underline: //underline is shown as emphasis
143  case DocStyleChange::Ins:
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;
152  if (s->enable()) m_t << "\\fC"; 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  if (s->enable())
171  {
172  if (!m_firstCol) m_t << "\n";
173  m_t << ".PP\n";
174  m_t << ".nf\n";
176  }
177  else
178  {
180  if (!m_firstCol) m_t << "\n";
181  m_t << ".fi\n";
182  m_t << ".PP\n";
184  }
185  break;
186  case DocStyleChange::Div: /* HTML only */ break;
187  case DocStyleChange::Span: /* HTML only */ break;
188  }
189 }
190 
192 {
193  if (m_hide) return;
194  QCString lang = m_langExt;
195  if (!s->language().isEmpty()) // explicit language setting
196  {
197  lang = s->language();
198  }
199  SrcLangExt langExt = getLanguageFromCodeLang(lang);
200  switch (s->type())
201  {
202  case DocVerbatim::Code:
203  if (!m_firstCol) m_t << "\n";
204  m_t << ".PP\n";
205  m_t << ".nf\n";
206  getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),
207  langExt,
208  s->isExample(),s->exampleFile());
209  if (!m_firstCol) m_t << "\n";
210  m_t << ".fi\n";
211  m_t << ".PP\n";
213  break;
215  if (!m_firstCol) m_t << "\n";
216  m_t << ".PP\n";
217  m_t << ".nf\n";
218  m_t << s->text();
219  if (!m_firstCol) m_t << "\n";
220  m_t << ".fi\n";
221  m_t << ".PP\n";
223  break;
225  m_t << s->text();
226  break;
232  case DocVerbatim::Dot:
233  case DocVerbatim::Msc:
235  /* nothing */
236  break;
237  }
238 }
239 
241 {
242  /* no support for anchors in man pages */
243 }
244 
246 {
247  if (m_hide) return;
248  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
249  switch(inc->type())
250  {
252  {
253  if (!m_firstCol) m_t << "\n";
254  m_t << ".PP\n";
255  m_t << ".nf\n";
256  FileInfo cfi( inc->file().str() );
257  FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
259  inc->text(),
260  langExt,
261  inc->isExample(),
262  inc->exampleFile(),
263  fd, // fileDef,
264  -1, // start line
265  -1, // end line
266  FALSE, // inline fragment
267  0, // memberDef
268  TRUE
269  );
270  delete fd;
271  if (!m_firstCol) m_t << "\n";
272  m_t << ".fi\n";
273  m_t << ".PP\n";
275  }
276  break;
277  case DocInclude::Include:
278  if (!m_firstCol) m_t << "\n";
279  m_t << ".PP\n";
280  m_t << ".nf\n";
282  inc->text(),
283  langExt,
284  inc->isExample(),
285  inc->exampleFile(),
286  0, // fileDef
287  -1, // startLine
288  -1, // endLine
289  TRUE, // inlineFragment
290  0, // memberDef
291  FALSE
292  );
293  if (!m_firstCol) m_t << "\n";
294  m_t << ".fi\n";
295  m_t << ".PP\n";
297  break;
305  break;
307  m_t << inc->text();
308  break;
310  if (!m_firstCol) m_t << "\n";
311  m_t << ".PP\n";
312  m_t << ".nf\n";
313  m_t << inc->text();
314  if (!m_firstCol) m_t << "\n";
315  m_t << ".fi\n";
316  m_t << ".PP\n";
318  break;
319  case DocInclude::Snippet:
320  if (!m_firstCol) m_t << "\n";
321  m_t << ".PP\n";
322  m_t << ".nf\n";
324  inc->context(),
325  extractBlock(inc->text(),inc->blockId()),
326  langExt,
327  inc->isExample(),
328  inc->exampleFile()
329  );
330  if (!m_firstCol) m_t << "\n";
331  m_t << ".fi\n";
332  m_t << ".PP\n";
334  break;
336  {
337  if (!m_firstCol) m_t << "\n";
338  m_t << ".PP\n";
339  m_t << ".nf\n";
340  FileInfo cfi( inc->file().str() );
341  FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
343  inc->context(),
344  extractBlock(inc->text(),inc->blockId()),
345  langExt,
346  inc->isExample(),
347  inc->exampleFile(),
348  fd,
349  lineBlock(inc->text(),inc->blockId()),
350  -1, // endLine
351  FALSE, // inlineFragment
352  0, // memberDef
353  TRUE // show line number
354  );
355  delete fd;
356  if (!m_firstCol) m_t << "\n";
357  m_t << ".fi\n";
358  m_t << ".PP\n";
360  }
361  break;
364  err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
365  "Please create a bug report\n",__FILE__);
366  break;
367  }
368 }
369 
371 {
372  QCString locLangExt = getFileNameExtension(op->includeFileName());
373  if (locLangExt.isEmpty()) locLangExt = m_langExt;
374  SrcLangExt langExt = getLanguageFromFileName(locLangExt);
375  //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
376  // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
377  if (op->isFirst())
378  {
379  if (!m_hide)
380  {
381  if (!m_firstCol) m_t << "\n";
382  m_t << ".PP\n";
383  m_t << ".nf\n";
384  }
386  m_hide = TRUE;
387  }
388  if (op->type()!=DocIncOperator::Skip)
389  {
390  m_hide = popHidden();
391  if (!m_hide)
392  {
393  FileDef *fd = 0;
394  if (!op->includeFileName().isEmpty())
395  {
396  FileInfo cfi( op->includeFileName().str() );
397  fd = createFileDef( cfi.dirPath(), cfi.fileName() );
398  }
399 
400  getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
401  op->isExample(),op->exampleFile(),
402  fd, // fileDef
403  op->line(), // startLine
404  -1, // endLine
405  FALSE, // inline fragment
406  0, // memberDef
407  op->showLineNo() // show line numbers
408  );
409  if (fd) delete fd;
410  }
412  m_hide=TRUE;
413  }
414  if (op->isLast())
415  {
416  m_hide = popHidden();
417  if (!m_hide)
418  {
419  if (!m_firstCol) m_t << "\n";
420  m_t << ".fi\n";
421  m_t << ".PP\n";
423  }
424  }
425  else
426  {
427  if (!m_hide) m_t << "\n";
428  }
429 }
430 
432 {
433  if (m_hide) return;
434  m_t << f->text();
435 }
436 
438 {
439 }
440 
442 {
443 }
444 
446 {
447  if (m_hide) return;
448  m_t << "\\fB";
449  if (cite->file().isEmpty()) m_t << "[";
450  filter(cite->text());
451  if (cite->file().isEmpty()) m_t << "]";
452  m_t << "\\fP";
453 }
454 
455 
456 //--------------------------------------
457 // visitor functions for compound nodes
458 //--------------------------------------
459 
461 {
462  if (m_hide) return;
463  m_indent+=2;
464 }
465 
467 {
468  if (m_hide) return;
469  m_indent-=2;
470  m_t << ".PP\n";
471 }
472 
474 {
475  if (m_hide) return;
476  QCString ws;
477  ws.fill(' ',m_indent-2);
478  if (!m_firstCol) m_t << "\n";
479  m_t << ".IP \"" << ws;
480  if (((DocAutoList *)li->parent())->isEnumList())
481  {
482  m_t << li->itemNumber() << ".\" " << m_indent+2;
483  }
484  else // bullet list
485  {
486  m_t << "\\(bu\" " << m_indent;
487  }
488  m_t << "\n";
490 }
491 
493 {
494  if (m_hide) return;
495  m_t << "\n";
497 }
498 
500 {
501 }
502 
504 {
505  if (m_hide) return;
506  if (!p->isLast() && // omit <p> for last paragraph
507  !(p->parent() && // and for parameter sections
509  )
510  )
511  {
512  if (!m_firstCol) m_t << "\n";
513  m_t << ".PP\n";
515  }
516 }
517 
519 {
520 }
521 
523 {
524 }
525 
527 {
528  if (m_hide) return;
529  if (!m_firstCol)
530  {
531  m_t << "\n";
532  m_t << ".PP\n";
533  }
534  m_t << "\\fB";
535  switch(s->type())
536  {
537  case DocSimpleSect::See:
538  m_t << theTranslator->trSeeAlso(); break;
540  m_t << theTranslator->trReturns(); break;
542  m_t << theTranslator->trAuthor(TRUE,TRUE); break;
544  m_t << theTranslator->trAuthor(TRUE,FALSE); break;
546  m_t << theTranslator->trVersion(); break;
548  m_t << theTranslator->trSince(); break;
549  case DocSimpleSect::Date:
550  m_t << theTranslator->trDate(); break;
551  case DocSimpleSect::Note:
552  m_t << theTranslator->trNote(); break;
554  m_t << theTranslator->trWarning(); break;
555  case DocSimpleSect::Pre:
556  m_t << theTranslator->trPrecondition(); break;
557  case DocSimpleSect::Post:
558  m_t << theTranslator->trPostcondition(); break;
560  m_t << theTranslator->trCopyright(); break;
562  m_t << theTranslator->trInvariant(); break;
564  m_t << theTranslator->trRemarks(); break;
566  m_t << theTranslator->trAttention(); break;
567  case DocSimpleSect::User: break;
568  case DocSimpleSect::Rcs: break;
569  case DocSimpleSect::Unknown: break;
570  }
571 
572  // special case 1: user defined title
573  if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
574  {
575  m_t << "\\fP\n";
576  m_t << ".RS 4\n";
577  }
578 }
579 
581 {
582  if (m_hide) return;
583  if (!m_firstCol) m_t << "\n";
584  m_t << ".RE\n";
585  m_t << ".PP\n";
587 }
588 
590 {
591 }
592 
594 {
595  if (m_hide) return;
596  m_t << "\\fP\n";
597  m_t << ".RS 4\n";
598 }
599 
601 {
602  if (m_hide) return;
603  m_indent+=2;
604  if (!m_firstCol) m_t << "\n";
605  m_t << ".PD 0\n";
606 }
607 
609 {
610  if (m_hide) return;
611  m_indent-=2;
612  m_t << ".PP\n";
613 }
614 
616 {
617  if (m_hide) return;
618  QCString ws;
619  ws.fill(' ',m_indent-2);
620  if (!m_firstCol) m_t << "\n";
621  m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
623 }
624 
626 {
627  if (m_hide) return;
628  m_t << "\n";
630 }
631 
633 {
634  if (m_hide) return;
635  if (!m_firstCol) m_t << "\n";
636  if (s->level()==1) m_t << ".SH"; else m_t << ".SS";
637  m_t << " \"";
638  filter(s->title());
639  m_t << "\"\n";
640  if (s->level()==1) m_t << ".PP\n";
642 }
643 
645 {
646 }
647 
649 {
650  if (m_hide) return;
651  m_indent+=2;
652  if (!m_firstCol) m_t << "\n";
653  m_t << ".PD 0\n";
656  for (const auto &opt : l->attribs())
657  {
658  if (opt.name=="type")
659  {
660  man_listItemInfo[m_indent].type = opt.value[0];
661  }
662  if (opt.name=="start")
663  {
664  bool ok;
665  int val = opt.value.toInt(&ok);
666  if (ok) man_listItemInfo[m_indent].number = val;
667  }
668  }
669 }
670 
672 {
673  if (m_hide) return;
674  m_indent-=2;
675  if (!m_firstCol) m_t << "\n";
676  m_t << ".PP\n";
677 }
678 
680 {
681  if (m_hide) return;
682  QCString ws;
683  ws.fill(' ',m_indent-2);
684  if (!m_firstCol) m_t << "\n";
685  m_t << ".IP \"" << ws;
686  if (((DocHtmlList *)li->parent())->type()==DocHtmlList::Ordered)
687  {
688  for (const auto &opt : li->attribs())
689  {
690  if (opt.name=="value")
691  {
692  bool ok;
693  int val = opt.value.toInt(&ok);
694  if (ok) man_listItemInfo[m_indent].number = val;
695  }
696  }
697  switch (man_listItemInfo[m_indent].type)
698  {
699  case '1':
701  break;
702  case 'a':
703  m_t << integerToAlpha(man_listItemInfo[m_indent].number,false);
704  break;
705  case 'A':
707  break;
708  case 'i':
709  m_t << integerToRoman(man_listItemInfo[m_indent].number,false);
710  break;
711  case 'I':
713  break;
714  default:
716  break;
717  }
718  m_t << ".\" " << m_indent+2;
720  }
721  else // bullet list
722  {
723  m_t << "\\(bu\" " << m_indent;
724  }
725  m_t << "\n";
727 }
728 
730 {
731  if (m_hide) return;
732  m_t << "\n";
734 }
735 
736 //void ManDocVisitor::visitPre(DocHtmlPre *)
737 //{
738 // if (!m_firstCol) m_t << "\n";
739 // m_t << ".PP\n";
740 // m_t << ".nf\n";
741 // m_insidePre=TRUE;
742 //}
743 //
744 //void ManDocVisitor::visitPost(DocHtmlPre *)
745 //{
746 // m_insidePre=FALSE;
747 // if (!m_firstCol) m_t << "\n";
748 // m_t << ".fi\n";
749 // m_t << ".PP\n";
750 // m_firstCol=TRUE;
751 //}
752 
754 {
755 }
756 
758 {
759  if (m_hide) return;
760  if (!m_firstCol) m_t << "\n";
761  m_t << ".PP\n";
763 }
764 
766 {
767  if (m_hide) return;
768  if (!m_firstCol) m_t << "\n";
769  m_t << ".IP \"\\fB";
771 }
772 
774 {
775  if (m_hide) return;
776  m_t << "\\fP\" 1c\n";
778 }
779 
781 {
782 }
783 
785 {
786 }
787 
789 {
790 }
791 
793 {
794 }
795 
797 {
798 }
799 
801 {
802 }
803 
805 {
806 }
807 
809 {
810 }
811 
813 {
814 }
815 
817 {
818 }
819 
821 {
822  if (m_hide) return;
823  //if (!m_firstCol) m_t << "\n";
824  //m_t << ".PP\n";
825  //m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP\n";
826  //m_t << ".RS 4\n";
827 }
828 
830 {
831  if (m_hide) return;
832  //if (!m_firstCol) m_t << "\n";
833  //m_t << ".RE\n";
834  //m_t << ".PP\n";
835  //m_firstCol=TRUE;
836 }
837 
839 {
840  if (m_hide) return;
841  m_t << "\\fC";
842 }
843 
845 {
846  if (m_hide) return;
847  m_t << "\\fP";
848 }
849 
851 {
852  if (m_hide) return;
853  if (!m_firstCol) m_t << "\n";
854  if (header->level()==1) m_t << ".SH"; else m_t << ".SS";
855  m_t << " \"";
856 }
857 
859 {
860  if (m_hide) return;
861  m_t << "\"\n";
862  if (header->level()==1) m_t << ".PP\n";
864 }
865 
867 {
868 }
869 
871 {
872 }
873 
875 {
876 }
877 
879 {
880 }
882 {
883 }
884 
886 {
887 }
888 
890 {
891 }
892 
894 {
895 }
896 
898 {
899  if (m_hide) return;
900  m_t << "\\fB";
901 }
902 
904 {
905  if (m_hide) return;
906  m_t << "\\fP";
907 }
908 
910 {
911  if (m_hide) return;
912  m_t << "\\fB";
913  if (!ref->hasLinkText()) filter(ref->targetTitle());
914 }
915 
917 {
918  if (m_hide) return;
919  m_t << "\\fP";
920 }
921 
923 {
924  if (m_hide) return;
925  QCString ws;
926  ws.fill(' ',m_indent-2);
927  if (!m_firstCol) m_t << "\n";
928  m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
930 }
931 
933 {
934  if (m_hide) return;
935  m_t << "\n";
937 }
938 
940 {
941  if (m_hide) return;
942  m_indent+=2;
943 }
944 
946 {
947  if (m_hide) return;
948  m_indent-=2;
949  if (!m_firstCol) m_t << "\n";
950  m_t << ".PP\n";
951 }
952 
954 {
955  if (m_hide) return;
956  if (!m_firstCol)
957  {
958  m_t << "\n";
959  m_t << ".PP\n";
960  }
961  m_t << "\\fB";
962  switch(s->type())
963  {
964  case DocParamSect::Param:
965  m_t << theTranslator->trParameters(); break;
967  m_t << theTranslator->trReturnValues(); break;
969  m_t << theTranslator->trExceptions(); break;
972  default:
973  ASSERT(0);
974  }
975  m_t << "\\fP\n";
976  m_t << ".RS 4\n";
977 }
978 
980 {
981  if (m_hide) return;
982  if (!m_firstCol) m_t << "\n";
983  m_t << ".RE\n";
984  m_t << ".PP\n";
986 }
987 
989 {
990  if (m_hide) return;
991  m_t << "\\fI";
992  bool first=TRUE;
993  for (const auto &param : pl->parameters())
994  {
995  if (!first) m_t << ","; else first=FALSE;
996  if (param->kind()==DocNode::Kind_Word)
997  {
998  visit((DocWord*)param.get());
999  }
1000  else if (param->kind()==DocNode::Kind_LinkedWord)
1001  {
1002  visit((DocLinkedWord*)param.get());
1003  }
1004  }
1005  m_t << "\\fP ";
1006 }
1007 
1009 {
1010  if (m_hide) return;
1011  if (!pl->isLast())
1012  {
1013  if (!m_firstCol) m_t << "\n";
1014  m_t << ".br\n";
1015  }
1016 }
1017 
1019 {
1020  if (m_hide) return;
1021  if (x->title().isEmpty()) return;
1022  if (!m_firstCol)
1023  {
1024  m_t << "\n";
1025  m_t << ".PP\n";
1026  }
1027  m_t << "\\fB";
1028  filter(x->title());
1029  m_t << "\\fP\n";
1030  m_t << ".RS 4\n";
1031 }
1032 
1034 {
1035  if (m_hide) return;
1036  if (x->title().isEmpty()) return;
1037  if (!m_firstCol) m_t << "\n";
1038  m_t << ".RE\n";
1039  m_t << ".PP\n";
1040  m_firstCol=TRUE;
1041 }
1042 
1044 {
1045  if (m_hide) return;
1046  m_t << "\\fB";
1047 }
1048 
1050 {
1051  if (m_hide) return;
1052  m_t << "\\fP";
1053 }
1054 
1056 {
1057 }
1058 
1060 {
1061 }
1062 
1064 {
1065  if (m_hide) return;
1066  if (!m_firstCol)
1067  {
1068  m_t << "\n";
1069  m_t << ".PP\n";
1070  }
1071  m_t << ".RS 4\n"; // TODO: add support for nested block quotes
1072 }
1073 
1075 {
1076  if (m_hide) return;
1077  if (!m_firstCol) m_t << "\n";
1078  m_t << ".RE\n";
1079  m_t << ".PP\n";
1080  m_firstCol=TRUE;
1081 }
1082 
1084 {
1085 }
1086 
1088 {
1089 }
1090 
1092 {
1093 }
1094 
1096 {
1097 }
1098 
1099 
1101 {
1102  if (!str.isEmpty())
1103  {
1104  const char *p=str.data();
1105  char c=0;
1106  while ((c=*p++))
1107  {
1108  switch(c)
1109  {
1110  case '.': m_t << "\\&."; break; // see bug652277
1111  case '\\': m_t << "\\\\"; break;
1112  case '"': c = '\''; // fall through
1113  default: m_t << c; break;
1114  }
1115  }
1116  }
1117 }
1118 
DocHtmlBlockQuote
Node representing an HTML blockquote
Definition: docparser.h:1433
DocAutoListItem
Node representing an item of a auto list
Definition: docparser.h:720
DocHRef
Node representing a Hypertext reference
Definition: docparser.h:936
DocStyleChange
Node representing a style change
Definition: docparser.h:343
DocVerbatim::isExample
bool isExample() const
Definition: docparser.h:522
ManDocVisitor::filter
void filter(const QCString &str)
Definition: mandocvisitor.cpp:1100
DocVerbatim
Node representing a verbatim, unparsed text fragment
Definition: docparser.h:510
Translator::trCopyright
virtual QCString trCopyright()=0
integerToRoman
QCString integerToRoman(int n, bool upper)
Definition: util.cpp:7363
DocTitle
Node representing a simple section title
Definition: docparser.h:736
Translator::trPostcondition
virtual QCString trPostcondition()=0
ManDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: mandocvisitor.cpp:460
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
fileinfo.h
DocInclude::HtmlInclude
@ HtmlInclude
Definition: docparser.h:566
DocSimpleSect::Return
@ Return
Definition: docparser.h:1116
DocVerbatim::text
QCString text() const
Definition: docparser.h:519
ManDocVisitor::m_langExt
QCString m_langExt
Definition: mandocvisitor.h:159
DocDotFile
Node representing a dot file
Definition: docparser.h:830
DocVisitor::pushHidden
void pushHidden(bool hide)
Definition: docvisitor.cpp:62
DocHtmlTable
Node representing a HTML table
Definition: docparser.h:1405
man_maxIndentLevels
const int man_maxIndentLevels
Definition: mandocvisitor.h:168
Translator::trNote
virtual QCString trNote()=0
DocIncOperator::showLineNo
bool showLineNo() const
Definition: docparser.h:629
DocSimpleSect::Warning
@ Warning
Definition: docparser.h:1117
DocNode::Kind_Word
@ Kind_Word
Definition: docparser.h:101
DocRoot
Root node of documentation tree
Definition: docparser.h:1457
DocVerbatim::HtmlOnly
@ HtmlOnly
Definition: docparser.h:513
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
DocStyleChange::Center
@ Center
Definition: docparser.h:349
DocVisitor::popHidden
bool popHidden()
Definition: docvisitor.cpp:67
DocHtmlHeader
Node Html heading
Definition: docparser.h:957
DocSimpleSect::Unknown
@ Unknown
Definition: docparser.h:1116
DocStyleChange::Strike
@ Strike
Definition: docparser.h:356
DocVerbatim::context
QCString context() const
Definition: docparser.h:520
Translator::trExceptions
virtual QCString trExceptions()=0
DocInclude::Snippet
@ Snippet
Definition: docparser.h:567
DocHtmlListItem
Node representing a HTML list item
Definition: docparser.h:1286
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
DocStyleChange::Del
@ Del
Definition: docparser.h:358
DocVhdlFlow
Node representing a VHDL flow chart
Definition: docparser.h:860
DocInclude::isExample
bool isExample() const
Definition: docparser.h:588
DocVerbatim::Msc
@ Msc
Definition: docparser.h:513
DocHtmlDescData
Node representing a HTML description data
Definition: docparser.h:1303
DocSimpleSect::type
Type type() const
Definition: docparser.h:1122
DocHtmlDescTitle
Node representing a Html description item
Definition: docparser.h:973
DocInclude::XmlInclude
@ XmlInclude
Definition: docparser.h:568
DocVerbatim::PlantUML
@ PlantUML
Definition: docparser.h:513
DocEmoji
Node representing a n emoji
Definition: docparser.h:469
DocStyleChange::Italic
@ Italic
Definition: docparser.h:347
DocMscFile
Node representing a msc file
Definition: docparser.h:840
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
Translator::trReturns
virtual QCString trReturns()=0
DocVerbatim::Code
@ Code
Definition: docparser.h:513
DocStyleChange::Bold
@ Bold
Definition: docparser.h:346
DocRef::targetTitle
QCString targetTitle() const
Definition: docparser.h:901
DocInclude::IncludeDoc
@ IncludeDoc
Definition: docparser.h:567
DocEmoji::name
QCString name() const
Definition: docparser.h:473
DocVerbatim::RtfOnly
@ RtfOnly
Definition: docparser.h:513
QCString::str
std::string str() const
Definition: qcstring.h:442
DocIncOperator::exampleFile
QCString exampleFile() const
Definition: docparser.h:639
DocParamSect::TemplateParam
@ TemplateParam
Definition: docparser.h:1156
DocVerbatim::type
Type type() const
Definition: docparser.h:518
DocSecRefItem
Node representing a reference to a section
Definition: docparser.h:1023
DocStyleChange::Span
@ Span
Definition: docparser.h:354
DocAnchor
Node representing an anchor
Definition: docparser.h:303
DocFormula::text
QCString text() const
Definition: docparser.h:664
Translator::trPrecondition
virtual QCString trPrecondition()=0
DocRef::hasLinkText
bool hasLinkText() const
Definition: docparser.h:902
DocStyleChange::Superscript
@ Superscript
Definition: docparser.h:352
err
void err(const char *fmt,...)
Definition: message.cpp:203
QCString::at
char & at(size_t i)
Returns a reference to the character at index i.
Definition: qcstring.h:477
DocInclude::text
QCString text() const
Definition: docparser.h:585
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DocText
Root node of a text fragment
Definition: docparser.h:1447
DocHtmlList::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1101
DocVisitor
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:92
DocSimpleSect::Author
@ Author
Definition: docparser.h:1116
DocSimpleSect::Note
@ Note
Definition: docparser.h:1117
DocInclude::DocbookInclude
@ DocbookInclude
Definition: docparser.h:568
code.h
DocInclude::DontInclude
@ DontInclude
Definition: docparser.h:566
man_listItemInfo
ManListItemInfo man_listItemInfo[man_maxIndentLevels]
Definition: mandocvisitor.cpp:31
HtmlEntityMapper::instance
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper
Definition: htmlentity.cpp:341
DocInclude::VerbInclude
@ VerbInclude
Definition: docparser.h:566
ManListItemInfo::type
char type
Definition: mandocvisitor.h:165
DocIncOperator::isFirst
bool isFirst() const
Definition: docparser.h:634
ManListItemInfo::number
int number
Definition: mandocvisitor.h:164
DocFormula
Node representing an item of a cross-referenced list
Definition: docparser.h:658
DocVerbatim::DocbookOnly
@ DocbookOnly
Definition: docparser.h:513
DocLinkedWord::word
QCString word() const
Definition: docparser.h:237
DocHtmlDescList
Node representing a Html description list
Definition: docparser.h:987
DocVisitor::getCodeParser
CodeParserInterface & getCodeParser(const QCString &langExt)
Definition: docvisitor.cpp:41
DocIncOperator
Node representing a include/dontinclude operator block
Definition: docparser.h:606
DocSymbol::symbol
SymType symbol() const
Definition: docparser.h:459
DocHtmlList::Ordered
@ Ordered
Definition: docparser.h:1096
DocIndexEntry
Node representing an entry in the index.
Definition: docparser.h:682
DocSimpleSect::User
@ User
Definition: docparser.h:1117
DocSecRefList
Node representing a list of section references
Definition: docparser.h:1048
ManDocVisitor::m_t
TextStream & m_t
Definition: mandocvisitor.h:153
Translator::trSeeAlso
virtual QCString trSeeAlso()=0
DocLineBreak
Node representing a line break
Definition: docparser.h:272
DocWord
Node representing a word
Definition: docparser.h:217
DocSymbol
Node representing a special symbol
Definition: docparser.h:385
EmojiEntityMapper::name
const char * name(int index) const
Access routine to the name of the Emoji entity
Definition: emoji.cpp:1590
outputgen.h
dot.h
extractBlock
QCString extractBlock(const QCString &text, const QCString &marker)
Returns the section of text, in between a pair of markers.
Definition: util.cpp:6453
DocXRefItem
Node representing an item of a cross-referenced list
Definition: docparser.h:749
DocURL::url
QCString url() const
Definition: docparser.h:261
DocSection::level
int level() const
Definition: docparser.h:1007
createFileDef
FileDef * createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition: filedef.cpp:190
DocImage
Node representing an image
Definition: docparser.h:771
DocNode::kind
virtual Kind kind() const =0
HtmlEntityMapper::man
const char * man(DocSymbol::SymType symb) const
Access routine to the man code of the HTML entity
Definition: htmlentity.cpp:437
DocInclude::file
QCString file() const
Definition: docparser.h:577
Translator::trVersion
virtual QCString trVersion()=0
DocURL
Node representing a URL (or email address)
Definition: docparser.h:256
message.h
DocSimpleSect::See
@ See
Definition: docparser.h:1116
DocHtmlCaption
Node representing a HTML table caption
Definition: docparser.h:1352
DocIncOperator::isExample
bool isExample() const
Definition: docparser.h:638
DocStyleChange::Ins
@ Ins
Definition: docparser.h:359
ManDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: mandocvisitor.cpp:466
DocInclude::SnipWithLines
@ SnipWithLines
Definition: docparser.h:567
DocParamList
Node representing a parameter list.
Definition: docparser.h:1228
DocSimpleSect::Rcs
@ Rcs
Definition: docparser.h:1117
Translator::trAttention
virtual QCString trAttention()=0
theTranslator
Translator * theTranslator
Definition: language.cpp:156
doxygen.h
parserintf.h
DocIncOperator::Skip
@ Skip
Definition: docparser.h:609
DocVerbatim::exampleFile
QCString exampleFile() const
Definition: docparser.h:523
DocParBlock
Node representing an block of paragraphs
Definition: docparser.h:1070
DocVerbatim::ManOnly
@ ManOnly
Definition: docparser.h:513
DocSimpleSectSep
Node representing a separator between two simple sections of the same type.
Definition: docparser.h:1139
language.h
DocIncOperator::line
int line() const
Definition: docparser.h:628
DocStyleChange::Small
@ Small
Definition: docparser.h:350
DocCite
Node representing a citation of some bibliographic reference
Definition: docparser.h:321
Translator::trParameters
virtual QCString trParameters()=0
DocRef
Node representing a reference to some item
Definition: docparser.h:891
DocSimpleSect::Date
@ Date
Definition: docparser.h:1116
docparser.h
getLanguageFromFileName
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition: util.cpp:5574
TRUE
#define TRUE
Definition: qcstring.h:36
DocSimpleSect::Authors
@ Authors
Definition: docparser.h:1116
DocParamSect
Node representing a parameter section
Definition: docparser.h:1150
DocInclude::IncWithLines
@ IncWithLines
Definition: docparser.h:567
ManListItemInfo
Definition: mandocvisitor.h:162
QCString::toInt
int toInt(bool *ok=0, int base=10) const
Definition: qcstring.cpp:244
DocHtmlList
Node representing a Html list
Definition: docparser.h:1093
filedef.h
ManDocVisitor::m_ci
CodeOutputInterface & m_ci
Definition: mandocvisitor.h:154
integerToAlpha
QCString integerToAlpha(int n, bool upper)
Definition: util.cpp:7347
Translator::trRemarks
virtual QCString trRemarks()=0
lineBlock
int lineBlock(const QCString &text, const QCString &marker)
Returns the line number of the line following the line with the marker.
Definition: util.cpp:6498
DocNode::Kind_ParamSect
@ Kind_ParamSect
Definition: docparser.h:143
DocAutoListItem::itemNumber
int itemNumber() const
Definition: docparser.h:725
DocParamSect::type
Type type() const
Definition: docparser.h:1167
DocSimpleSect
Node representing a simple section
Definition: docparser.h:1111
QCString::fill
bool fill(char c, int len=-1)
Fills a string with a predefined character
Definition: qcstring.h:175
DocSection
Node representing a normal section
Definition: docparser.h:1001
DocHorRuler
Node representing a horizontal ruler
Definition: docparser.h:288
DocVerbatim::language
QCString language() const
Definition: docparser.h:525
DocWord::word
QCString word() const
Definition: docparser.h:221
DocInclude
Node representing an included text block from file
Definition: docparser.h:563
DocVisitor_Man
const int DocVisitor_Man
Definition: docvisitor.h:28
DocStyleChange::Subscript
@ Subscript
Definition: docparser.h:351
CodeParserInterface::parseCode
virtual void parseCode(CodeOutputInterface &codeOutIntf, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=0, bool showLineNumbers=TRUE, const Definition *searchCtx=0, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
DocAutoList
Node representing an auto List
Definition: docparser.h:703
Translator::trSince
virtual QCString trSince()=0
DocWhiteSpace::chars
QCString chars() const
Definition: docparser.h:490
DocNode::Kind_LinkedWord
@ Kind_LinkedWord
Definition: docparser.h:142
DocXRefItem::title
QCString title() const
Definition: docparser.h:756
DocInternal
Node representing an internal section of documentation
Definition: docparser.h:1059
Translator::trInvariant
virtual QCString trInvariant()=0
DocParamSect::Exception
@ Exception
Definition: docparser.h:1156
DocInclude::RtfInclude
@ RtfInclude
Definition: docparser.h:568
ManDocVisitor::m_insidePre
bool m_insidePre
Definition: mandocvisitor.h:155
DocInclude::SnippetDoc
@ SnippetDoc
Definition: docparser.h:567
DocInclude::LatexInclude
@ LatexInclude
Definition: docparser.h:566
DocSection::title
QCString title() const
Definition: docparser.h:1008
DocEmoji::index
int index() const
Definition: docparser.h:474
FileInfo::dirPath
std::string dirPath(bool absPath=true) const
Definition: fileinfo.cpp:137
DocStyleChange::style
Style style() const
Definition: docparser.h:368
DocLinkedWord
Node representing a word that can be linked to something
Definition: docparser.h:231
DocStyleChange::Code
@ Code
Definition: docparser.h:348
DocInclude::Include
@ Include
Definition: docparser.h:566
DocCite::file
QCString file() const
Definition: docparser.h:326
DocIncOperator::type
Type type() const
Definition: docparser.h:616
getLanguageFromCodeLang
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command
Definition: util.cpp:5592
CodeOutputInterface
Output interface for code parser.
Definition: outputgen.h:61
DocParamSect::Param
@ Param
Definition: docparser.h:1156
DocSimpleSect::Copyright
@ Copyright
Definition: docparser.h:1117
DocDiaFile
Node representing a dia file
Definition: docparser.h:850
DocVerbatim::LatexOnly
@ LatexOnly
Definition: docparser.h:513
FileInfo
Minimal replacement for QFileInfo.
Definition: fileinfo.h:22
DocStyleChange::Preformatted
@ Preformatted
Definition: docparser.h:353
DocInclude::blockId
QCString blockId() const
Definition: docparser.h:587
ManDocVisitor::ManDocVisitor
ManDocVisitor(TextStream &t, CodeOutputInterface &ci, const QCString &langExt)
Definition: mandocvisitor.cpp:33
DocParamList::isLast
bool isLast() const
Definition: docparser.h:1245
DocStyleChange::enable
bool enable() const
Definition: docparser.h:370
ManDocVisitor::m_indent
int m_indent
Definition: mandocvisitor.h:158
DocSimpleSect::Post
@ Post
Definition: docparser.h:1117
DocSimpleSect::Pre
@ Pre
Definition: docparser.h:1117
DocSimpleList
Node representing a simple list
Definition: docparser.h:1082
DocSimpleSect::Remark
@ Remark
Definition: docparser.h:1117
ASSERT
#define ASSERT(x)
Definition: qcstring.h:44
getFileNameExtension
QCString getFileNameExtension(const QCString &fn)
Definition: util.cpp:5621
QCString::data
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:153
DocStyleChange::Underline
@ Underline
Definition: docparser.h:357
DocSimpleListItem
Node representing a simple list item
Definition: docparser.h:1266
emoji.h
DocIncOperator::includeFileName
QCString includeFileName() const
Definition: docparser.h:640
FileDef
A model of a file symbol.
Definition: filedef.h:73
DocInclude::type
Type type() const
Definition: docparser.h:584
DocWhiteSpace
Node representing some amount of white space
Definition: docparser.h:484
DocVerbatim::XmlOnly
@ XmlOnly
Definition: docparser.h:513
DocParamSect::RetVal
@ RetVal
Definition: docparser.h:1156
DocInclude::DontIncWithLines
@ DontIncWithLines
Definition: docparser.h:568
DocIncOperator::context
QCString context() const
Definition: docparser.h:632
ManDocVisitor::m_firstCol
bool m_firstCol
Definition: mandocvisitor.h:157
DocStyleChange::Div
@ Div
Definition: docparser.h:355
EmojiEntityMapper::instance
static EmojiEntityMapper * instance()
Returns the one and only instance of the Emoji entity mapper
Definition: emoji.cpp:1536
FileInfo::fileName
std::string fileName() const
Definition: fileinfo.cpp:118
DocNode::parent
DocNode * parent() const
Definition: docparser.h:166
DocHtmlCell
Node representing a HTML table cell
Definition: docparser.h:1316
DocInclude::extension
QCString extension() const
Definition: docparser.h:578
DocCite::text
QCString text() const
Definition: docparser.h:330
Translator::trDate
virtual QCString trDate()=0
htmlentity.h
mandocvisitor.h
DocInternalRef
Node representing an internal reference to some item
Definition: docparser.h:919
DocParamList::parameters
DocNodeList & parameters()
Definition: docparser.h:1238
DocStyleChange::S
@ S
Definition: docparser.h:360
DocVerbatim::Verbatim
@ Verbatim
Definition: docparser.h:513
util.h
A bunch of utility functions.
ManDocVisitor::m_hide
bool m_hide
Definition: mandocvisitor.h:156
DocHtmlRow
Node representing a HTML table row
Definition: docparser.h:1371
DocInclude::ManInclude
@ ManInclude
Definition: docparser.h:568
DocSimpleSect::Invar
@ Invar
Definition: docparser.h:1117
DocIncOperator::isLast
bool isLast() const
Definition: docparser.h:635
DocSimpleSect::Version
@ Version
Definition: docparser.h:1116
Translator::trTemplateParameters
virtual QCString trTemplateParameters()=0
DocHtmlHeader::level
int level() const
Definition: docparser.h:962
DocInclude::exampleFile
QCString exampleFile() const
Definition: docparser.h:589
DocIncOperator::text
QCString text() const
Definition: docparser.h:630
FALSE
#define FALSE
Definition: qcstring.h:33
DocSimpleSect::Since
@ Since
Definition: docparser.h:1116
Translator::trReturnValues
virtual QCString trReturnValues()=0
Translator::trAuthor
virtual QCString trAuthor(bool first_capital, bool singular)=0
ManDocVisitor::visit
void visit(DocWord *)
Definition: mandocvisitor.cpp:44
Translator::trWarning
virtual QCString trWarning()=0
DocSimpleSect::Attention
@ Attention
Definition: docparser.h:1117
DocPara::isLast
bool isLast() const
Definition: docparser.h:1189
DocInclude::context
QCString context() const
Definition: docparser.h:586
DocHtmlListItem::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1293
DocVerbatim::Dot
@ Dot
Definition: docparser.h:513
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108