xmldocvisitor.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  * Documents produced by Doxygen are derivative works derived from the
15  * input used in their production; they are not affected by this license.
16  *
17  */
18 
19 #include <qfileinfo.h>
20 
21 #include "xmldocvisitor.h"
22 #include "docparser.h"
23 #include "language.h"
24 #include "doxygen.h"
25 #include "outputgen.h"
26 #include "xmlgen.h"
27 #include "dot.h"
28 #include "message.h"
29 #include "util.h"
30 #include "parserintf.h"
31 #include "filename.h"
32 #include "config.h"
33 #include "htmlentity.h"
34 
36 {
37  QListIterator<DocNode> cli(children);
38  DocNode *n;
39  for (cli.toFirst();(n=cli.current());++cli) n->accept(parent);
40 }
41 
42 static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption,
44  const QCString &name, bool writeType, DocImage::Type type, const QCString &width,
45  const QCString &height)
46 {
47  t << "<" << cmd;
48  if (writeType)
49  {
50  t << " type=\"";
51  switch(type)
52  {
53  case DocImage::Html: t << "html"; break;
54  case DocImage::Latex: t << "latex"; break;
55  case DocImage::Rtf: t << "rtf"; break;
56  case DocImage::DocBook: t << "docbook"; break;
57  }
58  t << "\"";
59  }
60  if (!name.isEmpty())
61  {
62  t << " name=\"" << name << "\"";
63  }
64  if (!width.isEmpty())
65  {
66  t << " width=\"" << convertToXML(width) << "\"";
67  }
68  else if (!height.isEmpty())
69  {
70  t << " height=\"" << convertToXML(height) << "\"";
71  }
72  if (doCaption)
73  {
74  t << " caption=\"";
75  visitCaption(parent, children);
76  t << "\"";
77  }
78  t << ">";
79 }
80 
81 static void visitPostEnd(FTextStream &t, const char *cmd)
82 {
83  t << "</" << cmd << ">" << endl;
84 }
85 
87  : DocVisitor(DocVisitor_XML), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
88 {
89 }
90 
91  //--------------------------------------
92  // visitor functions for leaf nodes
93  //--------------------------------------
94 
96 {
97  if (m_hide) return;
98  filter(w->word());
99 }
100 
102 {
103  if (m_hide) return;
104  startLink(w->ref(),w->file(),w->anchor());
105  filter(w->word());
106  endLink();
107 }
108 
110 {
111  if (m_hide) return;
112  if (m_insidePre)
113  {
114  m_t << w->chars();
115  }
116  else
117  {
118  m_t << " ";
119  }
120 }
121 
123 {
124  if (m_hide) return;
125  const char *res = HtmlEntityMapper::instance()->xml(s->symbol());
126  if (res)
127  {
128  m_t << res;
129  }
130  else
131  {
132  err("XML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
133  }
134 }
135 
137 {
138  if (m_hide) return;
139  m_t << "<ulink url=\"";
140  if (u->isEmail()) m_t << "mailto:";
141  filter(u->url());
142  m_t << "\">";
143  filter(u->url());
144  m_t << "</ulink>";
145 }
146 
148 {
149  if (m_hide) return;
150  m_t << "<linebreak/>\n";
151 }
152 
154 {
155  if (m_hide) return;
156  m_t << "<hruler/>\n";
157 }
158 
160 {
161  if (m_hide) return;
162  switch (s->style())
163  {
165  if (s->enable()) m_t << "<bold>"; else m_t << "</bold>";
166  break;
168  if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
169  break;
171  if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
172  break;
174  if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript>";
175  break;
177  if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript>";
178  break;
180  if (s->enable()) m_t << "<center>"; else m_t << "</center>";
181  break;
183  if (s->enable()) m_t << "<small>"; else m_t << "</small>";
184  break;
186  if (s->enable())
187  {
188  m_t << "<preformatted>";
190  }
191  else
192  {
193  m_t << "</preformatted>";
195  }
196  break;
197  case DocStyleChange::Div: /* HTML only */ break;
198  case DocStyleChange::Span: /* HTML only */ break;
199  }
200 }
201 
203 {
204  if (m_hide) return;
205  QCString lang = m_langExt;
206  if (!s->language().isEmpty()) // explicit language setting
207  {
208  lang = s->language();
209  }
210  SrcLangExt langExt = getLanguageFromFileName(lang);
211  switch(s->type())
212  {
213  case DocVerbatim::Code: // fall though
214  m_t << "<programlisting>";
216  ->parseCode(m_ci,s->context(),s->text(),langExt,
217  s->isExample(),s->exampleFile());
218  m_t << "</programlisting>";
219  break;
220  case DocVerbatim::Verbatim:
221  m_t << "<verbatim>";
222  filter(s->text());
223  m_t << "</verbatim>";
224  break;
225  case DocVerbatim::HtmlOnly:
226  case DocVerbatim::RtfOnly:
227  case DocVerbatim::ManOnly:
230  /* nothing */
231  break;
232  case DocVerbatim::XmlOnly:
233  m_t << s->text();
234  break;
235  case DocVerbatim::Dot:
236  visitPreStart(m_t, "dot", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
237  filter(s->text());
238  visitPostEnd(m_t, "dot");
239  break;
240  case DocVerbatim::Msc:
241  visitPreStart(m_t, "msc", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
242  filter(s->text());
243  visitPostEnd(m_t, "msc");
244  break;
246  visitPreStart(m_t, "plantuml", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
247  filter(s->text());
248  visitPostEnd(m_t, "plantuml");
249  break;
250  }
251 }
252 
254 {
255  if (m_hide) return;
256  m_t << "<anchor id=\"" << anc->file() << "_1" << anc->anchor() << "\"/>";
257 }
258 
260 {
261  if (m_hide) return;
262  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
263  switch(inc->type())
264  {
266  {
267  m_t << "<programlisting>";
268  QFileInfo cfi( inc->file() );
269  FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
271  ->parseCode(m_ci,inc->context(),
272  inc->text(),
273  langExt,
274  inc->isExample(),
275  inc->exampleFile(), &fd);
276  m_t << "</programlisting>";
277  }
278  break;
279  case DocInclude::Include:
280  m_t << "<programlisting>";
282  ->parseCode(m_ci,inc->context(),
283  inc->text(),
284  langExt,
285  inc->isExample(),
286  inc->exampleFile());
287  m_t << "</programlisting>";
288  break;
290  break;
292  m_t << "<htmlonly>";
293  filter(inc->text());
294  m_t << "</htmlonly>";
295  break;
297  m_t << "<latexonly>";
298  filter(inc->text());
299  m_t << "</latexonly>";
300  break;
302  m_t << "<verbatim>";
303  filter(inc->text());
304  m_t << "</verbatim>";
305  break;
306  case DocInclude::Snippet:
307  m_t << "<programlisting>";
309  ->parseCode(m_ci,
310  inc->context(),
311  extractBlock(inc->text(),inc->blockId()),
312  langExt,
313  inc->isExample(),
314  inc->exampleFile()
315  );
316  m_t << "</programlisting>";
317  break;
318  }
319 }
320 
322 {
323  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
324  // op->type(),op->isFirst(),op->isLast(),op->text().data());
325  if (op->isFirst())
326  {
327  if (!m_hide)
328  {
329  m_t << "<programlisting>";
330  }
331  pushEnabled();
332  m_hide = TRUE;
333  }
335  if (op->type()!=DocIncOperator::Skip)
336  {
337  popEnabled();
338  if (!m_hide)
339  {
341  ->parseCode(m_ci,op->context(),
342  op->text(),langExt,op->isExample(),
343  op->exampleFile());
344  }
345  pushEnabled();
346  m_hide=TRUE;
347  }
348  if (op->isLast())
349  {
350  popEnabled();
351  if (!m_hide) m_t << "</programlisting>";
352  }
353  else
354  {
355  if (!m_hide) m_t << endl;
356  }
357 }
358 
360 {
361  if (m_hide) return;
362  m_t << "<formula id=\"" << f->id() << "\">";
363  filter(f->text());
364  m_t << "</formula>";
365 }
366 
368 {
369  if (m_hide) return;
370  m_t << "<indexentry>"
371  "<primaryie>";
372  filter(ie->entry());
373  m_t << "</primaryie>"
374  "<secondaryie></secondaryie>"
375  "</indexentry>";
376 }
377 
379 {
380  if (sep->parent() && sep->parent()->kind()==DocNode::Kind_SimpleSect)
381  {
382  visitPost((DocSimpleSect*)sep->parent()); // end current section
383  visitPre((DocSimpleSect*)sep->parent()); // start new section
384  }
385 }
386 
388 {
389  if (m_hide) return;
390  if (!cite->file().isEmpty()) startLink(cite->ref(),cite->file(),cite->anchor());
391  filter(cite->text());
392  if (!cite->file().isEmpty()) endLink();
393 }
394 
395 //--------------------------------------
396 // visitor functions for compound nodes
397 //--------------------------------------
398 
400 {
401  if (m_hide) return;
402  if (l->isEnumList())
403  {
404  m_t << "<orderedlist>\n";
405  }
406  else
407  {
408  m_t << "<itemizedlist>\n";
409  }
410 }
411 
413 {
414  if (m_hide) return;
415  if (l->isEnumList())
416  {
417  m_t << "</orderedlist>\n";
418  }
419  else
420  {
421  m_t << "</itemizedlist>\n";
422  }
423 }
424 
426 {
427  if (m_hide) return;
428  m_t << "<listitem>";
429 }
430 
432 {
433  if (m_hide) return;
434  m_t << "</listitem>";
435 }
436 
438 {
439  if (m_hide) return;
440  m_t << "<para>";
441 }
442 
444 {
445  if (m_hide) return;
446  m_t << "</para>";
447 }
448 
450 {
451  //m_t << "<hr><h4><font color=\"red\">New parser:</font></h4>\n";
452 }
453 
455 {
456  //m_t << "<hr><h4><font color=\"red\">Old parser:</font></h4>\n";
457 }
458 
460 {
461  if (m_hide) return;
462  m_t << "<simplesect kind=\"";
463  switch(s->type())
464  {
465  case DocSimpleSect::See:
466  m_t << "see"; break;
467  case DocSimpleSect::Return:
468  m_t << "return"; break;
469  case DocSimpleSect::Author:
470  m_t << "author"; break;
472  m_t << "authors"; break;
474  m_t << "version"; break;
475  case DocSimpleSect::Since:
476  m_t << "since"; break;
477  case DocSimpleSect::Date:
478  m_t << "date"; break;
479  case DocSimpleSect::Note:
480  m_t << "note"; break;
482  m_t << "warning"; break;
483  case DocSimpleSect::Pre:
484  m_t << "pre"; break;
485  case DocSimpleSect::Post:
486  m_t << "post"; break;
488  m_t << "copyright"; break;
490  m_t << "invariant"; break;
492  m_t << "remark"; break;
494  m_t << "attention"; break;
495  case DocSimpleSect::User:
496  m_t << "par"; break;
497  case DocSimpleSect::Rcs:
498  m_t << "rcs"; break;
499  case DocSimpleSect::Unknown: break;
500  }
501  m_t << "\">";
502 }
503 
505 {
506  if (m_hide) return;
507  m_t << "</simplesect>\n";
508 }
509 
511 {
512  if (m_hide) return;
513  m_t << "<title>";
514 }
515 
517 {
518  if (m_hide) return;
519  m_t << "</title>";
520 }
521 
523 {
524  if (m_hide) return;
525  m_t << "<itemizedlist>\n";
526 }
527 
529 {
530  if (m_hide) return;
531  m_t << "</itemizedlist>\n";
532 }
533 
535 {
536  if (m_hide) return;
537  m_t << "<listitem>";
538 }
539 
541 {
542  if (m_hide) return;
543  m_t << "</listitem>\n";
544 }
545 
547 {
548  if (m_hide) return;
549  m_t << "<sect" << s->level() << " id=\"" << s->file();
550  if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
551  m_t << "\">" << endl;
552  m_t << "<title>";
554  m_t << "</title>" << endl;
555 }
556 
558 {
559  m_t << "</sect" << s->level() << ">\n";
560 }
561 
563 {
564  if (m_hide) return;
565  if (s->type()==DocHtmlList::Ordered)
566  m_t << "<orderedlist>\n";
567  else
568  m_t << "<itemizedlist>\n";
569 }
570 
572 {
573  if (m_hide) return;
574  if (s->type()==DocHtmlList::Ordered)
575  m_t << "</orderedlist>\n";
576  else
577  m_t << "</itemizedlist>\n";
578 }
579 
581 {
582  if (m_hide) return;
583  m_t << "<listitem>\n";
584 }
585 
587 {
588  if (m_hide) return;
589  m_t << "</listitem>\n";
590 }
591 
593 {
594  if (m_hide) return;
595  m_t << "<variablelist>\n";
596 }
597 
599 {
600  if (m_hide) return;
601  m_t << "</variablelist>\n";
602 }
603 
605 {
606  if (m_hide) return;
607  m_t << "<varlistentry><term>";
608 }
609 
611 {
612  if (m_hide) return;
613  m_t << "</term></varlistentry>\n";
614 }
615 
617 {
618  if (m_hide) return;
619  m_t << "<listitem>";
620 }
621 
623 {
624  if (m_hide) return;
625  m_t << "</listitem>\n";
626 }
627 
629 {
630  if (m_hide) return;
631  m_t << "<table rows=\"" << t->numRows()
632  << "\" cols=\"" << t->numColumns() << "\">" ;
633 }
634 
636 {
637  if (m_hide) return;
638  m_t << "</table>\n";
639 }
640 
642 {
643  if (m_hide) return;
644  m_t << "<row>\n";
645 }
646 
648 {
649  if (m_hide) return;
650  m_t << "</row>\n";
651 }
652 
654 {
655  if (m_hide) return;
656  if (c->isHeading()) m_t << "<entry thead=\"yes\">"; else m_t << "<entry thead=\"no\">";
657 }
658 
660 {
661  if (m_hide) return;
662  m_t << "</entry>";
663 }
664 
666 {
667  if (m_hide) return;
668  m_t << "<caption>";
669 }
670 
672 {
673  if (m_hide) return;
674  m_t << "</caption>\n";
675 }
676 
678 {
679  if (m_hide) return;
680  m_t << "<internal>";
681 }
682 
684 {
685  if (m_hide) return;
686  m_t << "</internal>" << endl;
687 }
688 
690 {
691  if (m_hide) return;
692  m_t << "<ulink url=\"";
693  filter(href->url());
694  m_t << "\">";
695 }
696 
698 {
699  if (m_hide) return;
700  m_t << "</ulink>";
701 }
702 
704 {
705  if (m_hide) return;
706  m_t << "<heading level=\"" << header->level() << "\">";
707 }
708 
710 {
711  if (m_hide) return;
712  m_t << "</heading>\n";
713 }
714 
716 {
717  if (m_hide) return;
718 
719  QCString baseName=img->name();
720  int i;
721  if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
722  {
723  baseName=baseName.right(baseName.length()-i-1);
724  }
725  visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height());
726 
727  // copy the image to the output dir
728  QFile inImage(img->name());
729  QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.data());
730  if (inImage.open(IO_ReadOnly))
731  {
732  if (outImage.open(IO_WriteOnly))
733  {
734  char *buffer = new char[inImage.size()];
735  inImage.readBlock(buffer,inImage.size());
736  outImage.writeBlock(buffer,inImage.size());
737  outImage.flush();
738  delete[] buffer;
739  }
740  }
741 }
742 
744 {
745  if (m_hide) return;
746  visitPostEnd(m_t, "image");
747 }
748 
750 {
751  if (m_hide) return;
752  visitPreStart(m_t, "dotfile", FALSE, this, df->children(), df->file(), FALSE, DocImage::Html, df->width(), df->height());
753 }
754 
756 {
757  if (m_hide) return;
758  visitPostEnd(m_t, "dotfile");
759 }
760 
762 {
763  if (m_hide) return;
764  visitPreStart(m_t, "mscfile", FALSE, this, df->children(), df->file(), FALSE, DocImage::Html, df->width(), df->height());
765 }
766 
768 {
769  if (m_hide) return;
770  visitPostEnd(m_t, "mscfile");
771 }
772 
774 {
775  if (m_hide) return;
776  visitPreStart(m_t, "diafile", FALSE, this, df->children(), df->file(), FALSE, DocImage::Html, df->width(), df->height());
777 }
778 
780 {
781  if (m_hide) return;
782  visitPostEnd(m_t, "diafile");
783 }
784 
786 {
787  if (m_hide) return;
788  startLink(lnk->ref(),lnk->file(),lnk->anchor());
789 }
790 
792 {
793  if (m_hide) return;
794  endLink();
795 }
796 
798 {
799  if (m_hide) return;
800  if (!ref->file().isEmpty())
801  {
802  startLink(ref->ref(),ref->file(),ref->isSubPage() ? QCString() : ref->anchor());
803  }
804  if (!ref->hasLinkText()) filter(ref->targetTitle());
805 }
806 
808 {
809  if (m_hide) return;
810  if (!ref->file().isEmpty()) endLink();
811  //m_t << " ";
812 }
813 
815 {
816  if (m_hide) return;
817  m_t << "<tocitem id=\"" << ref->file() << "_1" << ref->anchor() << "\">";
818 }
819 
821 {
822  if (m_hide) return;
823  m_t << "</tocitem>" << endl;
824 }
825 
827 {
828  if (m_hide) return;
829  m_t << "<toclist>" << endl;
830 }
831 
833 {
834  if (m_hide) return;
835  m_t << "</toclist>" << endl;
836 }
837 
838 //void XmlDocVisitor::visitPre(DocLanguage *l)
839 //{
840 // if (m_hide) return;
841 // m_t << "<language langid=\"" << l->id() << "\">";
842 //}
843 //
844 //void XmlDocVisitor::visitPost(DocLanguage *)
845 //{
846 // if (m_hide) return;
847 // m_t << "</language>" << endl;
848 //}
849 
851 {
852  if (m_hide) return;
853  m_t << "<parameterlist kind=\"";
854  switch(s->type())
855  {
856  case DocParamSect::Param:
857  m_t << "param"; break;
858  case DocParamSect::RetVal:
859  m_t << "retval"; break;
861  m_t << "exception"; break;
863  m_t << "templateparam"; break;
864  default:
865  ASSERT(0);
866  }
867  m_t << "\">";
868 }
869 
871 {
872  if (m_hide) return;
873  m_t << "</parameterlist>" << endl;
874 }
875 
877 {
878  if (m_hide) return;
879  m_t << "<parameteritem>" << endl;
880  m_t << "<parameternamelist>" << endl;
881  //QStrListIterator li(pl->parameters());
882  //const char *s;
884  DocNode *param;
885  for (li.toFirst();(param=li.current());++li)
886  {
887  if (pl->paramTypes().count()>0)
888  {
890  DocNode *type;
891  for (li.toFirst();(type=li.current());++li)
892  {
893  m_t << "<parametertype>";
894  if (type->kind()==DocNode::Kind_Word)
895  {
896  visit((DocWord*)type);
897  }
898  else if (type->kind()==DocNode::Kind_LinkedWord)
899  {
900  visit((DocLinkedWord*)type);
901  }
902  m_t << "</parametertype>" << endl;
903  }
904  }
905  m_t << "<parametername";
907  {
908  m_t << " direction=\"";
909  if (pl->direction()==DocParamSect::In)
910  {
911  m_t << "in";
912  }
913  else if (pl->direction()==DocParamSect::Out)
914  {
915  m_t << "out";
916  }
917  else if (pl->direction()==DocParamSect::InOut)
918  {
919  m_t << "inout";
920  }
921  m_t << "\"";
922  }
923  m_t << ">";
924  if (param->kind()==DocNode::Kind_Word)
925  {
926  visit((DocWord*)param);
927  }
928  else if (param->kind()==DocNode::Kind_LinkedWord)
929  {
930  visit((DocLinkedWord*)param);
931  }
932  m_t << "</parametername>" << endl;
933  }
934  m_t << "</parameternamelist>" << endl;
935  m_t << "<parameterdescription>" << endl;
936 }
937 
939 {
940  if (m_hide) return;
941  m_t << "</parameterdescription>" << endl;
942  m_t << "</parameteritem>" << endl;
943 }
944 
946 {
947  if (m_hide) return;
948  if (x->title().isEmpty()) return;
949  m_t << "<xrefsect id=\"";
950  m_t << x->file() << "_1" << x->anchor();
951  m_t << "\">";
952  m_t << "<xreftitle>";
953  filter(x->title());
954  m_t << "</xreftitle>";
955  m_t << "<xrefdescription>";
956 }
957 
959 {
960  if (m_hide) return;
961  if (x->title().isEmpty()) return;
962  m_t << "</xrefdescription>";
963  m_t << "</xrefsect>";
964 }
965 
967 {
968  if (m_hide) return;
969  startLink(0,ref->file(),ref->anchor());
970 }
971 
973 {
974  if (m_hide) return;
975  endLink();
976  m_t << " ";
977 }
978 
980 {
981  if (m_hide) return;
982  m_t << "<copydoc link=\"" << convertToXML(c->link()) << "\">";
983 }
984 
986 {
987  if (m_hide) return;
988  m_t << "</copydoc>" << endl;
989 }
990 
992 {
993 }
994 
996 {
997 }
998 
1000 {
1001  if (m_hide) return;
1002  m_t << "<blockquote>";
1003 }
1004 
1006 {
1007  if (m_hide) return;
1008  m_t << "</blockquote>";
1009 }
1010 
1012 {
1013 }
1014 
1016 {
1017 }
1018 
1020 {
1021  if (m_hide) return;
1022  m_t << "<parblock>";
1023 }
1024 
1026 {
1027  if (m_hide) return;
1028  m_t << "</parblock>";
1029 }
1030 
1031 
1032 void XmlDocVisitor::filter(const char *str)
1033 {
1034  m_t << convertToXML(str);
1035 }
1036 
1038 {
1039  //printf("XmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
1040  m_t << "<ref refid=\"" << file;
1041  if (!anchor.isEmpty()) m_t << "_1" << anchor;
1042  m_t << "\" kindref=\"";
1043  if (!anchor.isEmpty()) m_t << "member"; else m_t << "compound";
1044  m_t << "\"";
1045  if (!ref.isEmpty()) m_t << " external=\"" << ref << "\"";
1046  m_t << ">";
1047 }
1048 
1050 {
1051  m_t << "</ref>";
1052 }
1053 
1055 {
1056  m_enabled.push(new bool(m_hide));
1057 }
1058 
1060 {
1061  bool *v=m_enabled.pop();
1062  ASSERT(v!=0);
1063  m_hide = *v;
1064  delete v;
1065 }
1066 
static QCString name
Definition: declinfo.cpp:673
QCString convertToXML(const char *s)
Definition: util.cpp:5717
DocNode * parent() const
Definition: docparser.h:147
QCString exampleFile() const
Definition: docparser.h:454
QCString file() const
Definition: docparser.h:946
Type type() const
Definition: docparser.h:532
Type type() const
Definition: docparser.h:1034
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
QCString name() const
Definition: docparser.h:695
QCString file() const
Definition: docparser.h:723
void visitPre(DocAutoList *)
QCString anchor() const
Definition: docparser.h:830
QCString ref() const
Definition: docparser.h:219
QCString anchor() const
Definition: docparser.h:277
QCString url() const
Definition: docparser.h:239
QCString width() const
Definition: docparser.h:697
QCString text() const
Definition: docparser.h:296
bool isFirst() const
Definition: docparser.h:537
void visit(DocWord *)
bool isEmpty() const
Definition: qcstring.h:189
QCString file() const
Definition: docparser.h:747
QCString file() const
Definition: docparser.h:966
static TemplateVariant parseCode(MemberDef *md, const QCString &scopeName, const QCString &relPath, const QCString &code, int startLine=-1, int endLine=-1, bool showLineNumbers=FALSE)
Definition: context.cpp:1266
uint length() const
Definition: qcstring.h:195
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition: util.cpp:5822
bool isEmail() const
Definition: docparser.h:242
int level() const
Definition: docparser.h:942
QCString anchor() const
Definition: docparser.h:944
#define IO_WriteOnly
Definition: qiodevice.h:62
void filter(const char *str)
QCString blockId() const
Definition: docparser.h:505
QCString text() const
Definition: docparser.h:503
QCString file() const
Definition: docparser.h:278
Type type() const
Definition: docparser.h:1101
const bool FALSE
Definition: qglobal.h:370
const char * xml(DocSymbol::SymType symb) const
Access routine to the XML code of the HTML entity.
Definition: htmlentity.cpp:404
int readBlock(char *data, uint len)
Definition: qfile_unix.cpp:473
const QList< DocNode > & paramTypes()
Definition: docparser.h:1170
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QCString file() const
Definition: docparser.h:827
Type type() const
Definition: docparser.h:502
virtual Kind kind() const =0
QCString anchor() const
Definition: docparser.h:859
QCString ref() const
Definition: docparser.h:294
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString anchor() const
Definition: docparser.h:967
QCString width() const
Definition: docparser.h:459
QCString height() const
Definition: docparser.h:698
void push(const type *d)
Definition: qstack.h:58
QCString exampleFile() const
Definition: docparser.h:542
QCString extractBlock(const QCString text, const QCString marker)
Definition: util.cpp:7998
#define IO_ReadOnly
Definition: qiodevice.h:61
int level() const
Definition: docparser.h:894
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:90
bool isExample() const
Definition: docparser.h:453
QCString height() const
Definition: docparser.h:460
bool isSubPage() const
Definition: docparser.h:836
CodeOutputInterface & m_ci
static ParserManager * parserManager
Definition: doxygen.h:141
QCString targetTitle() const
Definition: docparser.h:831
def cli(ctx)
Definition: main.py:7
uint count() const
Definition: qlist.h:66
QCString height() const
Definition: docparser.h:775
QCString file() const
Definition: docparser.h:292
QCString file() const
Definition: docparser.h:771
QCString ref() const
Definition: docparser.h:829
QCString file() const
Definition: docparser.h:857
QCString text() const
Definition: docparser.h:450
QCString text() const
Definition: docparser.h:563
QCString width() const
Definition: docparser.h:726
QCString anchor() const
Definition: docparser.h:670
QCString word() const
Definition: docparser.h:199
QCString right(uint len) const
Definition: qcstring.cpp:231
std::void_t< T > n
void startLink(const QCString &ref, const QCString &file, const QCString &anchor)
bool isExample() const
Definition: docparser.h:541
QCString context() const
Definition: docparser.h:535
QCString height() const
Definition: docparser.h:751
const QList< DocNode > & children() const
Definition: docparser.h:461
QCString text() const
Definition: docparser.h:533
A bunch of utility functions.
bool isLast() const
Definition: docparser.h:538
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
type * current() const
Definition: qlist.h:146
QCString url() const
Definition: docparser.h:876
QCString width() const
Definition: docparser.h:750
Concrete visitor implementation for XML output.
Definition: xmldocvisitor.h:31
Type type() const
Definition: docparser.h:1057
Style style() const
Definition: docparser.h:329
bool isHeading() const
Definition: docparser.h:1260
int id() const
Definition: docparser.h:565
void err(const char *fmt,...)
Definition: message.cpp:226
QCString entry() const
Definition: docparser.h:586
bool isExample() const
Definition: docparser.h:506
type * pop()
Definition: qstack.h:59
QStack< bool > m_enabled
QCString word() const
Definition: docparser.h:215
static void visitPreStart(FTextStream &t, const char *cmd, const bool doCaption, XmlDocVisitor *parent, QList< DocNode > children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height)
QCString language() const
Definition: docparser.h:456
FTextStream & m_t
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
DocParamSect::Direction direction() const
Definition: docparser.h:1172
QCString title() const
Definition: docparser.h:943
uint numRows() const
Definition: docparser.h:1352
QCString link() const
Definition: docparser.h:605
QCString file() const
Definition: docparser.h:495
const QList< DocNode > & parameters()
Definition: docparser.h:1169
QCString context() const
Definition: docparser.h:451
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
QCString height() const
Definition: docparser.h:727
bool isEnumList() const
Definition: docparser.h:621
SymType symbol() const
Definition: docparser.h:418
QCString file() const
Definition: docparser.h:669
bool hasLinkText() const
Definition: docparser.h:832
static QCString type
Definition: declinfo.cpp:672
XmlDocVisitor(FTextStream &t, CodeOutputInterface &ci)
QCString exampleFile() const
Definition: docparser.h:507
QCString context() const
Definition: docparser.h:504
QCString anchor() const
Definition: docparser.h:295
list x
Definition: train.py:276
QCString file() const
Definition: docparser.h:217
const int DocVisitor_XML
Definition: docvisitor.h:25
bool enable() const
Definition: docparser.h:331
bool hasCaption() const
Definition: docparser.h:458
QCString chars() const
Definition: docparser.h:434
list cmd
Definition: getreco.py:22
QCString width() const
Definition: docparser.h:774
QCString title() const
Definition: docparser.h:671
static QCString baseName
Definition: scanner.cpp:10890
QCString extension() const
Definition: docparser.h:496
static void visitPostEnd(FTextStream &t, const char *cmd)
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
Type type() const
Definition: docparser.h:449
void visitPost(DocAutoList *)
Type type() const
Definition: docparser.h:694
QCString anchor() const
Definition: docparser.h:220
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
virtual void accept(DocVisitor *v)=0
static void visitCaption(XmlDocVisitor *parent, QList< DocNode > children)
static QCString * s
Definition: config.cpp:1042
def parent(G, child, parent_type)
Definition: graph.py:67
const bool TRUE
Definition: qglobal.h:371
static QCString str
virtual QCString anchor() const =0
QTextStream & endl(QTextStream &s)
uint numColumns() const
Definition: docparser.h:1357
QCString m_langExt
#define ASSERT(x)
Definition: qglobal.h:590
const QList< DocNode > & children() const
Definition: docparser.h:185
type * toFirst()
Definition: qlist.h:135