doxygen  1.8.18
About: Doxygen is a source code documentation generator tool for C++, C, Objective-C, C#, PHP, Java, Python, IDL (diverse flavors), Fortran, VHDL, Tcl, and to some extent D. Different output formats are supported.
  Fossies Dox: doxygen-1.8.18.src.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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