Doxygen
htmldocvisitor.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 "htmldocvisitor.h"
17 #include "docparser.h"
18 #include "language.h"
19 #include "doxygen.h"
20 #include "outputgen.h"
21 #include "dot.h"
22 #include "message.h"
23 #include "config.h"
24 #include "htmlgen.h"
25 #include "parserintf.h"
26 #include "msc.h"
27 #include "dia.h"
28 #include "util.h"
29 #include "vhdldocgen.h"
30 #include "filedef.h"
31 #include "memberdef.h"
32 #include "htmlentity.h"
33 #include "emoji.h"
34 #include "plantuml.h"
35 #include "formula.h"
36 #include "fileinfo.h"
37 
38 static const int NUM_HTML_LIST_TYPES = 4;
39 static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"};
41 {
42  NONE, // 0
43  STARTLI, // 1
44  STARTDD, // 2
45  ENDLI, // 3
46  ENDDD, // 4
47  STARTTD, // 5
48  ENDTD, // 6
49  INTERLI, // 7
50  INTERDD, // 8
51  INTERTD // 9
52 };
53 static const char *contexts[10] =
54 { "", // 0
55  "startli", // 1
56  "startdd", // 2
57  "endli", // 3
58  "enddd", // 4
59  "starttd", // 5
60  "endtd", // 6
61  "interli", // 7
62  "interdd", // 8
63  "intertd" // 9
64 };
65 static const char *hex="0123456789ABCDEF";
66 
68 {
69  static int cnt = 0;
70  QCString result="a";
71  QCString cntStr;
72  result += cntStr.setNum(cnt);
73  result += "_";
74  cnt++;
75  const char *str = word.data();
76  unsigned char c;
77  if (str)
78  {
79  while ((c = *str++))
80  {
81  if ((c >= 'a' && c <= 'z') || // ALPHA
82  (c >= 'A' && c <= 'Z') || // ALPHA
83  (c >= '0' && c <= '9') || // DIGIT
84  c == '-' ||
85  c == '.' ||
86  c == '_'
87  )
88  {
89  result += c;
90  }
91  else
92  {
93  char enc[4];
94  enc[0] = ':';
95  enc[1] = hex[(c & 0xf0) >> 4];
96  enc[2] = hex[c & 0xf];
97  enc[3] = 0;
98  result += enc;
99  }
100  }
101  }
102  return result;
103 }
104 
105 static bool mustBeOutsideParagraph(const DocNode *n)
106 {
107  switch (n->kind())
108  {
109  /* <ul> */
113  /* <dl> */
118  /* <table> */
120  /* <h?> */
123  /* \internal */
125  /* <div> */
128  /* <hr> */
130  /* CopyDoc gets paragraph markers from the wrapping DocPara node,
131  * but needs to insert them for all documentation being copied to
132  * preserve formatting.
133  */
134  case DocNode::Kind_Copy:
135  /* <blockquote> */
137  /* \parblock */
140  return TRUE;
142  {
143  DocVerbatim *dv = (DocVerbatim*)n;
144  return dv->type()!=DocVerbatim::HtmlOnly || dv->isBlock();
145  }
147  return ((DocStyleChange*)n)->style()==DocStyleChange::Preformatted ||
148  ((DocStyleChange*)n)->style()==DocStyleChange::Div ||
149  ((DocStyleChange*)n)->style()==DocStyleChange::Center;
151  return !((DocFormula*)n)->isInline();
152  case DocNode::Kind_Image:
153  return !((DocImage*)n)->isInlineImage();
154  default:
155  break;
156  }
157  return FALSE;
158 }
159 
160 static bool isDocVerbatimVisible(const DocVerbatim *s)
161 {
162  switch(s->type())
163  {
169  return FALSE;
170  default:
171  return TRUE;
172  }
173 }
174 
175 static bool isDocIncludeVisible(const DocInclude *s)
176 {
177  switch (s->type())
178  {
185  return FALSE;
186  default:
187  return TRUE;
188  }
189 }
190 
192 {
193  switch (s->type())
194  {
196  return FALSE;
197  default:
198  return TRUE;
199  }
200 }
201 
202 static bool isInvisibleNode(const DocNode *node)
203 {
204  return (node->kind()==DocNode::Kind_WhiteSpace)
205  || // skip over image nodes that are not for HTML output
206  (node->kind()==DocNode::Kind_Image && ((DocImage*)node)->type()!=DocImage::Html)
207  || // skip over verbatim nodes that are not visible in the HTML output
208  (node->kind()==DocNode::Kind_Verbatim && !isDocVerbatimVisible((DocVerbatim*)node))
209  || // skip over include nodes that are not visible in the HTML output
211  || // skip over include operator nodes that are not visible in the HTML output
213  ;
214 }
215 
216 static void mergeHtmlAttributes(const HtmlAttribList &attribs, HtmlAttribList &mergeInto)
217 {
218  for (const auto &att : attribs)
219  {
220  auto it = std::find_if(mergeInto.begin(),mergeInto.end(),
221  [&att](const auto &opt) { return opt.name==att.name; });
222  if (it!=mergeInto.end()) // attribute name already in mergeInto
223  {
224  it->value = it->value + " " + att.value;
225  }
226  else // attribute name not yet in mergeInto
227  {
228  mergeInto.push_back(att);
229  }
230  }
231 }
232 
233 static QCString htmlAttribsToString(const HtmlAttribList &attribs, QCString *pAltValue = 0)
234 {
235  QCString result;
236  for (const auto &att : attribs)
237  {
238  if (!att.value.isEmpty()) // ignore attribute without values as they
239  // are not XHTML compliant, with the exception
240  // of the alt attribute with the img tag
241  {
242  if (att.name=="alt" && pAltValue) // optionally return the value of alt separately
243  // need to convert <img> to <object> for SVG images,
244  // which do not support the alt attribute
245  {
246  *pAltValue = att.value;
247  }
248  else
249  {
250  result+=" ";
251  result+=att.name;
252  result+="=\""+convertToXML(att.value)+"\"";
253  }
254  }
255  else if (att.name=="nowrap") // In XHTML, attribute minimization is forbidden, and the nowrap attribute must be defined as <td nowrap="nowrap">.
256  {
257  result+=" ";
258  result+=att.name;
259  result+="=\"nowrap\"";
260  }
261  }
262  return result;
263 }
264 
265 //-------------------------------------------------------------------------
266 
268  const Definition *ctx)
269  : DocVisitor(DocVisitor_Html), m_t(t), m_ci(ci), m_insidePre(FALSE),
270  m_hide(FALSE), m_ctx(ctx)
271 {
272  if (ctx) m_langExt=ctx->getDefFileExtension();
273 }
274 
275  //--------------------------------------
276  // visitor functions for leaf nodes
277  //--------------------------------------
278 
280 {
281  //printf("word: %s\n",qPrint(w->word()));
282  if (m_hide) return;
283  filter(w->word());
284 }
285 
287 {
288  if (m_hide) return;
289  //printf("linked word: %s\n",qPrint(w->word()));
290  startLink(w->ref(),w->file(),w->relPath(),w->anchor(),w->tooltip());
291  filter(w->word());
292  endLink();
293 }
294 
296 {
297  if (m_hide) return;
298  if (m_insidePre)
299  {
300  m_t << w->chars();
301  }
302  else
303  {
304  m_t << " ";
305  }
306 }
307 
309 {
310  if (m_hide) return;
311  const char *res = HtmlEntityMapper::instance()->html(s->symbol());
312  if (res)
313  {
314  m_t << res;
315  }
316  else
317  {
318  err("HTML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
319  }
320 }
321 
323 {
324  if (m_hide) return;
325  const char *res = EmojiEntityMapper::instance()->unicode(s->index());
326  if (res)
327  {
328  m_t << "<span class=\"emoji\">"<<res<<"</span>";
329  }
330  else
331  {
332  m_t << s->name();
333  }
334 }
335 
337 {
338  m_t << "<a href=\"#\" onclick=\"location.href='mai'+'lto:'";
339  uint i;
340  int size=3;
341  for (i=0;i<url.length();)
342  {
343  m_t << "+'" << url.mid(i,size) << "'";
344  i+=size;
345  if (size==3) size=2; else size=3;
346  }
347  m_t << "; return false;\">";
348 }
349 
351 {
352  if (m_hide) return;
353  if (u->isEmail()) // mail address
354  {
355  QCString url = u->url();
357  uint size=5,i;
358  for (i=0;i<url.length();)
359  {
360  filter(url.mid(i,size));
361  if (i<url.length()-size) m_t << "<span style=\"display: none;\">.nosp@m.</span>";
362  i+=size;
363  if (size==5) size=4; else size=5;
364  }
365  m_t << "</a>";
366  }
367  else // web address
368  {
369  m_t << "<a href=\"";
370  m_t << u->url() << "\">";
371  filter(u->url());
372  m_t << "</a>";
373  }
374 }
375 
377 {
378  if (m_hide) return;
379  m_t << "<br "<< htmlAttribsToString(br->attribs()) << " />\n";
380 }
381 
383 {
384  if (m_hide) return;
385  forceEndParagraph(hr);
386  m_t << "<hr "<< htmlAttribsToString(hr->attribs()) << " />\n";
388 }
389 
391 {
392  if (m_hide) return;
393  switch (s->style())
394  {
396  if (s->enable()) m_t << "<b" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</b>";
397  break;
398  case DocStyleChange::S:
399  if (s->enable()) m_t << "<s" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</s>";
400  break;
402  if (s->enable()) m_t << "<strike" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</strike>";
403  break;
404  case DocStyleChange::Del:
405  if (s->enable()) m_t << "<del" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</del>";
406  break;
408  if (s->enable()) m_t << "<u" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</u>";
409  break;
410  case DocStyleChange::Ins:
411  if (s->enable()) m_t << "<ins" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</ins>";
412  break;
414  if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>";
415  break;
417  if (s->enable()) m_t << "<code" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</code>";
418  break;
420  if (s->enable()) m_t << "<sub" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sub>";
421  break;
423  if (s->enable()) m_t << "<sup" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sup>";
424  break;
426  if (s->enable())
427  {
429  m_t << "<center" << htmlAttribsToString(s->attribs()) << ">";
430  }
431  else
432  {
433  m_t << "</center>";
435  }
436  break;
438  if (s->enable()) m_t << "<small" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</small>";
439  break;
441  if (s->enable())
442  {
444  m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">";
446  }
447  else
448  {
450  m_t << "</pre>";
452  }
453  break;
454  case DocStyleChange::Div:
455  if (s->enable())
456  {
458  m_t << "<div" << htmlAttribsToString(s->attribs()) << ">";
459  }
460  else
461  {
462  m_t << "</div>";
464  }
465  break;
467  if (s->enable()) m_t << "<span" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</span>";
468  break;
469 
470  }
471 }
472 
473 
475 {
476  if (s->hasCaption())
477  {
478  t << "<div class=\"caption\">\n";
479  }
480 }
481 
482 
484 {
485  if (s->hasCaption())
486  {
487  t << "</div>\n";
488  }
489 }
490 
491 
492 static void visitCaption(HtmlDocVisitor *parent, DocNodeList &children)
493 {
494  for (const auto &n : children) n->accept(parent);
495 }
496 
498 {
499  if (m_hide) return;
500  QCString lang = m_langExt;
501  if (!s->language().isEmpty()) // explicit language setting
502  {
503  lang = s->language();
504  }
505  SrcLangExt langExt = getLanguageFromCodeLang(lang);
506  switch(s->type())
507  {
508  case DocVerbatim::Code:
510  m_ci.startCodeFragment("DoxyCode");
512  s->context(),
513  s->text(),
514  langExt,
515  s->isExample(),
516  s->exampleFile(),
517  0, // fileDef
518  -1, // startLine
519  -1, // endLine
520  FALSE, // inlineFragment
521  0, // memberDef
522  TRUE, // show line numbers
523  m_ctx // search context
524  );
525  m_ci.endCodeFragment("DoxyCode");
527  break;
530  m_t << "<pre class=\"fragment\">";
531  filter(s->text());
532  m_t << "</pre>";
534  break;
536  {
537  if (s->isBlock()) forceEndParagraph(s);
538  m_t << s->text();
539  if (s->isBlock()) forceStartParagraph(s);
540  }
541  break;
547  /* nothing */
548  break;
549 
550  case DocVerbatim::Dot:
551  {
552  static int dotindex = 1;
553  QCString fileName(4096);
554 
556  fileName.sprintf("%s%d%s",
557  qPrint(Config_getString(HTML_OUTPUT)+"/inline_dotgraph_"),
558  dotindex++,
559  ".dot"
560  );
561  std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
562  if (!file.is_open())
563  {
564  err("Could not open file %s for writing\n",qPrint(fileName));
565  }
566  else
567  {
568  QCString stext = s->text();
569  file.write( stext.data(), stext.length() );
570  file.close();
571 
572  m_t << "<div class=\"dotgraph\">\n";
573  writeDotFile(fileName,s->relPath(),s->context(),s->srcFile(),s->srcLine());
574  visitPreCaption(m_t, s);
575  visitCaption(this, s->children());
576  visitPostCaption(m_t, s);
577  m_t << "</div>\n";
578 
579  if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
580  }
582  }
583  break;
584  case DocVerbatim::Msc:
585  {
587 
588  static int mscindex = 1;
589  QCString baseName(4096);
590 
591  baseName.sprintf("%s%d",
592  qPrint(Config_getString(HTML_OUTPUT)+"/inline_mscgraph_"),
593  mscindex++
594  );
595  std::ofstream file(baseName.str()+".msc",std::ofstream::out | std::ofstream::binary);
596  if (!file.is_open())
597  {
598  err("Could not open file %s.msc for writing\n",qPrint(baseName));
599  }
600  else
601  {
602  QCString text = "msc {";
603  text+=s->text();
604  text+="}";
605 
606  file.write( text.data(), text.length() );
607  file.close();
608 
609  m_t << "<div class=\"mscgraph\">\n";
610  writeMscFile(baseName+".msc",s->relPath(),s->context(),s->srcFile(),s->srcLine());
611  visitPreCaption(m_t, s);
612  visitCaption(this, s->children());
613  visitPostCaption(m_t, s);
614  m_t << "</div>\n";
615 
616  if (Config_getBool(DOT_CLEANUP)) Dir().remove(baseName.str()+".msc");
617  }
619  }
620  break;
622  {
624  static QCString htmlOutput = Config_getString(HTML_OUTPUT);
625  QCString imgExt = getDotImageExtension();
626  PlantumlManager::OutputFormat format = PlantumlManager::PUML_BITMAP; // default : PUML_BITMAP
627  if (imgExt=="svg")
628  {
629  format = PlantumlManager::PUML_SVG;
630  }
632  htmlOutput,s->exampleFile(),
633  s->text(),format,s->engine(),s->srcFile(),s->srcLine());
634  m_t << "<div class=\"plantumlgraph\">\n";
635  writePlantUMLFile(baseName,s->relPath(),s->context(),s->srcFile(),s->srcLine());
636  visitPreCaption(m_t, s);
637  visitCaption(this, s->children());
638  visitPostCaption(m_t, s);
639  m_t << "</div>\n";
641  }
642  break;
643  }
644 }
645 
647 {
648  if (m_hide) return;
649  m_t << "<a class=\"anchor\" id=\"" << anc->anchor() << "\"" << htmlAttribsToString(anc->attribs()) << "></a>";
650 }
651 
653 {
654  if (m_hide) return;
655  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
656  switch(inc->type())
657  {
658  case DocInclude::Include:
659  forceEndParagraph(inc);
660  m_ci.startCodeFragment("DoxyCode");
662  inc->context(),
663  inc->text(),
664  langExt,
665  inc->isExample(),
666  inc->exampleFile(),
667  0, // fileDef
668  -1, // startLine
669  -1, // endLine
670  TRUE, // inlineFragment
671  0, // memberDef
672  FALSE, // show line numbers
673  m_ctx // search context
674  );
675  m_ci.endCodeFragment("DoxyCode");
676  forceStartParagraph(inc);
677  break;
679  {
680  forceEndParagraph(inc);
681  m_ci.startCodeFragment("DoxyCode");
682  FileInfo cfi( inc->file().str() );
683  FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
685  inc->context(),
686  inc->text(),
687  langExt,
688  inc->isExample(),
689  inc->exampleFile(),
690  fd, // fileDef,
691  -1, // start line
692  -1, // end line
693  FALSE, // inline fragment
694  0, // memberDef
695  TRUE, // show line numbers
696  m_ctx // search context
697  );
698  delete fd;
699  m_ci.endCodeFragment("DoxyCode");
700  forceStartParagraph(inc);
701  }
702  break;
710  break;
712  {
713  if (inc->isBlock()) forceEndParagraph(inc);
714  m_t << inc->text();
715  if (inc->isBlock()) forceStartParagraph(inc);
716  }
717  break;
719  forceEndParagraph(inc);
720  m_t << "<pre class=\"fragment\">";
721  filter(inc->text());
722  m_t << "</pre>";
723  forceStartParagraph(inc);
724  break;
725  case DocInclude::Snippet:
726  {
727  forceEndParagraph(inc);
728  m_ci.startCodeFragment("DoxyCode");
730  inc->context(),
731  extractBlock(inc->text(),inc->blockId()),
732  langExt,
733  inc->isExample(),
734  inc->exampleFile(),
735  0,
736  -1, // startLine
737  -1, // endLine
738  TRUE, // inlineFragment
739  0, // memberDef
740  FALSE, // show line number
741  m_ctx // search context
742  );
743  m_ci.endCodeFragment("DoxyCode");
744  forceStartParagraph(inc);
745  }
746  break;
748  {
749  forceEndParagraph(inc);
750  m_ci.startCodeFragment("DoxyCode");
751  FileInfo cfi( inc->file().str() );
752  FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
754  inc->context(),
755  extractBlock(inc->text(),inc->blockId()),
756  langExt,
757  inc->isExample(),
758  inc->exampleFile(),
759  fd,
760  lineBlock(inc->text(),inc->blockId()),
761  -1, // endLine
762  FALSE, // inlineFragment
763  0, // memberDef
764  TRUE, // show line number
765  m_ctx // search context
766  );
767  delete fd;
768  m_ci.endCodeFragment("DoxyCode");
769  forceStartParagraph(inc);
770  }
771  break;
774  err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
775  "Please create a bug report\n",__FILE__);
776  break;
777  }
778 }
779 
781 {
782  //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
783  // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
784  if (op->isFirst())
785  {
786  forceEndParagraph(op);
787  if (!m_hide) m_ci.startCodeFragment("DoxyCode");
789  m_hide=TRUE;
790  }
791  QCString locLangExt = getFileNameExtension(op->includeFileName());
792  if (locLangExt.isEmpty()) locLangExt = m_langExt;
793  SrcLangExt langExt = getLanguageFromFileName(locLangExt);
794  if (op->type()!=DocIncOperator::Skip)
795  {
796  m_hide = popHidden();
797  if (!m_hide)
798  {
799  FileDef *fd = 0;
800  if (!op->includeFileName().isEmpty())
801  {
802  FileInfo cfi( op->includeFileName().str() );
803  fd = createFileDef( cfi.dirPath(), cfi.fileName() );
804  }
805  getCodeParser(locLangExt).parseCode(
806  m_ci,
807  op->context(),
808  op->text(),
809  langExt,
810  op->isExample(),
811  op->exampleFile(),
812  fd, // fileDef
813  op->line(), // startLine
814  -1, // endLine
815  FALSE, // inline fragment
816  0, // memberDef
817  op->showLineNo(), // show line numbers
818  m_ctx // search context
819  );
820  if (fd) delete fd;
821  }
823  m_hide=TRUE;
824  }
825  if (op->isLast())
826  {
827  m_hide = popHidden();
828  if (!m_hide) m_ci.endCodeFragment("DoxyCode");
830  }
831  else
832  {
833  if (!m_hide) m_t << "\n";
834  }
835 }
836 
838 {
839  if (m_hide) return;
840  bool bDisplay = !f->isInline();
841  if (bDisplay)
842  {
844  m_t << "<p class=\"formulaDsp\">\n";
845  }
846 
847  if (Config_getBool(USE_MATHJAX))
848  {
849  QCString text = f->text();
850  bool closeInline = FALSE;
851  if (!bDisplay && !text.isEmpty() && text.at(0)=='$' &&
852  text.at(text.length()-1)=='$')
853  {
854  closeInline=TRUE;
855  text = text.mid(1,text.length()-2);
856  m_t << "\\(";
857  }
858  else if (!bDisplay && !text.isEmpty())
859  {
860  closeInline=TRUE;
861  m_t << "\\(";
862  }
863  m_t << convertToHtml(text);
864  if (closeInline)
865  {
866  m_t << "\\)";
867  }
868  }
869  else
870  {
871  m_t << "<img class=\"formula"
872  << (bDisplay ? "Dsp" : "Inl");
873  m_t << "\" alt=\"";
875  m_t << "\"";
876  m_t << " src=\"" << f->relPath() << f->name();
877  if (Config_getEnum(HTML_FORMULA_FORMAT)==HTML_FORMULA_FORMAT_t::svg)
878  {
879  m_t << ".svg";
880  }
881  else
882  {
883  m_t << ".png";
884  }
886  if (size.width!=-1)
887  {
888  m_t << "\" width=\"" << size.width;
889  }
890  if (size.height!=-1)
891  {
892  m_t << "\" height=\"" << size.height;
893  }
894  m_t << "\"/>";
895  }
896  if (bDisplay)
897  {
898  m_t << "\n</p>\n";
900  }
901 }
902 
904 {
905  QCString anchor = convertIndexWordToAnchor(e->entry());
906  if (e->member())
907  {
908  anchor.prepend(e->member()->anchor()+"_");
909  }
910  m_t << "<a id=\"" << anchor << "\" name=\"" << anchor << "\"></a>";
911  //printf("*** DocIndexEntry: word='%s' scope='%s' member='%s'\n",
912  // qPrint(e->entry()),
913  // e->scope() ? qPrint(e->scope()->name()) : "<null>",
914  // e->member() ? qPrint(e->member()->name()) : "<null>"
915  // );
916  Doxygen::indexList->addIndexItem(e->scope(),e->member(),anchor,e->entry());
917 }
918 
920 {
921  m_t << "</dd>\n";
922  m_t << "<dd>\n";
923 }
924 
926 {
927  if (m_hide) return;
928  if (!cite->file().isEmpty())
929  {
930  startLink(cite->ref(),cite->file(),cite->relPath(),cite->anchor());
931  }
932  else
933  {
934  m_t << "<b>[";
935  }
936  filter(cite->text());
937  if (!cite->file().isEmpty())
938  {
939  endLink();
940  }
941  else
942  {
943  m_t << "]</b>";
944  }
945 }
946 
947 
948 //--------------------------------------
949 // visitor functions for compound nodes
950 //--------------------------------------
951 
952 
954 {
955  //printf("DocAutoList::visitPre\n");
956  if (m_hide) return;
958  if (l->isEnumList())
959  {
960  //
961  // Do list type based on depth:
962  // 1.
963  // a.
964  // i.
965  // A.
966  // 1. (repeat)...
967  //
968  m_t << "<ol type=\"" << types[l->depth() % NUM_HTML_LIST_TYPES] << "\">";
969  }
970  else
971  {
972  m_t << "<ul>";
973  }
974  if (!l->isPreformatted()) m_t << "\n";
975 }
976 
978 {
979  //printf("DocAutoList::visitPost\n");
980  if (m_hide) return;
981  if (l->isEnumList())
982  {
983  m_t << "</ol>";
984  }
985  else
986  {
987  m_t << "</ul>";
988  }
989  if (!l->isPreformatted()) m_t << "\n";
991 }
992 
994 {
995  if (m_hide) return;
996  m_t << "<li>";
997 }
998 
1000 {
1001  if (m_hide) return;
1002  m_t << "</li>";
1003  if (!li->isPreformatted()) m_t << "\n";
1004 }
1005 
1006 template<class T>
1007 bool isFirstChildNode(T *parent, DocNode *node)
1008 {
1009  return !parent->children().empty() && parent->children().front().get()==node;
1010 }
1011 
1012 template<class T>
1013 bool isLastChildNode(T *parent, DocNode *node)
1014 {
1015  return !parent->children().empty() && parent->children().back().get()==node;
1016 }
1017 
1019 {
1020  const DocNodeList &nodes = parent->children();
1021  auto it = std::find_if(nodes.begin(),nodes.end(),[par](const auto &n) { return n.get()==par; });
1022  if (it==nodes.end()) return FALSE;
1023  size_t i = it - nodes.begin();
1024  size_t count = parent->children().size();
1025  if (count>1 && i==0) // first node
1026  {
1027  if (nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep)
1028  {
1029  return TRUE;
1030  }
1031  }
1032  else if (count>1 && i==count-1) // last node
1033  {
1034  if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep)
1035  {
1036  return TRUE;
1037  }
1038  }
1039  else if (count>2 && i>0 && i<count-1) // intermediate node
1040  {
1041  if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep &&
1042  nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep)
1043  {
1044  return TRUE;
1045  }
1046  }
1047  return FALSE;
1048 }
1049 
1050 static int getParagraphContext(DocPara *p,bool &isFirst,bool &isLast)
1051 {
1052  int t=0;
1053  isFirst=FALSE;
1054  isLast=FALSE;
1055  if (p && p->parent())
1056  {
1057  switch (p->parent()->kind())
1058  {
1060  { // hierarchy: node N -> para -> parblock -> para
1061  // adapt return value to kind of N
1063  if ( p->parent()->parent() && p->parent()->parent()->parent() )
1064  {
1065  kind = p->parent()->parent()->parent()->kind();
1066  }
1067  isFirst=isFirstChildNode((DocParBlock*)p->parent(),p);
1068  isLast =isLastChildNode ((DocParBlock*)p->parent(),p);
1069  t=NONE;
1070  if (isFirst)
1071  {
1072  if (kind==DocNode::Kind_HtmlListItem ||
1074  {
1075  t=STARTLI;
1076  }
1077  else if (kind==DocNode::Kind_HtmlDescData ||
1078  kind==DocNode::Kind_XRefItem ||
1080  {
1081  t=STARTDD;
1082  }
1083  else if (kind==DocNode::Kind_HtmlCell ||
1085  {
1086  t=STARTTD;
1087  }
1088  }
1089  if (isLast)
1090  {
1091  if (kind==DocNode::Kind_HtmlListItem ||
1093  {
1094  t=ENDLI;
1095  }
1096  else if (kind==DocNode::Kind_HtmlDescData ||
1097  kind==DocNode::Kind_XRefItem ||
1099  {
1100  t=ENDDD;
1101  }
1102  else if (kind==DocNode::Kind_HtmlCell ||
1104  {
1105  t=ENDTD;
1106  }
1107  }
1108  if (!isFirst && !isLast)
1109  {
1110  if (kind==DocNode::Kind_HtmlListItem ||
1112  {
1113  t=INTERLI;
1114  }
1115  else if (kind==DocNode::Kind_HtmlDescData ||
1116  kind==DocNode::Kind_XRefItem ||
1118  {
1119  t=INTERDD;
1120  }
1121  else if (kind==DocNode::Kind_HtmlCell ||
1123  {
1124  t=INTERTD;
1125  }
1126  }
1127  break;
1128  }
1130  isFirst=isFirstChildNode((DocAutoListItem*)p->parent(),p);
1131  isLast =isLastChildNode ((DocAutoListItem*)p->parent(),p);
1132  t=STARTLI; // not used
1133  break;
1135  isFirst=TRUE;
1136  isLast =TRUE;
1137  t=STARTLI; // not used
1138  break;
1140  isFirst=TRUE;
1141  isLast =TRUE;
1142  t=STARTLI; // not used
1143  break;
1145  isFirst=isFirstChildNode((DocHtmlListItem*)p->parent(),p);
1146  isLast =isLastChildNode ((DocHtmlListItem*)p->parent(),p);
1147  if (isFirst) t=STARTLI;
1148  if (isLast) t=ENDLI;
1149  if (!isFirst && !isLast) t = INTERLI;
1150  break;
1152  isFirst=isFirstChildNode((DocSecRefItem*)p->parent(),p);
1153  isLast =isLastChildNode ((DocSecRefItem*)p->parent(),p);
1154  if (isFirst) t=STARTLI;
1155  if (isLast) t=ENDLI;
1156  if (!isFirst && !isLast) t = INTERLI;
1157  break;
1159  isFirst=isFirstChildNode((DocHtmlDescData*)p->parent(),p);
1160  isLast =isLastChildNode ((DocHtmlDescData*)p->parent(),p);
1161  if (isFirst) t=STARTDD;
1162  if (isLast) t=ENDDD;
1163  if (!isFirst && !isLast) t = INTERDD;
1164  break;
1166  isFirst=isFirstChildNode((DocXRefItem*)p->parent(),p);
1167  isLast =isLastChildNode ((DocXRefItem*)p->parent(),p);
1168  if (isFirst) t=STARTDD;
1169  if (isLast) t=ENDDD;
1170  if (!isFirst && !isLast) t = INTERDD;
1171  break;
1173  isFirst=isFirstChildNode((DocSimpleSect*)p->parent(),p);
1174  isLast =isLastChildNode ((DocSimpleSect*)p->parent(),p);
1175  if (isFirst) t=STARTDD;
1176  if (isLast) t=ENDDD;
1178  // if the paragraph is enclosed with separators it will
1179  // be included in <dd>..</dd> so avoid addition paragraph
1180  // markers
1181  {
1182  isFirst=isLast=TRUE;
1183  }
1184  if (!isFirst && !isLast) t = INTERDD;
1185  break;
1187  isFirst=isFirstChildNode((DocHtmlCell*)p->parent(),p);
1188  isLast =isLastChildNode ((DocHtmlCell*)p->parent(),p);
1189  if (isFirst) t=STARTTD;
1190  if (isLast) t=ENDTD;
1191  if (!isFirst && !isLast) t = INTERTD;
1192  break;
1193  default:
1194  break;
1195  }
1196  //printf("para=%p parent()->kind=%d isFirst=%d isLast=%d t=%d\n",
1197  // p,p->parent()->kind(),isFirst,isLast,t);
1198  }
1199  return t;
1200 }
1201 
1203 {
1204  if (m_hide) return;
1205 
1206  //printf("DocPara::visitPre: parent of kind %d ",
1207  // p->parent() ? p->parent()->kind() : -1);
1208 
1209  bool needsTag = FALSE;
1210  if (p && p->parent())
1211  {
1212  switch (p->parent()->kind())
1213  {
1214  case DocNode::Kind_Section:
1223  case DocNode::Kind_Copy:
1226  needsTag = TRUE;
1227  break;
1228  case DocNode::Kind_Root:
1229  needsTag = !((DocRoot*)p->parent())->singleLine();
1230  break;
1231  default:
1232  needsTag = FALSE;
1233  }
1234  }
1235 
1236  // if the first element of a paragraph is something that should be outside of
1237  // the paragraph (<ul>,<dl>,<table>,..) then that will already started the
1238  // paragraph and we don't need to do it here
1239  size_t nodeIndex = 0;
1240  if (p && nodeIndex<p->children().size())
1241  {
1242  while (nodeIndex<p->children().size() && isInvisibleNode(p->children().at(nodeIndex).get()))
1243  {
1244  nodeIndex++;
1245  }
1246  if (nodeIndex<p->children().size())
1247  {
1248  const DocNode *n = p->children().at(nodeIndex).get();
1249  if (mustBeOutsideParagraph(n))
1250  {
1251  needsTag = FALSE;
1252  }
1253  }
1254  }
1255 
1256  // check if this paragraph is the first or last or intermediate child of a <li> or <dd>.
1257  // this allows us to mark the tag with a special class so we can
1258  // fix the otherwise ugly spacing.
1259  int t;
1260  bool isFirst;
1261  bool isLast;
1262  t = getParagraphContext(p,isFirst,isLast);
1263  //printf("startPara first=%d last=%d\n",isFirst,isLast);
1264  if (isFirst && isLast) needsTag=FALSE;
1265 
1266  //printf(" needsTag=%d\n",needsTag);
1267  // write the paragraph tag (if needed)
1268  if (needsTag)
1269  {
1270  if (strlen(contexts[t]))
1271  m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p->attribs()) << ">";
1272  else
1273  m_t << "<p " << htmlAttribsToString(p->attribs()) << ">";
1274  }
1275 }
1276 
1278 {
1279 
1280  //printf("DocPara::visitPost: parent of kind %d ",
1281  // p->parent() ? p->parent()->kind() : -1);
1282 
1283  bool needsTag = FALSE;
1284  if (p->parent())
1285  {
1286  switch (p->parent()->kind())
1287  {
1288  case DocNode::Kind_Section:
1297  case DocNode::Kind_Copy:
1300  needsTag = TRUE;
1301  break;
1302  case DocNode::Kind_Root:
1303  needsTag = !((DocRoot*)p->parent())->singleLine();
1304  break;
1305  default:
1306  needsTag = FALSE;
1307  }
1308  }
1309 
1310  // if the last element of a paragraph is something that should be outside of
1311  // the paragraph (<ul>,<dl>,<table>) then that will already have ended the
1312  // paragraph and we don't need to do it here
1313  if (!p->children().empty())
1314  {
1315  int nodeIndex = static_cast<int>(p->children().size()-1);
1316  while (nodeIndex>=0 && isInvisibleNode(p->children().at(nodeIndex).get()))
1317  {
1318  nodeIndex--;
1319  }
1320  if (nodeIndex>=0)
1321  {
1322  const DocNode *n = p->children().at(nodeIndex).get();
1323  if (mustBeOutsideParagraph(n))
1324  {
1325  needsTag = FALSE;
1326  }
1327  }
1328  }
1329 
1330  bool isFirst;
1331  bool isLast;
1332  getParagraphContext(p,isFirst,isLast);
1333  //printf("endPara first=%d last=%d\n",isFirst,isLast);
1334  if (isFirst && isLast) needsTag=FALSE;
1335 
1336  //printf("DocPara::visitPost needsTag=%d\n",needsTag);
1337 
1338  if (needsTag) m_t << "</p>\n";
1339 
1340 }
1341 
1343 {
1344 }
1345 
1347 {
1348 }
1349 
1351 {
1352  if (m_hide) return;
1353  forceEndParagraph(s);
1354  m_t << "<dl class=\"section " << s->typeString() << "\"><dt>";
1355  switch(s->type())
1356  {
1357  case DocSimpleSect::See:
1358  m_t << theTranslator->trSeeAlso(); break;
1359  case DocSimpleSect::Return:
1360  m_t << theTranslator->trReturns(); break;
1361  case DocSimpleSect::Author:
1362  m_t << theTranslator->trAuthor(TRUE,TRUE); break;
1364  m_t << theTranslator->trAuthor(TRUE,FALSE); break;
1366  m_t << theTranslator->trVersion(); break;
1367  case DocSimpleSect::Since:
1368  m_t << theTranslator->trSince(); break;
1369  case DocSimpleSect::Date:
1370  m_t << theTranslator->trDate(); break;
1371  case DocSimpleSect::Note:
1372  m_t << theTranslator->trNote(); break;
1374  m_t << theTranslator->trWarning(); break;
1375  case DocSimpleSect::Pre:
1376  m_t << theTranslator->trPrecondition(); break;
1377  case DocSimpleSect::Post:
1378  m_t << theTranslator->trPostcondition(); break;
1380  m_t << theTranslator->trCopyright(); break;
1381  case DocSimpleSect::Invar:
1382  m_t << theTranslator->trInvariant(); break;
1383  case DocSimpleSect::Remark:
1384  m_t << theTranslator->trRemarks(); break;
1386  m_t << theTranslator->trAttention(); break;
1387  case DocSimpleSect::User: break;
1388  case DocSimpleSect::Rcs: break;
1389  case DocSimpleSect::Unknown: break;
1390  }
1391 
1392  // special case 1: user defined title
1393  if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
1394  {
1395  m_t << "</dt><dd>";
1396  }
1397 }
1398 
1400 {
1401  if (m_hide) return;
1402  m_t << "</dd></dl>\n";
1404 }
1405 
1407 {
1408 }
1409 
1411 {
1412  if (m_hide) return;
1413  m_t << "</dt><dd>";
1414 }
1415 
1417 {
1418  if (m_hide) return;
1419  forceEndParagraph(sl);
1420  m_t << "<ul>";
1421  if (!sl->isPreformatted()) m_t << "\n";
1422 
1423 }
1424 
1426 {
1427  if (m_hide) return;
1428  m_t << "</ul>";
1429  if (!sl->isPreformatted()) m_t << "\n";
1430  forceStartParagraph(sl);
1431 }
1432 
1434 {
1435  if (m_hide) return;
1436  m_t << "<li>";
1437 }
1438 
1440 {
1441  if (m_hide) return;
1442  m_t << "</li>";
1443  if (!li->isPreformatted()) m_t << "\n";
1444 }
1445 
1447 {
1448  if (m_hide) return;
1449  forceEndParagraph(s);
1450  m_t << "<h" << s->level() << ">";
1451  m_t << "<a class=\"anchor\" id=\"" << s->anchor();
1452  m_t << "\"></a>\n";
1454  m_t << "</h" << s->level() << ">\n";
1455 }
1456 
1458 {
1460 }
1461 
1463 {
1464  if (m_hide) return;
1465  forceEndParagraph(s);
1466  if (s->type()==DocHtmlList::Ordered)
1467  {
1468  m_t << "<ol" << htmlAttribsToString(s->attribs());
1469  }
1470  else
1471  {
1472  m_t << "<ul" << htmlAttribsToString(s->attribs());
1473  }
1474  m_t << ">\n";
1475 }
1476 
1478 {
1479  if (m_hide) return;
1480  if (s->type()==DocHtmlList::Ordered)
1481  {
1482  m_t << "</ol>";
1483  }
1484  else
1485  {
1486  m_t << "</ul>";
1487  }
1488  if (!s->isPreformatted()) m_t << "\n";
1490 }
1491 
1493 {
1494  if (m_hide) return;
1495  m_t << "<li" << htmlAttribsToString(i->attribs()) << ">";
1496  if (!i->isPreformatted()) m_t << "\n";
1497 }
1498 
1500 {
1501  if (m_hide) return;
1502  m_t << "</li>\n";
1503 }
1504 
1506 {
1507  if (m_hide) return;
1508  forceEndParagraph(dl);
1509  m_t << "<dl" << htmlAttribsToString(dl->attribs()) << ">\n";
1510 }
1511 
1513 {
1514  if (m_hide) return;
1515  m_t << "</dl>\n";
1516  forceStartParagraph(dl);
1517 }
1518 
1520 {
1521  if (m_hide) return;
1522  m_t << "<dt" << htmlAttribsToString(dt->attribs()) << ">";
1523 }
1524 
1526 {
1527  if (m_hide) return;
1528  m_t << "</dt>\n";
1529 }
1530 
1532 {
1533  if (m_hide) return;
1534  m_t << "<dd" << htmlAttribsToString(dd->attribs()) << ">";
1535 }
1536 
1538 {
1539  if (m_hide) return;
1540  m_t << "</dd>\n";
1541 }
1542 
1544 {
1545  if (m_hide) return;
1546 
1547  forceEndParagraph(t);
1548 
1549  if (t->hasCaption())
1550  {
1551  QCString anc = t->caption()->anchor();
1552  if (!anc.isEmpty())
1553  {
1554  m_t << "<a class=\"anchor\" id=\"" << anc << "\"></a>\n";
1555  }
1556  }
1557 
1558  QCString attrs = htmlAttribsToString(t->attribs());
1559  if (attrs.isEmpty())
1560  {
1561  m_t << "<table class=\"doxtable\">\n";
1562  }
1563  else
1564  {
1565  m_t << "<table" << htmlAttribsToString(t->attribs()) << ">\n";
1566  }
1567 }
1568 
1570 {
1571  if (m_hide) return;
1572  m_t << "</table>\n";
1574 }
1575 
1577 {
1578  if (m_hide) return;
1579  m_t << "<tr" << htmlAttribsToString(tr->attribs()) << ">\n";
1580 }
1581 
1583 {
1584  if (m_hide) return;
1585  m_t << "</tr>\n";
1586 }
1587 
1589 {
1590  if (m_hide) return;
1591  if (c->isHeading())
1592  {
1593  m_t << "<th" << htmlAttribsToString(c->attribs()) << ">";
1594  }
1595  else
1596  {
1597  m_t << "<td" << htmlAttribsToString(c->attribs()) << ">";
1598  }
1599 }
1600 
1602 {
1603  if (m_hide) return;
1604  if (c->isHeading()) m_t << "</th>"; else m_t << "</td>";
1605 }
1606 
1608 {
1609  if (m_hide) return;
1610  m_t << "<caption" << htmlAttribsToString(c->attribs()) << ">";
1611 }
1612 
1614 {
1615  if (m_hide) return;
1616  m_t << "</caption>\n";
1617 }
1618 
1620 {
1621  if (m_hide) return;
1622  //forceEndParagraph(i);
1623  //m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>\n";
1624 }
1625 
1627 {
1628  if (m_hide) return;
1629  //forceStartParagraph(i);
1630 }
1631 
1633 {
1634  if (m_hide) return;
1635  if (href->url().left(7)=="mailto:")
1636  {
1637  writeObfuscatedMailAddress(href->url().mid(7));
1638  }
1639  else
1640  {
1641  QCString url = correctURL(href->url(),href->relPath());
1642  m_t << "<a href=\"" << convertToHtml(url) << "\""
1643  << htmlAttribsToString(href->attribs()) << ">";
1644  }
1645 }
1646 
1648 {
1649  if (m_hide) return;
1650  m_t << "</a>";
1651 }
1652 
1654 {
1655  if (m_hide) return;
1656  forceEndParagraph(header);
1657  m_t << "<h" << header->level() << htmlAttribsToString(header->attribs()) << ">";
1658 }
1659 
1661 {
1662  if (m_hide) return;
1663  m_t << "</h" << header->level() << ">\n";
1664  forceStartParagraph(header);
1665 }
1666 
1668 {
1669  if (img->type()==DocImage::Html)
1670  {
1671  bool inlineImage = img->isInlineImage();
1672  bool typeSVG = img->isSVG();
1673  QCString url = img->url();
1674 
1675  if (!inlineImage)
1676  {
1677  forceEndParagraph(img);
1678  }
1679  if (m_hide) return;
1680  QCString baseName=img->name();
1681  int i;
1682  if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
1683  {
1684  baseName=baseName.right(baseName.length()-i-1);
1685  }
1686  if (!inlineImage) m_t << "<div class=\"image\">\n";
1687  QCString sizeAttribs;
1688  if (!img->width().isEmpty())
1689  {
1690  sizeAttribs+=" width=\""+img->width()+"\"";
1691  }
1692  if (!img->height().isEmpty()) // link to local file
1693  {
1694  sizeAttribs+=" height=\""+img->height()+"\"";
1695  }
1696  // 16 cases: url.isEmpty() | typeSVG | inlineImage | img->hasCaption()
1697 
1698  HtmlAttribList extraAttribs;
1699  if (typeSVG)
1700  {
1701  HtmlAttrib opt;
1702  opt.name = "style";
1703  opt.value = "pointer-events: none;";
1704  extraAttribs.push_back(opt);
1705  }
1706  QCString alt;
1707  mergeHtmlAttributes(img->attribs(),extraAttribs);
1708  QCString attrs = htmlAttribsToString(extraAttribs,&alt);
1709  QCString src;
1710  if (url.isEmpty())
1711  {
1712  src = img->relPath()+img->name();
1713  }
1714  else
1715  {
1716  src = correctURL(url,img->relPath());
1717  }
1718  if (typeSVG && !inlineImage)
1719  {
1720  m_t << "<object type=\"image/svg+xml\" data=\"" << convertToHtml(src)
1721  << "\"" << sizeAttribs << attrs;
1722  if (inlineImage)
1723  {
1724  // skip closing tag
1725  }
1726  else
1727  {
1728  m_t << ">" << alt << "</object>\n";
1729  }
1730  }
1731  else
1732  {
1733  m_t << "<img src=\"" << convertToHtml(src) << "\" alt=\"" << alt << "\"" << sizeAttribs << attrs;
1734  if (inlineImage)
1735  {
1736  m_t << " class=\"inline\"";
1737  }
1738  else
1739  {
1740  m_t << "/>\n";
1741  }
1742  }
1743  if (img->hasCaption())
1744  {
1745  if (inlineImage)
1746  {
1747  m_t << " title=\"";
1748  }
1749  else
1750  {
1751  m_t << "<div class=\"caption\">\n";
1752  }
1753  }
1754  else if (inlineImage)
1755  {
1756  m_t << "/>";
1757  }
1758  }
1759  else // other format -> skip
1760  {
1761  pushHidden(m_hide);
1762  m_hide=TRUE;
1763  }
1764 }
1765 
1767 {
1768  if (img->type()==DocImage::Html)
1769  {
1770  if (m_hide) return;
1771  bool inlineImage = img->isInlineImage();
1772  if (img->hasCaption())
1773  {
1774  if (inlineImage)
1775  {
1776  m_t << "\"/>";
1777  }
1778  else // end <div class="caption">
1779  {
1780  m_t << "</div>";
1781  }
1782  }
1783  if (!inlineImage) // end <div class="image">
1784  {
1785  m_t << "</div>\n";
1786  forceStartParagraph(img);
1787  }
1788  }
1789  else // other format
1790  {
1791  m_hide = popHidden();
1792  }
1793 }
1794 
1796 {
1797  if (m_hide) return;
1798  m_t << "<div class=\"dotgraph\">\n";
1799  writeDotFile(df->file(),df->relPath(),df->context(),df->srcFile(),df->srcLine());
1800  if (df->hasCaption())
1801  {
1802  m_t << "<div class=\"caption\">\n";
1803  }
1804 }
1805 
1807 {
1808  if (m_hide) return;
1809  if (df->hasCaption())
1810  {
1811  m_t << "</div>\n";
1812  }
1813  m_t << "</div>\n";
1814 }
1815 
1817 {
1818  if (m_hide) return;
1819  m_t << "<div class=\"mscgraph\">\n";
1820  writeMscFile(df->file(),df->relPath(),df->context(),df->srcFile(),df->srcLine());
1821  if (df->hasCaption())
1822  {
1823  m_t << "<div class=\"caption\">\n";
1824  }
1825 }
1827 {
1828  if (m_hide) return;
1829  if (df->hasCaption())
1830  {
1831  m_t << "</div>\n";
1832  }
1833  m_t << "</div>\n";
1834 }
1835 
1837 {
1838  if (m_hide) return;
1839  m_t << "<div class=\"diagraph\">\n";
1840  writeDiaFile(df->file(),df->relPath(),df->context(),df->srcFile(),df->srcLine());
1841  if (df->hasCaption())
1842  {
1843  m_t << "<div class=\"caption\">\n";
1844  }
1845 }
1847 {
1848  if (m_hide) return;
1849  if (df->hasCaption())
1850  {
1851  m_t << "</div>\n";
1852  }
1853  m_t << "</div>\n";
1854 }
1855 
1857 {
1858  if (m_hide) return;
1859  startLink(lnk->ref(),lnk->file(),lnk->relPath(),lnk->anchor());
1860 }
1861 
1863 {
1864  if (m_hide) return;
1865  endLink();
1866 }
1867 
1869 {
1870  if (m_hide) return;
1871  if (!ref->file().isEmpty())
1872  {
1873  // when ref->isSubPage()==TRUE we use ref->file() for HTML and
1874  // ref->anchor() for LaTeX/RTF
1875  startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? QCString() : ref->anchor());
1876  }
1877  if (!ref->hasLinkText()) filter(ref->targetTitle());
1878 }
1879 
1881 {
1882  if (m_hide) return;
1883  if (!ref->file().isEmpty()) endLink();
1884  //m_t << " ";
1885 }
1886 
1888 {
1889  if (m_hide) return;
1890  if (!ref->file().isEmpty())
1891  {
1892  m_t << "<li>";
1893  startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? QCString() : ref->anchor());
1894  }
1895 }
1896 
1898 {
1899  if (m_hide) return;
1900  if (!ref->file().isEmpty())
1901  {
1902  endLink();
1903  m_t << "</li>\n";
1904  }
1905 }
1906 
1908 {
1909  if (m_hide) return;
1910  forceEndParagraph(s);
1911  m_t << "<div>\n";
1912  m_t << "<ul class=\"multicol\">\n";
1913 }
1914 
1916 {
1917  if (m_hide) return;
1918  m_t << "</ul>\n";
1919  m_t << "</div>\n";
1921 }
1922 
1924 {
1925  if (m_hide) return;
1926  forceEndParagraph(s);
1927  QCString className;
1928  QCString heading;
1929  switch(s->type())
1930  {
1931  case DocParamSect::Param:
1932  heading=theTranslator->trParameters();
1933  className="params";
1934  break;
1935  case DocParamSect::RetVal:
1936  heading=theTranslator->trReturnValues();
1937  className="retval";
1938  break;
1940  heading=theTranslator->trExceptions();
1941  className="exception";
1942  break;
1945  className="tparams";
1946  break;
1947  default:
1948  ASSERT(0);
1949  }
1950  m_t << "<dl class=\"" << className << "\"><dt>";
1951  m_t << heading;
1952  m_t << "</dt><dd>\n";
1953  m_t << " <table class=\"" << className << "\">\n";
1954 }
1955 
1957 {
1958  if (m_hide) return;
1959  m_t << " </table>\n";
1960  m_t << " </dd>\n";
1961  m_t << "</dl>\n";
1963 }
1964 
1966 {
1967  //printf("DocParamList::visitPre\n");
1968  if (m_hide) return;
1969  m_t << " <tr>";
1970  DocParamSect *sect = 0;
1971  if (pl->parent()->kind()==DocNode::Kind_ParamSect)
1972  {
1973  sect=(DocParamSect*)pl->parent();
1974  }
1975  if (sect && sect->hasInOutSpecifier())
1976  {
1977  m_t << "<td class=\"paramdir\">";
1979  {
1980  m_t << "[";
1981  if (pl->direction()==DocParamSect::In)
1982  {
1983  m_t << "in";
1984  }
1985  else if (pl->direction()==DocParamSect::Out)
1986  {
1987  m_t << "out";
1988  }
1989  else if (pl->direction()==DocParamSect::InOut)
1990  {
1991  m_t << "in,out";
1992  }
1993  m_t << "]";
1994  }
1995  m_t << "</td>";
1996  }
1997  if (sect && sect->hasTypeSpecifier())
1998  {
1999  m_t << "<td class=\"paramtype\">";
2000  for (const auto &type : pl->paramTypes())
2001  {
2002  if (type->kind()==DocNode::Kind_Word)
2003  {
2004  visit((DocWord*)type.get());
2005  }
2006  else if (type->kind()==DocNode::Kind_LinkedWord)
2007  {
2008  visit((DocLinkedWord*)type.get());
2009  }
2010  else if (type->kind()==DocNode::Kind_Sep)
2011  {
2012  m_t << "&#160;" << ((DocSeparator *)type.get())->chars() << "&#160;";
2013  }
2014  }
2015  m_t << "</td>";
2016  }
2017  m_t << "<td class=\"paramname\">";
2018  bool first=TRUE;
2019  for (const auto &param : pl->parameters())
2020  {
2021  if (!first) m_t << ","; else first=FALSE;
2022  if (param->kind()==DocNode::Kind_Word)
2023  {
2024  visit((DocWord*)param.get());
2025  }
2026  else if (param->kind()==DocNode::Kind_LinkedWord)
2027  {
2028  visit((DocLinkedWord*)param.get());
2029  }
2030  }
2031  m_t << "</td><td>";
2032 }
2033 
2035 {
2036  //printf("DocParamList::visitPost\n");
2037  if (m_hide) return;
2038  m_t << "</td></tr>\n";
2039 }
2040 
2042 {
2043  if (m_hide) return;
2044  if (x->title().isEmpty()) return;
2045 
2046  forceEndParagraph(x);
2047  bool anonymousEnum = x->file()=="@";
2048  if (!anonymousEnum)
2049  {
2050  m_t << "<dl class=\"" << x->key() << "\"><dt><b><a class=\"el\" href=\""
2051  << x->relPath() << addHtmlExtensionIfMissing(x->file())
2052  << "#" << x->anchor() << "\">";
2053  }
2054  else
2055  {
2056  m_t << "<dl class=\"" << x->key() << "\"><dt><b>";
2057  }
2058  filter(x->title());
2059  m_t << ":";
2060  if (!anonymousEnum) m_t << "</a>";
2061  m_t << "</b></dt><dd>";
2062 }
2063 
2065 {
2066  if (m_hide) return;
2067  if (x->title().isEmpty()) return;
2068  m_t << "</dd></dl>\n";
2070 }
2071 
2073 {
2074  if (m_hide) return;
2075  startLink(QCString(),ref->file(),ref->relPath(),ref->anchor());
2076 }
2077 
2079 {
2080  if (m_hide) return;
2081  endLink();
2082  m_t << " ";
2083 }
2084 
2086 {
2087 }
2088 
2090 {
2091 }
2092 
2094 {
2095  if (m_hide) return;
2096  forceEndParagraph(b);
2097  QCString attrs = htmlAttribsToString(b->attribs());
2098  m_t << "<blockquote class=\"doxtable\"" << htmlAttribsToString(b->attribs()) << ">\n";
2099 }
2100 
2102 {
2103  if (m_hide) return;
2104  m_t << "</blockquote>\n";
2106 }
2107 
2109 {
2110  if (m_hide) return;
2111  if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
2112  {
2113  forceEndParagraph(vf);
2115  m_t << "<p>";
2116  m_t << "flowchart: " ; // TODO: translate me
2117  m_t << "<a href=\"";
2118  m_t << fname;
2119  m_t << ".svg\">";
2121  m_t << "</a>";
2122  if (vf->hasCaption())
2123  {
2124  m_t << "<br />";
2125  }
2126  }
2127 }
2128 
2130 {
2131  if (m_hide) return;
2132  if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
2133  {
2134  m_t << "</p>";
2135  forceStartParagraph(vf);
2136  }
2137 }
2138 
2140 {
2141  if (m_hide) return;
2142 }
2143 
2145 {
2146  if (m_hide) return;
2147 }
2148 
2149 
2150 
2152 {
2153  if (str.isEmpty()) return;
2154  const char *p=str.data();
2155  char c;
2156  while (*p)
2157  {
2158  c=*p++;
2159  switch(c)
2160  {
2161  case '<': m_t << "&lt;"; break;
2162  case '>': m_t << "&gt;"; break;
2163  case '&': m_t << "&amp;"; break;
2164  case '\\': if ((*p == '(') || (*p == ')'))
2165  m_t << "\\&zwj;" << *p++;
2166  else
2167  m_t << c;
2168  break;
2169  default:
2170  {
2171  uchar uc = static_cast<uchar>(c);
2172  if (uc<32 && !isspace(c)) // non-printable control characters
2173  {
2174  m_t << "&#x24" << hex[uc>>4] << hex[uc&0xF] << ";";
2175  }
2176  else
2177  {
2178  m_t << c;
2179  }
2180  }
2181  break;
2182  }
2183  }
2184 }
2185 
2186 /// Escape basic entities to produce a valid CDATA attribute value,
2187 /// assume that the outer quoting will be using the double quote &quot;
2189 {
2190  if (str.isEmpty()) return;
2191  const char *p=str.data();
2192  char c;
2193  while (*p)
2194  {
2195  c=*p++;
2196  switch(c)
2197  {
2198  case '&': m_t << "&amp;"; break;
2199  case '"': m_t << "&quot;"; break;
2200  case '<': m_t << "&lt;"; break;
2201  case '>': m_t << "&gt;"; break;
2202  case '\\': if ((*p == '(') || (*p == ')'))
2203  m_t << "\\&zwj;" << *p++;
2204  else
2205  m_t << c;
2206  break;
2207  default:
2208  {
2209  uchar uc = static_cast<uchar>(c);
2210  if (uc<32 && !isspace(c)) // non-printable control characters
2211  {
2212  m_t << "&#x24" << hex[uc>>4] << hex[uc&0xF] << ";";
2213  }
2214  else
2215  {
2216  m_t << c;
2217  }
2218  }
2219  break;
2220  }
2221  }
2222 }
2223 
2224 void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file,
2225  const QCString &relPath,const QCString &anchor,
2226  const QCString &tooltip)
2227 {
2228  //printf("HtmlDocVisitor: file=%s anchor=%s\n",qPrint(file),qPrint(anchor));
2229  if (!ref.isEmpty()) // link to entity imported via tag file
2230  {
2231  m_t << "<a class=\"elRef\" ";
2232  m_t << externalLinkTarget();
2233  }
2234  else // local link
2235  {
2236  m_t << "<a class=\"el\" ";
2237  }
2238  m_t << "href=\"";
2239  m_t << externalRef(relPath,ref,TRUE);
2240  if (!file.isEmpty())
2241  {
2242  m_t << addHtmlExtensionIfMissing(file);
2243  }
2244  if (!anchor.isEmpty()) m_t << "#" << anchor;
2245  m_t << "\"";
2246  if (!tooltip.isEmpty()) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
2247  m_t << ">";
2248 }
2249 
2251 {
2252  m_t << "</a>";
2253 }
2254 
2255 void HtmlDocVisitor::writeDotFile(const QCString &fn,const QCString &relPath,
2256  const QCString &context,const QCString &srcFile,int srcLine)
2257 {
2258  QCString baseName=fn;
2259  int i;
2260  if ((i=baseName.findRev('/'))!=-1)
2261  {
2262  baseName=baseName.right(baseName.length()-i-1);
2263  }
2264  if ((i=baseName.find('.'))!=-1) // strip extension
2265  {
2266  baseName=baseName.left(i);
2267  }
2268  baseName.prepend("dot_");
2269  QCString outDir = Config_getString(HTML_OUTPUT);
2270  writeDotGraphFromFile(fn,outDir,baseName,GOF_BITMAP,srcFile,srcLine);
2271  writeDotImageMapFromFile(m_t,fn,outDir,relPath,baseName,context,-1,srcFile,srcLine);
2272 }
2273 
2274 void HtmlDocVisitor::writeMscFile(const QCString &fileName,const QCString &relPath,
2275  const QCString &context,const QCString &srcFile,int srcLine)
2276 {
2277  QCString baseName=fileName;
2278  int i;
2279  if ((i=baseName.findRev('/'))!=-1) // strip path
2280  {
2281  baseName=baseName.right(baseName.length()-i-1);
2282  }
2283  if ((i=baseName.find('.'))!=-1) // strip extension
2284  {
2285  baseName=baseName.left(i);
2286  }
2287  baseName.prepend("msc_");
2288  QCString outDir = Config_getString(HTML_OUTPUT);
2289  QCString imgExt = getDotImageExtension();
2290  MscOutputFormat mscFormat = MSC_BITMAP;
2291  if ("svg" == imgExt)
2292  mscFormat = MSC_SVG;
2293  writeMscGraphFromFile(fileName,outDir,baseName,mscFormat,srcFile,srcLine);
2294  writeMscImageMapFromFile(m_t,fileName,outDir,relPath,baseName,context,mscFormat,srcFile,srcLine);
2295 }
2296 
2297 void HtmlDocVisitor::writeDiaFile(const QCString &fileName, const QCString &relPath,
2298  const QCString &,const QCString &srcFile,int srcLine)
2299 {
2300  QCString baseName=fileName;
2301  int i;
2302  if ((i=baseName.findRev('/'))!=-1) // strip path
2303  {
2304  baseName=baseName.right(baseName.length()-i-1);
2305  }
2306  if ((i=baseName.find('.'))!=-1) // strip extension
2307  {
2308  baseName=baseName.left(i);
2309  }
2310  baseName.prepend("dia_");
2311  QCString outDir = Config_getString(HTML_OUTPUT);
2312  writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP,srcFile,srcLine);
2313 
2314  m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />\n";
2315 }
2316 
2317 void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName, const QCString &relPath,
2318  const QCString &,const QCString &srcFile,int srcLine)
2319 {
2320  QCString baseName=fileName;
2321  int i;
2322  if ((i=baseName.findRev('/'))!=-1) // strip path
2323  {
2324  baseName=baseName.right(baseName.length()-i-1);
2325  }
2326  if ((i=baseName.findRev('.'))!=-1) // strip extension
2327  {
2328  baseName=baseName.left(i);
2329  }
2330  static QCString outDir = Config_getString(HTML_OUTPUT);
2331  QCString imgExt = getDotImageExtension();
2332  if (imgExt=="svg")
2333  {
2335  //m_t << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" << relPath << baseName << ".svg" << "\" />\n";
2336  //m_t << "<p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p>";
2337  //m_t << "</iframe>\n";
2338  m_t << "<object type=\"image/svg+xml\" data=\"" << relPath << baseName << ".svg\"></object>\n";
2339  }
2340  else
2341  {
2343  m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />\n";
2344  }
2345 }
2346 
2347 /** Returns TRUE if the child nodes in paragraph \a para until \a nodeIndex
2348  contain a style change node that is still active and that style change is one that
2349  must be located outside of a paragraph, i.e. it is a center, div, or pre tag.
2350  See also bug746162.
2351  */
2352 static bool insideStyleChangeThatIsOutsideParagraph(DocPara *para,int nodeIndex)
2353 {
2354  //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2355  int styleMask=0;
2356  bool styleOutsideParagraph=FALSE;
2357  while (nodeIndex>=0 && !styleOutsideParagraph)
2358  {
2359  DocNode *n = para->children().at(nodeIndex).get();
2360  if (n->kind()==DocNode::Kind_StyleChange)
2361  {
2362  DocStyleChange *sc = (DocStyleChange*)n;
2363  if (!sc->enable()) // remember styles that has been closed already
2364  {
2365  styleMask|=(int)sc->style();
2366  }
2367  bool paraStyle = sc->style()==DocStyleChange::Center ||
2368  sc->style()==DocStyleChange::Div ||
2370  //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2371  if (sc->enable() && (styleMask&(int)sc->style())==0 && // style change that is still active
2372  paraStyle
2373  )
2374  {
2375  styleOutsideParagraph=TRUE;
2376  }
2377  }
2378  nodeIndex--;
2379  }
2380  return styleOutsideParagraph;
2381 }
2382 
2383 /** Used for items found inside a paragraph, which due to XHTML restrictions
2384  * have to be outside of the paragraph. This method will forcefully end
2385  * the current paragraph and forceStartParagraph() will restart it.
2386  */
2388 {
2389  //printf("forceEndParagraph(%p) %d\n",n,n->kind());
2390  if (n->parent() && n->parent()->kind()==DocNode::Kind_Para)
2391  {
2392  DocPara *para = (DocPara*)n->parent();
2393  const DocNodeList &children = para->children();
2394  auto it = std::find_if(children.begin(),children.end(),[n](const auto &np) { return np.get()==n; });
2395  if (it==children.end()) return;
2396  int nodeIndex = static_cast<int>(it - children.begin());
2397  nodeIndex--;
2398  if (nodeIndex<0) return; // first node in paragraph
2399  while (nodeIndex>=0 && isInvisibleNode(children.at(nodeIndex).get()))
2400  {
2401  nodeIndex--;
2402  }
2403  if (nodeIndex<0) return; // first visible node in paragraph
2404  n = children.at(nodeIndex).get();
2405  if (mustBeOutsideParagraph(n)) return; // previous node already outside paragraph context
2406  nodeIndex--;
2407  bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
2408  bool isFirst;
2409  bool isLast;
2410  getParagraphContext(para,isFirst,isLast);
2411  //printf("forceEnd first=%d last=%d styleOutsideParagraph=%d\n",isFirst,isLast,styleOutsideParagraph);
2412  if (isFirst && isLast) return;
2413  if (styleOutsideParagraph) return;
2414 
2415  m_t << "</p>";
2416  }
2417 }
2418 
2419 /** Used for items found inside a paragraph, which due to XHTML restrictions
2420  * have to be outside of the paragraph. This method will forcefully start
2421  * the paragraph, that was previously ended by forceEndParagraph().
2422  */
2424 {
2425  //printf("forceStartParagraph(%p) %d\n",n,n->kind());
2426  if (n->parent() && n->parent()->kind()==DocNode::Kind_Para) // if we are inside a paragraph
2427  {
2428  DocPara *para = (DocPara*)n->parent();
2429  const DocNodeList &children = para->children();
2430  auto it = std::find_if(children.begin(),children.end(),[n](const auto &np) { return np.get()==n; });
2431  if (it==children.end()) return;
2432  int nodeIndex = static_cast<int>(it - children.begin());
2433  int numNodes = static_cast<int>(para->children().size());
2434  bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
2435  if (styleOutsideParagraph) return;
2436  nodeIndex++;
2437  if (nodeIndex==numNodes) return; // last node
2438  while (nodeIndex<numNodes && isInvisibleNode(para->children().at(nodeIndex).get()))
2439  {
2440  nodeIndex++;
2441  }
2442  if (nodeIndex<numNodes)
2443  {
2444  n = para->children().at(nodeIndex).get();
2445  if (mustBeOutsideParagraph(n)) return; // next element also outside paragraph
2446  }
2447  else
2448  {
2449  return; // only whitespace at the end!
2450  }
2451 
2452  bool needsTag = TRUE;
2453  bool isFirst;
2454  bool isLast;
2455  getParagraphContext(para,isFirst,isLast);
2456  if (isFirst && isLast) needsTag = FALSE;
2457  //printf("forceStart first=%d last=%d needsTag=%d\n",isFirst,isLast,needsTag);
2458 
2459  if (needsTag) m_t << "<p>";
2460  }
2461 }
2462 
DocHtmlBlockQuote
Node representing an HTML blockquote
Definition: docparser.h:1433
formula.h
VhdlDocGen::getFlowMember
static const MemberDef * getFlowMember()
Definition: vhdldocgen.cpp:92
DocAutoListItem
Node representing an item of a auto list
Definition: docparser.h:720
DocInternalRef::relPath
QCString relPath() const
Definition: docparser.h:926
writeDiaGraphFromFile
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
Definition: dia.cpp:26
PlantumlManager::writePlantUMLSource
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine)
Write a PlantUML compatible file.
Definition: plantuml.cpp:26
getDotImageExtension
QCString getDotImageExtension()
Definition: util.cpp:7032
DocHRef
Node representing a Hypertext reference
Definition: docparser.h:936
Definition::getDefFileExtension
virtual QCString getDefFileExtension() const =0
DocStyleChange
Node representing a style change
Definition: docparser.h:343
DocVerbatim::isExample
bool isExample() const
Definition: docparser.h:522
DocVisitor_Html
const int DocVisitor_Html
Definition: docvisitor.h:24
DocVerbatim
Node representing a verbatim, unparsed text fragment
Definition: docparser.h:510
DocHtmlTable::caption
DocHtmlCaption * caption() const
Definition: docparser.h:1419
Translator::trCopyright
virtual QCString trCopyright()=0
DocParamList::paramTypes
DocNodeList & paramTypes()
Definition: docparser.h:1239
DocTitle
Node representing a simple section title
Definition: docparser.h:736
DocXRefItem::file
QCString file() const
Definition: docparser.h:754
types
static const char types[][NUM_HTML_LIST_TYPES]
Definition: htmldocvisitor.cpp:39
Translator::trPostcondition
virtual QCString trPostcondition()=0
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
DocImage::isInlineImage
bool isInlineImage() const
Definition: docparser.h:785
isDocIncludeVisible
static bool isDocIncludeVisible(const DocInclude *s)
Definition: htmldocvisitor.cpp:175
fileinfo.h
DocInclude::HtmlInclude
@ HtmlInclude
Definition: docparser.h:566
ENDTD
@ ENDTD
Definition: htmldocvisitor.cpp:48
DocParamSect::In
@ In
Definition: docparser.h:1160
FlowChart::convertNameToFileName
static QCString convertNameToFileName()
Definition: vhdldocgen.cpp:3351
DocSimpleSect::Return
@ Return
Definition: docparser.h:1116
DocNode::isPreformatted
bool isPreformatted() const
Definition: docparser.h:177
DocNode::Kind_HtmlDescData
@ Kind_HtmlDescData
Definition: docparser.h:119
DocImage::width
QCString width() const
Definition: docparser.h:781
NUM_HTML_LIST_TYPES
static const int NUM_HTML_LIST_TYPES
Definition: htmldocvisitor.cpp:38
DocVerbatim::text
QCString text() const
Definition: docparser.h:519
DocDotFile
Node representing a dot file
Definition: docparser.h:830
DocVisitor::pushHidden
void pushHidden(bool hide)
Definition: docvisitor.cpp:62
Config_getEnum
#define Config_getEnum(name)
Definition: config.h:35
DocHtmlRow::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1379
DocHtmlTable
Node representing a HTML table
Definition: docparser.h:1405
HtmlDocVisitor::writeDiaFile
void writeDiaFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine)
Definition: htmldocvisitor.cpp:2297
writeMscImageMapFromFile
void writeMscImageMapFromFile(TextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, MscOutputFormat format, const QCString &srcFile, int srcLine)
Definition: msc.cpp:169
DocNode::Kind_AutoListItem
@ Kind_AutoListItem
Definition: docparser.h:105
HtmlDocVisitor::startLink
void startLink(const QCString &ref, const QCString &file, const QCString &relPath, const QCString &anchor, const QCString &tooltip="")
Definition: htmldocvisitor.cpp:2224
Translator::trNote
virtual QCString trNote()=0
HtmlDocVisitor::visit
void visit(DocWord *)
Definition: htmldocvisitor.cpp:279
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
DocHtmlCaption::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1357
INTERTD
@ INTERTD
Definition: htmldocvisitor.cpp:51
DocIncOperator::showLineNo
bool showLineNo() const
Definition: docparser.h:629
DocSimpleSect::Warning
@ Warning
Definition: docparser.h:1117
DocImage::isSVG
bool isSVG() const
Definition: docparser.cpp:2868
Dir::remove
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Definition: dir.cpp:256
DocNode::Kind_SecRefList
@ Kind_SecRefList
Definition: docparser.h:140
Dir
Class representing a directory in the file system
Definition: dir.h:68
DocNode::Kind_Word
@ Kind_Word
Definition: docparser.h:101
DocPara::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1215
DocRoot
Root node of documentation tree
Definition: docparser.h:1457
HtmlDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: htmldocvisitor.cpp:953
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
HtmlAttribList
Class representing a list of HTML attributes.
Definition: htmlattrib.h:30
DocImage::hasCaption
bool hasCaption() const
Definition: docparser.h:780
DocNode::Kind_HtmlHeader
@ Kind_HtmlHeader
Definition: docparser.h:133
DocVisitor::popHidden
bool popHidden()
Definition: docvisitor.cpp:67
DocHtmlHeader
Node Html heading
Definition: docparser.h:957
PlantumlManager::OutputFormat
OutputFormat
Plant UML output image formats
Definition: plantuml.h:44
DIA_BITMAP
@ DIA_BITMAP
Definition: dia.h:23
DocParamSect::Out
@ Out
Definition: docparser.h:1160
DocSimpleSect::Unknown
@ Unknown
Definition: docparser.h:1116
DocNode::Kind_Include
@ Kind_Include
Definition: docparser.h:131
DocStyleChange::Strike
@ Strike
Definition: docparser.h:356
DocVerbatim::context
QCString context() const
Definition: docparser.h:520
memberdef.h
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:86
DocImage::relPath
QCString relPath() const
Definition: docparser.h:783
DocParamSect::InOut
@ InOut
Definition: docparser.h:1160
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
HtmlDocVisitor::forceStartParagraph
void forceStartParagraph(DocNode *n)
Used for items found inside a paragraph, which due to XHTML restrictions have to be outside of the pa...
Definition: htmldocvisitor.cpp:2423
convertIndexWordToAnchor
static QCString convertIndexWordToAnchor(const QCString &word)
Definition: htmldocvisitor.cpp:67
DocRef::isSubPage
bool isSubPage() const
Definition: docparser.h:906
DocVhdlFlow
Node representing a VHDL flow chart
Definition: docparser.h:860
DocNode
Abstract node interface with type information.
Definition: docparser.h:96
DocHRef::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:947
DocLinkedWord::tooltip
QCString tooltip() const
Definition: docparser.h:243
DocInclude::isExample
bool isExample() const
Definition: docparser.h:588
Doxygen::indexList
static IndexList * indexList
Definition: doxygen.h:114
DocVerbatim::Msc
@ Msc
Definition: docparser.h:513
MSC_BITMAP
@ MSC_BITMAP
Definition: msc.h:22
DocDiagramFileBase::file
QCString file() const
Definition: docparser.h:809
isDocIncOperatorVisible
static bool isDocIncOperatorVisible(const DocIncOperator *s)
Definition: htmldocvisitor.cpp:191
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
DocAnchor::anchor
QCString anchor() const
Definition: docparser.h:308
DocInclude::XmlInclude
@ XmlInclude
Definition: docparser.h:568
DocVerbatim::PlantUML
@ PlantUML
Definition: docparser.h:513
msc.h
HtmlDocVisitor::filterQuotedCdataAttr
void filterQuotedCdataAttr(const QCString &str)
Escape basic entities to produce a valid CDATA attribute value, assume that the outer quoting will be...
Definition: htmldocvisitor.cpp:2188
DocSecRefItem::relPath
QCString relPath() const
Definition: docparser.h:1031
DocEmoji
Node representing a n emoji
Definition: docparser.h:469
DocRef::ref
QCString ref() const
Definition: docparser.h:899
DocLinkedWord::anchor
QCString anchor() const
Definition: docparser.h:242
DocInternalRef::anchor
QCString anchor() const
Definition: docparser.h:927
DocStyleChange::Italic
@ Italic
Definition: docparser.h:347
DocCite::relPath
QCString relPath() const
Definition: docparser.h:327
DocMscFile
Node representing a msc file
Definition: docparser.h:840
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
DocNode::Kind_ParBlock
@ Kind_ParBlock
Definition: docparser.h:151
Translator::trReturns
virtual QCString trReturns()=0
DocNode::Kind_HtmlDescList
@ Kind_HtmlDescList
Definition: docparser.h:118
FormulaManager::instance
static FormulaManager & instance()
Definition: formula.cpp:65
DocNode::Kind_Root
@ Kind_Root
Definition: docparser.h:100
DocVerbatim::Code
@ Code
Definition: docparser.h:513
IndexList::addIndexItem
void addIndexItem(const Definition *context, const MemberDef *md, const QCString &sectionAnchor=QCString(), const QCString &title=QCString())
Definition: index.h:101
DocStyleChange::Bold
@ Bold
Definition: docparser.h:346
DocRef::targetTitle
QCString targetTitle() const
Definition: docparser.h:901
DocVerbatim::relPath
QCString relPath() const
Definition: docparser.h:524
DocInclude::IncludeDoc
@ IncludeDoc
Definition: docparser.h:567
DocRef::anchor
QCString anchor() const
Definition: docparser.h:900
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
CodeOutputInterface::endCodeFragment
virtual void endCodeFragment(const QCString &style)=0
HtmlDocVisitor::m_ci
CodeOutputInterface & m_ci
Definition: htmldocvisitor.h:165
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
DocIndexEntry::entry
QCString entry() const
Definition: docparser.h:691
DocHtmlTable::hasCaption
bool hasCaption()
Definition: docparser.h:1413
DocSecRefItem
Node representing a reference to a section
Definition: docparser.h:1023
DocStyleChange::Span
@ Span
Definition: docparser.h:354
DocNode::Kind_HtmlCell
@ Kind_HtmlCell
Definition: docparser.h:123
PlantumlManager::instance
static PlantumlManager & instance()
Definition: plantuml.cpp:124
INTERDD
@ INTERDD
Definition: htmldocvisitor.cpp:50
MscOutputFormat
MscOutputFormat
Definition: msc.h:22
DocAnchor
Node representing an anchor
Definition: docparser.h:303
htmldocvisitor.h
DocFormula::text
QCString text() const
Definition: docparser.h:664
correctURL
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition: util.cpp:6573
DocXRefItem::anchor
QCString anchor() const
Definition: docparser.h:755
Translator::trPrecondition
virtual QCString trPrecondition()=0
visitPostCaption
static void visitPostCaption(TextStream &t, DocVerbatim *s)
Definition: htmldocvisitor.cpp:483
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
DocNode::Kind_Section
@ Kind_Section
Definition: docparser.h:113
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
DocDiagramFileBase::srcLine
int srcLine() const
Definition: docparser.h:816
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DocHorRuler::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:296
DocInclude::kind
Kind kind() const override
Definition: docparser.h:576
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
DocText
Root node of a text fragment
Definition: docparser.h:1447
DocHtmlList::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1101
isLastChildNode
bool isLastChildNode(T *parent, DocNode *node)
Definition: htmldocvisitor.cpp:1013
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
DocURL::isEmail
bool isEmail() const
Definition: docparser.h:264
DocInclude::DocbookInclude
@ DocbookInclude
Definition: docparser.h:568
DocImage::name
QCString name() const
Definition: docparser.h:779
DocInclude::DontInclude
@ DontInclude
Definition: docparser.h:566
DocIndexEntry::member
const MemberDef * member() const
Definition: docparser.h:690
DocNode::Kind_SecRefItem
@ Kind_SecRefItem
Definition: docparser.h:139
HtmlEntityMapper::instance
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper
Definition: htmlentity.cpp:341
DocNode::Kind_IncOperator
@ Kind_IncOperator
Definition: docparser.h:132
CodeOutputInterface::startCodeFragment
virtual void startCodeFragment(const QCString &style)=0
DocInclude::VerbInclude
@ VerbInclude
Definition: docparser.h:566
HtmlDocVisitor
Concrete visitor implementation for HTML output.
Definition: htmldocvisitor.h:29
DocImage::Html
@ Html
Definition: docparser.h:774
DocIncOperator::isFirst
bool isFirst() const
Definition: docparser.h:634
DocFormula
Node representing an item of a cross-referenced list
Definition: docparser.h:658
DocVerbatim::DocbookOnly
@ DocbookOnly
Definition: docparser.h:513
DocHtmlDescTitle::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:979
DocNode::Kind_WhiteSpace
@ Kind_WhiteSpace
Definition: docparser.h:102
DocLinkedWord::word
QCString word() const
Definition: docparser.h:237
DocLinkedWord::relPath
QCString relPath() const
Definition: docparser.h:240
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
DocNode::Kind_StyleChange
@ Kind_StyleChange
Definition: docparser.h:108
HtmlDocVisitor::writeDotFile
void writeDotFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine)
Definition: htmldocvisitor.cpp:2255
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
HtmlDocVisitor::m_ctx
const Definition * m_ctx
Definition: htmldocvisitor.h:168
DocSimpleSect::User
@ User
Definition: docparser.h:1117
DocSecRefList
Node representing a list of section references
Definition: docparser.h:1048
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
uint
unsigned uint
Definition: qcstring.h:40
MemberDef::anchor
virtual QCString anchor() const =0
HtmlAttrib::value
QCString value
Definition: htmlattrib.h:38
outputgen.h
mergeHtmlAttributes
static void mergeHtmlAttributes(const HtmlAttribList &attribs, HtmlAttribList &mergeInto)
Definition: htmldocvisitor.cpp:216
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
addHtmlExtensionIfMissing
QCString addHtmlExtensionIfMissing(const QCString &fName)
Definition: util.cpp:5275
PlantumlManager::PUML_BITMAP
@ PUML_BITMAP
Definition: plantuml.h:44
EmojiEntityMapper::unicode
const char * unicode(int index) const
Access routine to the unicode sequence for the Emoji entity
Definition: emoji.cpp:1580
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
DocHtmlTable::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1414
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
STARTTD
@ STARTTD
Definition: htmldocvisitor.cpp:47
DocHtmlCell::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1330
DocSecRefItem::ref
QCString ref() const
Definition: docparser.h:1032
DocNode::kind
virtual Kind kind() const =0
reg::isspace
static bool isspace(char c)
Definition: regex.cpp:33
DocInclude::file
QCString file() const
Definition: docparser.h:577
uchar
unsigned char uchar
Definition: qcstring.h:38
Translator::trVersion
virtual QCString trVersion()=0
DocNodeList
std::vector< std::unique_ptr< DocNode > > DocNodeList
Definition: docparser.h:190
QCString::left
QCString left(size_t len) const
Definition: qcstring.h:212
DocURL
Node representing a URL (or email address)
Definition: docparser.h:256
message.h
isInvisibleNode
static bool isInvisibleNode(const DocNode *node)
Definition: htmldocvisitor.cpp:202
writeDotGraphFromFile
void writeDotGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine)
Definition: dot.cpp:272
DocParamSect::Unspecified
@ Unspecified
Definition: docparser.h:1160
DocNode::Kind_SimpleList
@ Kind_SimpleList
Definition: docparser.h:111
HtmlDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: htmldocvisitor.cpp:977
DocSimpleSect::See
@ See
Definition: docparser.h:1116
DocHtmlDescList::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:993
DocHtmlCaption
Node representing a HTML table caption
Definition: docparser.h:1352
DocIncOperator::isExample
bool isExample() const
Definition: docparser.h:638
HtmlDocVisitor::writeMscFile
void writeMscFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine)
Definition: htmldocvisitor.cpp:2274
DocIndexEntry::scope
const Definition * scope() const
Definition: docparser.h:689
DocStyleChange::Ins
@ Ins
Definition: docparser.h:359
DocInclude::SnipWithLines
@ SnipWithLines
Definition: docparser.h:567
INTERLI
@ INTERLI
Definition: htmldocvisitor.cpp:49
DocHtmlDescData::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1308
DocParamList
Node representing a parameter list.
Definition: docparser.h:1228
DocSimpleSect::Rcs
@ Rcs
Definition: docparser.h:1117
DocNode::Kind_Para
@ Kind_Para
Definition: docparser.h:103
Translator::trAttention
virtual QCString trAttention()=0
theTranslator
Translator * theTranslator
Definition: language.cpp:156
NONE
@ NONE
Definition: htmldocvisitor.cpp:42
isSeparatedParagraph
bool isSeparatedParagraph(DocSimpleSect *parent, DocPara *par)
Definition: htmldocvisitor.cpp:1018
Definition::name
virtual QCString name() const =0
DocSecRefItem::file
QCString file() const
Definition: docparser.h:1029
doxygen.h
DocSeparator
Node representing a separator
Definition: docparser.h:497
parserintf.h
DocCite::ref
QCString ref() const
Definition: docparser.h:328
DocInternalRef::file
QCString file() const
Definition: docparser.h:925
DocIncOperator::Skip
@ Skip
Definition: docparser.h:609
DocNode::Kind_HtmlList
@ Kind_HtmlList
Definition: docparser.h:116
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
isFirstChildNode
bool isFirstChildNode(T *parent, DocNode *node)
Definition: htmldocvisitor.cpp:1007
DocSimpleSectSep
Node representing a separator between two simple sections of the same type.
Definition: docparser.h:1139
language.h
DocLineBreak::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:281
DocNode::Kind_SimpleListItem
@ Kind_SimpleListItem
Definition: docparser.h:112
DocFormula::name
QCString name() const
Definition: docparser.h:663
htmlAttribsToString
static QCString htmlAttribsToString(const HtmlAttribList &attribs, QCString *pAltValue=0)
Definition: htmldocvisitor.cpp:233
DocHRef::url
QCString url() const
Definition: docparser.h:943
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
FormulaManager::DisplaySize::height
int height
Definition: formula.h:64
DocSimpleSect::Date
@ Date
Definition: docparser.h:1116
DocSimpleSect::typeString
QCString typeString() const
Definition: docparser.cpp:4500
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
DocNode::Kind_Verbatim
@ Kind_Verbatim
Definition: docparser.h:114
HtmlAttrib
Class representing a HTML attribute.
Definition: htmlattrib.h:23
writeDotImageMapFromFile
void writeDotImageMapFromFile(TextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, int graphId, const QCString &srcFile, int srcLine)
Definition: dot.cpp:325
ENDLI
@ ENDLI
Definition: htmldocvisitor.cpp:45
DocVerbatim::children
const DocNodeList & children() const
Definition: docparser.h:532
DocInclude::isBlock
bool isBlock() const
Definition: docparser.h:590
DocVerbatim::srcFile
QCString srcFile() const
Definition: docparser.h:534
DocHtmlList
Node representing a Html list
Definition: docparser.h:1093
filedef.h
DocHtmlCaption::anchor
QCString anchor() const
Definition: docparser.h:1361
Translator::trRemarks
virtual QCString trRemarks()=0
MSC_SVG
@ MSC_SVG
Definition: msc.h:22
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
dia.h
DocNode::Kind_ParamSect
@ Kind_ParamSect
Definition: docparser.h:143
DocRef::file
QCString file() const
Definition: docparser.h:897
DocNode::Kind_Internal
@ Kind_Internal
Definition: docparser.h:129
DocDiagramFileBase::context
QCString context() const
Definition: docparser.h:814
DocVerbatim::hasCaption
bool hasCaption() const
Definition: docparser.h:527
DocParamSect::type
Type type() const
Definition: docparser.h:1167
getParagraphContext
static int getParagraphContext(DocPara *p, bool &isFirst, bool &isLast)
Definition: htmldocvisitor.cpp:1050
DocNode::Kind_ParamList
@ Kind_ParamList
Definition: docparser.h:144
DocParamList::direction
DocParamSect::Direction direction() const
Definition: docparser.h:1241
DocSimpleSect
Node representing a simple section
Definition: docparser.h:1111
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
DocNode::Kind_HtmlTable
@ Kind_HtmlTable
Definition: docparser.h:121
DocNode::Kind_Copy
@ Kind_Copy
Definition: docparser.h:146
DocStyleChange::Subscript
@ Subscript
Definition: docparser.h:351
externalLinkTarget
QCString externalLinkTarget(const bool parent)
Definition: util.cpp:6323
DocFormula::relPath
QCString relPath() const
Definition: docparser.h:665
DocLinkedWord::ref
QCString ref() const
Definition: docparser.h:241
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
QCString::setNum
QCString & setNum(short n)
Definition: qcstring.h:372
Translator::trSince
virtual QCString trSince()=0
DocImage::height
QCString height() const
Definition: docparser.h:782
contexts_t
contexts_t
Definition: htmldocvisitor.cpp:40
DocNode::Kind_Formula
@ Kind_Formula
Definition: docparser.h:138
STARTLI
@ STARTLI
Definition: htmldocvisitor.cpp:43
DocNode::Kind_Sep
@ Kind_Sep
Definition: docparser.h:154
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
writeMscGraphFromFile
void writeMscGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, MscOutputFormat format, const QCString &srcFile, int srcLine)
Definition: msc.cpp:92
DocNode::Kind_HtmlBlockQuote
@ Kind_HtmlBlockQuote
Definition: docparser.h:149
DocVhdlFlow::hasCaption
bool hasCaption()
Definition: docparser.h:866
DocHtmlList::type
Type type() const
Definition: docparser.h:1100
DocInclude::RtfInclude
@ RtfInclude
Definition: docparser.h:568
HtmlDocVisitor::m_hide
bool m_hide
Definition: htmldocvisitor.h:167
DocInclude::SnippetDoc
@ SnippetDoc
Definition: docparser.h:567
DocInclude::LatexInclude
@ LatexInclude
Definition: docparser.h:566
FormulaManager::displaySize
DisplaySize displaySize(int formulaId) const
Definition: formula.cpp:495
DocParamSect::hasTypeSpecifier
bool hasTypeSpecifier() const
Definition: docparser.h:1169
DocSection::title
QCString title() const
Definition: docparser.h:1008
DocEmoji::index
int index() const
Definition: docparser.h:474
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
GOF_BITMAP
@ GOF_BITMAP
Definition: dotgraph.h:27
FileInfo::dirPath
std::string dirPath(bool absPath=true) const
Definition: fileinfo.cpp:137
DocCite::anchor
QCString anchor() const
Definition: docparser.h:329
DocVerbatim::engine
QCString engine() const
Definition: docparser.h:530
DocStyleChange::style
Style style() const
Definition: docparser.h:368
FormulaManager::DisplaySize
Definition: formula.h:45
DocLinkedWord
Node representing a word that can be linked to something
Definition: docparser.h:231
DocStyleChange::Code
@ Code
Definition: docparser.h:348
DocDiagramFileBase::hasCaption
bool hasCaption() const
Definition: docparser.h:811
FormulaManager::DisplaySize::width
int width
Definition: formula.h:63
HtmlEntityMapper::html
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity
Definition: htmlentity.cpp:386
HtmlAttrib::name
QCString name
Definition: htmlattrib.h:37
DocInclude::Include
@ Include
Definition: docparser.h:566
HtmlDocVisitor::endLink
void endLink()
Definition: htmldocvisitor.cpp:2250
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
DocCite::file
QCString file() const
Definition: docparser.h:326
DocNode::Kind
Kind
Definition: docparser.h:100
DocNode::Kind_XRefItem
@ Kind_XRefItem
Definition: docparser.h:115
DocHtmlCell::isHeading
bool isHeading() const
Definition: docparser.h:1324
HtmlDocVisitor::m_insidePre
bool m_insidePre
Definition: htmldocvisitor.h:166
htmlgen.h
DocNode::Kind_AutoList
@ Kind_AutoList
Definition: docparser.h:104
DocDiagramFileBase::srcFile
QCString srcFile() const
Definition: docparser.h:815
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
STARTDD
@ STARTDD
Definition: htmldocvisitor.cpp:44
HtmlDocVisitor::writePlantUMLFile
void writePlantUMLFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine)
Definition: htmldocvisitor.cpp:2317
hex
static const char * hex
Definition: htmldocvisitor.cpp:65
DocParamSect::Param
@ Param
Definition: docparser.h:1156
mustBeOutsideParagraph
static bool mustBeOutsideParagraph(const DocNode *n)
Definition: htmldocvisitor.cpp:105
DocAutoList::isEnumList
bool isEnumList() const
Definition: docparser.h:708
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
insideStyleChangeThatIsOutsideParagraph
static bool insideStyleChangeThatIsOutsideParagraph(DocPara *para, int nodeIndex)
Returns TRUE if the child nodes in paragraph para until nodeIndex contain a style change node that is...
Definition: htmldocvisitor.cpp:2352
DocSecRefItem::isSubPage
bool isSubPage() const
Definition: docparser.h:1034
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
DocStyleChange::Preformatted
@ Preformatted
Definition: docparser.h:353
Config_getString
#define Config_getString(name)
Definition: config.h:32
DocInclude::blockId
QCString blockId() const
Definition: docparser.h:587
visitPreCaption
static void visitPreCaption(TextStream &t, DocVerbatim *s)
Definition: htmldocvisitor.cpp:474
DocStyleChange::enable
bool enable() const
Definition: docparser.h:370
ENDDD
@ ENDDD
Definition: htmldocvisitor.cpp:46
DocAnchor::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:312
DocXRefItem::key
QCString key() const
Definition: docparser.h:758
DocSection::anchor
QCString anchor() const
Definition: docparser.h:1009
HtmlDocVisitor::m_langExt
QCString m_langExt
Definition: htmldocvisitor.h:169
config.h
DocSimpleSect::Post
@ Post
Definition: docparser.h:1117
convertCharEntitiesToUTF8
QCString convertCharEntitiesToUTF8(const QCString &str)
Definition: util.cpp:4170
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
DocFormula::isInline
bool isInline()
Definition: docparser.h:668
getFileNameExtension
QCString getFileNameExtension(const QCString &fn)
Definition: util.cpp:5621
DocLinkedWord::file
QCString file() const
Definition: docparser.h:239
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
DocFormula::id
int id() const
Definition: docparser.h:666
DocStyleChange::Underline
@ Underline
Definition: docparser.h:357
DocSimpleListItem
Node representing a simple list item
Definition: docparser.h:1266
convertToXML
QCString convertToXML(const QCString &s, bool keepEntities)
Definition: util.cpp:3948
emoji.h
DocXRefItem::relPath
QCString relPath() const
Definition: docparser.h:757
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
DocHRef::relPath
QCString relPath() const
Definition: docparser.h:945
CompAccept::children
const DocNodeList & children() const
Definition: docparser.h:207
DocWhiteSpace
Node representing some amount of white space
Definition: docparser.h:484
DocVerbatim::XmlOnly
@ XmlOnly
Definition: docparser.h:513
DocHtmlHeader::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:964
DocHtmlBlockQuote::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1440
isDocVerbatimVisible
static bool isDocVerbatimVisible(const DocVerbatim *s)
Definition: htmldocvisitor.cpp:160
DocParamSect::RetVal
@ RetVal
Definition: docparser.h:1156
plantuml.h
DocInclude::DontIncWithLines
@ DontIncWithLines
Definition: docparser.h:568
DocIncOperator::context
QCString context() const
Definition: docparser.h:632
DocStyleChange::Div
@ Div
Definition: docparser.h:355
DocStyleChange::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:373
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
HtmlDocVisitor::filter
void filter(const QCString &str)
Definition: htmldocvisitor.cpp:2151
PlantumlManager::PUML_SVG
@ PUML_SVG
Definition: plantuml.h:44
DocInclude::extension
QCString extension() const
Definition: docparser.h:578
visitCaption
static void visitCaption(HtmlDocVisitor *parent, DocNodeList &children)
Definition: htmldocvisitor.cpp:492
DocCite::text
QCString text() const
Definition: docparser.h:330
PlantumlManager::generatePlantUMLOutput
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition: plantuml.cpp:91
DocRef::relPath
QCString relPath() const
Definition: docparser.h:898
Translator::trDate
virtual QCString trDate()=0
DocImage::url
QCString url() const
Definition: docparser.h:784
htmlentity.h
DocParamSect::hasInOutSpecifier
bool hasInOutSpecifier() const
Definition: docparser.h:1168
DocInternalRef
Node representing an internal reference to some item
Definition: docparser.h:919
DocNode::Kind_SimpleSect
@ Kind_SimpleSect
Definition: docparser.h:109
externalRef
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:6334
DocParamList::parameters
DocNodeList & parameters()
Definition: docparser.h:1238
HtmlDocVisitor::writeObfuscatedMailAddress
void writeObfuscatedMailAddress(const QCString &url)
Definition: htmldocvisitor.cpp:336
DocStyleChange::S
@ S
Definition: docparser.h:360
HtmlDocVisitor::HtmlDocVisitor
HtmlDocVisitor(TextStream &t, CodeOutputInterface &ci, const Definition *ctx)
Definition: htmldocvisitor.cpp:267
DocVerbatim::isBlock
bool isBlock() const
Definition: docparser.h:526
DocVerbatim::Verbatim
@ Verbatim
Definition: docparser.h:513
util.h
A bunch of utility functions.
HtmlDocVisitor::forceEndParagraph
void forceEndParagraph(DocNode *n)
Used for items found inside a paragraph, which due to XHTML restrictions have to be outside of the pa...
Definition: htmldocvisitor.cpp:2387
DocImage::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:787
DocSecRefItem::anchor
QCString anchor() const
Definition: docparser.h:1030
DocImage::type
Type type() const
Definition: docparser.h:778
DocVerbatim::srcLine
int srcLine() const
Definition: docparser.h:535
DocHtmlRow
Node representing a HTML table row
Definition: docparser.h:1371
HtmlDocVisitor::m_t
TextStream & m_t
Definition: htmldocvisitor.h:164
DocInclude::ManInclude
@ ManInclude
Definition: docparser.h:568
DocAutoList::depth
int depth() const
Definition: docparser.h:710
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
DocNode::Kind_SimpleSectSep
@ Kind_SimpleSectSep
Definition: docparser.h:141
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.h:339
contexts
static const char * contexts[10]
Definition: htmldocvisitor.cpp:53
DocNode::Kind_HorRuler
@ Kind_HorRuler
Definition: docparser.h:126
DocSimpleSect::Invar
@ Invar
Definition: docparser.h:1117
QCString::sprintf
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:24
convertToHtml
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition: util.cpp:4063
DocIncOperator::isLast
bool isLast() const
Definition: docparser.h:635
DocNode::Kind_Image
@ Kind_Image
Definition: docparser.h:134
DocSimpleSect::Version
@ Version
Definition: docparser.h:1116
vhdldocgen.h
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
DocDiagramFileBase::relPath
QCString relPath() const
Definition: docparser.h:810
Translator::trReturnValues
virtual QCString trReturnValues()=0
DocVerbatim::kind
Kind kind() const override
Definition: docparser.h:517
Translator::trAuthor
virtual QCString trAuthor(bool first_capital, bool singular)=0
DocNode::Kind_HtmlListItem
@ Kind_HtmlListItem
Definition: docparser.h:117
Translator::trWarning
virtual QCString trWarning()=0
DocSimpleSect::Attention
@ Attention
Definition: docparser.h:1117
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