htmldocvisitor.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  * Documents produced by Doxygen are derivative works derived from the
15  * input used in their production; they are not affected by this license.
16  *
17  */
18 
19 #include <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 "plantuml.h"
38 
39 static const int NUM_HTML_LIST_TYPES = 4;
40 static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"};
41 
43 {
44  static char hex[] = "0123456789abcdef";
45  QCString result="a";
46  const char *str = word.data();
47  unsigned char c;
48  if (str)
49  {
50  while ((c = *str++))
51  {
52  if ((c >= 'a' && c <= 'z') || // ALPHA
53  (c >= 'A' && c <= 'A') || // ALPHA
54  (c >= '0' && c <= '9') || // DIGIT
55  c == '-' ||
56  c == '.' ||
57  c == '_'
58  )
59  {
60  result += c;
61  }
62  else
63  {
64  char enc[4];
65  enc[0] = ':';
66  enc[1] = hex[(c & 0xf0) >> 4];
67  enc[2] = hex[c & 0xf];
68  enc[3] = 0;
69  result += enc;
70  }
71  }
72  }
73  return result;
74 }
75 
77 {
78  switch (n->kind())
79  {
80  /* <ul> */
84  /* <dl> */
89  /* <table> */
91  /* <h?> */
94  /* \internal */
96  /* <div> */
100  /* <hr> */
102  /* CopyDoc gets paragraph markers from the wrapping DocPara node,
103  * but needs to insert them for all documentation being copied to
104  * preserve formatting.
105  */
106  case DocNode::Kind_Copy:
107  /* <blockquote> */
109  /* \parblock */
111  return TRUE;
113  {
114  DocVerbatim *dv = (DocVerbatim*)n;
115  return dv->type()!=DocVerbatim::HtmlOnly || dv->isBlock();
116  }
118  return ((DocStyleChange*)n)->style()==DocStyleChange::Preformatted ||
119  ((DocStyleChange*)n)->style()==DocStyleChange::Div ||
120  ((DocStyleChange*)n)->style()==DocStyleChange::Center;
122  return !((DocFormula*)n)->isInline();
123  default:
124  break;
125  }
126  return FALSE;
127 }
128 
130 {
131  QString result;
132  HtmlAttribListIterator li(attribs);
133  HtmlAttrib *att;
134  for (li.toFirst();(att=li.current());++li)
135  {
136  if (!att->value.isEmpty()) // ignore attribute without values as they
137  // are not XHTML compliant
138  {
139  result+=" ";
140  result+=att->name;
141  result+="=\""+convertToXML(att->value)+"\"";
142  }
143  }
144  return result;
145 }
146 
147 //-------------------------------------------------------------------------
148 
150  Definition *ctx)
151  : DocVisitor(DocVisitor_Html), m_t(t), m_ci(ci), m_insidePre(FALSE),
152  m_hide(FALSE), m_ctx(ctx)
153 {
154  if (ctx) m_langExt=ctx->getDefFileExtension();
155 }
156 
157  //--------------------------------------
158  // visitor functions for leaf nodes
159  //--------------------------------------
160 
162 {
163  //printf("word: %s\n",w->word().data());
164  if (m_hide) return;
165  filter(w->word());
166 }
167 
169 {
170  if (m_hide) return;
171  //printf("linked word: %s\n",w->word().data());
172  startLink(w->ref(),w->file(),w->relPath(),w->anchor(),w->tooltip());
173  filter(w->word());
174  endLink();
175 }
176 
178 {
179  if (m_hide) return;
180  if (m_insidePre)
181  {
182  m_t << w->chars();
183  }
184  else
185  {
186  m_t << " ";
187  }
188 }
189 
191 {
192  if (m_hide) return;
193  const char *res = HtmlEntityMapper::instance()->html(s->symbol());
194  if (res)
195  {
196  m_t << res;
197  }
198  else
199  {
200  err("HTML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
201  }
202 }
203 
205 {
206  m_t << "<a href=\"#\" onclick=\"location.href='mai'+'lto:'";
207  uint i;
208  int size=3;
209  for (i=0;i<url.length();)
210  {
211  m_t << "+'" << url.mid(i,size) << "'";
212  i+=size;
213  if (size==3) size=2; else size=3;
214  }
215  m_t << "; return false;\">";
216 }
217 
219 {
220  if (m_hide) return;
221  if (u->isEmail()) // mail address
222  {
223  QCString url = u->url();
225  uint size=5,i;
226  for (i=0;i<url.length();)
227  {
228  filter(url.mid(i,size));
229  if (i<url.length()-size) m_t << "<span style=\"display: none;\">.nosp@m.</span>";
230  i+=size;
231  if (size==5) size=4; else size=5;
232  }
233  m_t << "</a>";
234  }
235  else // web address
236  {
237  m_t << "<a href=\"";
238  m_t << u->url() << "\">";
239  filter(u->url());
240  m_t << "</a>";
241  }
242 }
243 
245 {
246  if (m_hide) return;
247  m_t << "<br />\n";
248 }
249 
251 {
252  if (m_hide) return;
253  forceEndParagraph(hr);
254  m_t << "<hr/>\n";
256 }
257 
259 {
260  if (m_hide) return;
261  switch (s->style())
262  {
264  if (s->enable()) m_t << "<b" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</b>";
265  break;
267  if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>";
268  break;
270  if (s->enable()) m_t << "<code" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</code>";
271  break;
273  if (s->enable()) m_t << "<sub" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sub>";
274  break;
276  if (s->enable()) m_t << "<sup" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sup>";
277  break;
279  if (s->enable())
280  {
282  m_t << "<center" << htmlAttribsToString(s->attribs()) << ">";
283  }
284  else
285  {
286  m_t << "</center>";
288  }
289  break;
291  if (s->enable()) m_t << "<small" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</small>";
292  break;
294  if (s->enable())
295  {
297  m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">";
299  }
300  else
301  {
303  m_t << "</pre>";
305  }
306  break;
307  case DocStyleChange::Div:
308  if (s->enable())
309  {
311  m_t << "<div" << htmlAttribsToString(s->attribs()) << ">";
312  }
313  else
314  {
315  m_t << "</div>";
317  }
318  break;
320  if (s->enable()) m_t << "<span" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</span>";
321  break;
322 
323  }
324 }
325 
326 
328 {
329  if (s->hasCaption())
330  {
331  t << "<div class=\"caption\">" << endl;
332  }
333 }
334 
335 
337 {
338  if (s->hasCaption())
339  {
340  t << "</div>" << endl;
341  }
342 }
343 
344 
346 {
347  QListIterator<DocNode> cli(children);
348  DocNode *n;
349  for (cli.toFirst();(n=cli.current());++cli) n->accept(parent);
350 }
351 
352 
354 {
355  if (m_hide) return;
356  QCString lang = m_langExt;
357  if (!s->language().isEmpty()) // explicit language setting
358  {
359  lang = s->language();
360  }
361  SrcLangExt langExt = getLanguageFromFileName(lang);
362  switch(s->type())
363  {
364  case DocVerbatim::Code:
366  m_t << PREFRAG_START;
368  ->parseCode(m_ci,
369  s->context(),
370  s->text(),
371  langExt,
372  s->isExample(),
373  s->exampleFile(),
374  0, // fileDef
375  -1, // startLine
376  -1, // endLine
377  FALSE, // inlineFragment
378  0, // memberDef
379  TRUE, // show line numbers
380  m_ctx // search context
381  );
382  m_t << PREFRAG_END;
384  break;
385  case DocVerbatim::Verbatim:
387  m_t << /*PREFRAG_START <<*/ "<pre class=\"fragment\">";
388  filter(s->text());
389  m_t << "</pre>" /*<< PREFRAG_END*/;
391  break;
392  case DocVerbatim::HtmlOnly:
393  if (s->isBlock()) forceEndParagraph(s);
394  m_t << s->text();
395  if (s->isBlock()) forceStartParagraph(s);
396  break;
397  case DocVerbatim::ManOnly:
399  case DocVerbatim::XmlOnly:
402  /* nothing */
403  break;
404 
405  case DocVerbatim::Dot:
406  {
407  static int dotindex = 1;
408  QCString fileName(4096);
409 
411  fileName.sprintf("%s%d%s",
412  (Config_getString("HTML_OUTPUT")+"/inline_dotgraph_").data(),
413  dotindex++,
414  ".dot"
415  );
416  QFile file(fileName);
417  if (!file.open(IO_WriteOnly))
418  {
419  err("Could not open file %s for writing\n",fileName.data());
420  }
421  else
422  {
423  file.writeBlock( s->text(), s->text().length() );
424  file.close();
425 
426  m_t << "<div align=\"center\">" << endl;
427  writeDotFile(fileName,s->relPath(),s->context());
428  visitPreCaption(m_t, s);
429  visitCaption(this, s->children());
430  visitPostCaption(m_t, s);
431  m_t << "</div>" << endl;
432 
433  if (Config_getBool("DOT_CLEANUP")) file.remove();
434  }
436  }
437  break;
438  case DocVerbatim::Msc:
439  {
441 
442  static int mscindex = 1;
443  QCString baseName(4096);
444 
445  baseName.sprintf("%s%d",
446  (Config_getString("HTML_OUTPUT")+"/inline_mscgraph_").data(),
447  mscindex++
448  );
449  QFile file(baseName+".msc");
450  if (!file.open(IO_WriteOnly))
451  {
452  err("Could not open file %s.msc for writing\n",baseName.data());
453  }
454  else
455  {
456  QCString text = "msc {";
457  text+=s->text();
458  text+="}";
459 
460  file.writeBlock( text, text.length() );
461  file.close();
462 
463  m_t << "<div align=\"center\">" << endl;
464  writeMscFile(baseName+".msc",s->relPath(),s->context());
465  visitPreCaption(m_t, s);
466  visitCaption(this, s->children());
467  visitPostCaption(m_t, s);
468  m_t << "</div>" << endl;
469 
470  if (Config_getBool("DOT_CLEANUP")) file.remove();
471  }
473  }
474  break;
476  {
478 
479  static QCString htmlOutput = Config_getString("HTML_OUTPUT");
480  QCString baseName = writePlantUMLSource(htmlOutput,s->exampleFile(),s->text());
481  m_t << "<div align=\"center\">" << endl;
482  writePlantUMLFile(baseName,s->relPath(),s->context());
483  visitPreCaption(m_t, s);
484  visitCaption(this, s->children());
485  visitPostCaption(m_t, s);
486  m_t << "</div>" << endl;
488  }
489  break;
490  }
491 }
492 
494 {
495  if (m_hide) return;
496  m_t << "<a class=\"anchor\" id=\"" << anc->anchor() << "\"></a>";
497 }
498 
500 {
501  if (m_hide) return;
502  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
503  switch(inc->type())
504  {
505  case DocInclude::Include:
506  forceEndParagraph(inc);
507  m_t << PREFRAG_START;
509  ->parseCode(m_ci,
510  inc->context(),
511  inc->text(),
512  langExt,
513  inc->isExample(),
514  inc->exampleFile(),
515  0, // fileDef
516  -1, // startLine
517  -1, // endLine
518  TRUE, // inlineFragment
519  0, // memberDef
520  FALSE, // show line numbers
521  m_ctx // search context
522  );
523  m_t << PREFRAG_END;
524  forceStartParagraph(inc);
525  break;
527  {
528  forceEndParagraph(inc);
529  m_t << PREFRAG_START;
530  QFileInfo cfi( inc->file() );
531  FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
533  ->parseCode(m_ci,
534  inc->context(),
535  inc->text(),
536  langExt,
537  inc->isExample(),
538  inc->exampleFile(),
539  &fd, // fileDef,
540  -1, // start line
541  -1, // end line
542  FALSE, // inline fragment
543  0, // memberDef
544  TRUE, // show line numbers
545  m_ctx // search context
546  );
547  m_t << PREFRAG_END;
548  forceStartParagraph(inc);
549  }
550  break;
552  break;
554  m_t << inc->text();
555  break;
557  break;
559  forceEndParagraph(inc);
560  m_t << /*PREFRAG_START <<*/ "<pre class=\"fragment\">";
561  filter(inc->text());
562  m_t << "</pre>" /*<< PREFRAG_END*/;
563  forceStartParagraph(inc);
564  break;
565  case DocInclude::Snippet:
566  {
567  forceEndParagraph(inc);
568  m_t << PREFRAG_START;
570  ->parseCode(m_ci,
571  inc->context(),
572  extractBlock(inc->text(),inc->blockId()),
573  langExt,
574  inc->isExample(),
575  inc->exampleFile(),
576  0,
577  -1, // startLine
578  -1, // endLine
579  TRUE, // inlineFragment
580  0, // memberDef
581  TRUE, // show line number
582  m_ctx // search context
583  );
584  m_t << PREFRAG_END;
585  forceStartParagraph(inc);
586  }
587  break;
588  }
589 }
590 
592 {
593  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
594  // op->type(),op->isFirst(),op->isLast(),op->text().data());
595  if (op->isFirst())
596  {
597  if (!m_hide) m_t << PREFRAG_START;
598  pushEnabled();
599  m_hide=TRUE;
600  }
602  if (op->type()!=DocIncOperator::Skip)
603  {
604  popEnabled();
605  if (!m_hide)
606  {
608  ->parseCode(
609  m_ci,
610  op->context(),
611  op->text(),
612  langExt,
613  op->isExample(),
614  op->exampleFile(),
615  0, // fileDef
616  -1, // startLine
617  -1, // endLine
618  FALSE, // inline fragment
619  0, // memberDef
620  TRUE, // show line numbers
621  m_ctx // search context
622  );
623  }
624  pushEnabled();
625  m_hide=TRUE;
626  }
627  if (op->isLast())
628  {
629  popEnabled();
630  if (!m_hide) m_t << PREFRAG_END;
631  }
632  else
633  {
634  if (!m_hide) m_t << endl;
635  }
636 }
637 
639 {
640  if (m_hide) return;
641  bool bDisplay = !f->isInline();
642  if (bDisplay)
643  {
645  m_t << "<p class=\"formulaDsp\">" << endl;
646  }
647 
648  if (Config_getBool("USE_MATHJAX"))
649  {
650  QCString text = f->text();
651  bool closeInline = FALSE;
652  if (!bDisplay && !text.isEmpty() && text.at(0)=='$' &&
653  text.at(text.length()-1)=='$')
654  {
655  closeInline=TRUE;
656  text = text.mid(1,text.length()-2);
657  m_t << "\\(";
658  }
659  m_t << convertToHtml(text);
660  if (closeInline)
661  {
662  m_t << "\\)";
663  }
664  }
665  else
666  {
667  m_t << "<img class=\"formula"
668  << (bDisplay ? "Dsp" : "Inl");
669  m_t << "\" alt=\"";
671  m_t << "\"";
672  // TODO: cache image dimensions on formula generation and give height/width
673  // for faster preloading and better rendering of the page
674  m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
675 
676  }
677  if (bDisplay)
678  {
679  m_t << endl << "</p>" << endl;
681  }
682 }
683 
685 {
686  QCString anchor = convertIndexWordToAnchor(e->entry());
687  if (e->member())
688  {
689  anchor.prepend(e->member()->anchor()+"_");
690  }
691  m_t << "<a name=\"" << anchor << "\"></a>";
692  //printf("*** DocIndexEntry: word='%s' scope='%s' member='%s'\n",
693  // e->entry().data(),
694  // e->scope() ? e->scope()->name().data() : "<null>",
695  // e->member() ? e->member()->name().data() : "<null>"
696  // );
697  Doxygen::indexList->addIndexItem(e->scope(),e->member(),anchor,e->entry());
698 }
699 
701 {
702  m_t << "</dd>" << endl;
703  m_t << "<dd>" << endl;
704 }
705 
707 {
708  if (m_hide) return;
709  if (!cite->file().isEmpty())
710  {
711  startLink(cite->ref(),cite->file(),cite->relPath(),cite->anchor());
712  }
713  else
714  {
715  m_t << "<b>[";
716  }
717  filter(cite->text());
718  if (!cite->file().isEmpty())
719  {
720  endLink();
721  }
722  else
723  {
724  m_t << "]</b>";
725  }
726 }
727 
728 
729 //--------------------------------------
730 // visitor functions for compound nodes
731 //--------------------------------------
732 
733 
735 {
736  //printf("DocAutoList::visitPre\n");
737  if (m_hide) return;
739  if (l->isEnumList())
740  {
741  //
742  // Do list type based on depth:
743  // 1.
744  // a.
745  // i.
746  // A.
747  // 1. (repeat)...
748  //
749  m_t << "<ol type=\"" << types[l->depth() % NUM_HTML_LIST_TYPES] << "\">";
750  }
751  else
752  {
753  m_t << "<ul>";
754  }
755  if (!l->isPreformatted()) m_t << "\n";
756 }
757 
759 {
760  //printf("DocAutoList::visitPost\n");
761  if (m_hide) return;
762  if (l->isEnumList())
763  {
764  m_t << "</ol>";
765  }
766  else
767  {
768  m_t << "</ul>";
769  }
770  if (!l->isPreformatted()) m_t << "\n";
772 }
773 
775 {
776  if (m_hide) return;
777  m_t << "<li>";
778 }
779 
781 {
782  if (m_hide) return;
783  m_t << "</li>";
784  if (!li->isPreformatted()) m_t << "\n";
785 }
786 
787 template<class T>
789 {
790  return parent->children().getFirst()==node;
791 }
792 
793 template<class T>
795 {
796  return parent->children().getLast()==node;
797 }
798 
800 {
801  QList<DocNode> nodes = parent->children();
802  int i = nodes.findRef(par);
803  if (i==-1) return FALSE;
804  int count = parent->children().count();
805  if (count>1 && i==0) // first node
806  {
807  if (nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep)
808  {
809  return TRUE;
810  }
811  }
812  else if (count>1 && i==count-1) // last node
813  {
814  if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep)
815  {
816  return TRUE;
817  }
818  }
819  else if (count>2 && i>0 && i<count-1) // intermediate node
820  {
821  if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep &&
822  nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep)
823  {
824  return TRUE;
825  }
826  }
827  return FALSE;
828 }
829 
830 static int getParagraphContext(DocPara *p,bool &isFirst,bool &isLast)
831 {
832  int t=0;
833  isFirst=FALSE;
834  isLast=FALSE;
835  if (p && p->parent())
836  {
837  switch (p->parent()->kind())
838  {
840  { // hierarchy: node N -> para -> parblock -> para
841  // adapt return value to kind of N
843  if ( p->parent()->parent() && p->parent()->parent()->parent() )
844  {
845  kind = p->parent()->parent()->parent()->kind();
846  }
847  isFirst=isFirstChildNode((DocParBlock*)p->parent(),p);
848  isLast =isLastChildNode ((DocParBlock*)p->parent(),p);
849  t=0;
850  if (isFirst)
851  {
852  if (kind==DocNode::Kind_HtmlListItem ||
854  {
855  t=1;
856  }
857  else if (kind==DocNode::Kind_HtmlDescData ||
858  kind==DocNode::Kind_XRefItem ||
860  {
861  t=2;
862  }
863  else if (kind==DocNode::Kind_HtmlCell ||
865  {
866  t=5;
867  }
868  }
869  if (isLast)
870  {
871  if (kind==DocNode::Kind_HtmlListItem ||
873  {
874  t=3;
875  }
876  else if (kind==DocNode::Kind_HtmlDescData ||
877  kind==DocNode::Kind_XRefItem ||
879  {
880  t=4;
881  }
882  else if (kind==DocNode::Kind_HtmlCell ||
884  {
885  t=6;
886  }
887  }
888  break;
889  }
891  isFirst=isFirstChildNode((DocAutoListItem*)p->parent(),p);
892  isLast =isLastChildNode ((DocAutoListItem*)p->parent(),p);
893  t=1; // not used
894  break;
896  isFirst=TRUE;
897  isLast =TRUE;
898  t=1; // not used
899  break;
901  isFirst=TRUE;
902  isLast =TRUE;
903  t=1; // not used
904  break;
906  isFirst=isFirstChildNode((DocHtmlListItem*)p->parent(),p);
907  isLast =isLastChildNode ((DocHtmlListItem*)p->parent(),p);
908  if (isFirst) t=1;
909  if (isLast) t=3;
910  break;
912  isFirst=isFirstChildNode((DocSecRefItem*)p->parent(),p);
913  isLast =isLastChildNode ((DocSecRefItem*)p->parent(),p);
914  if (isFirst) t=1;
915  if (isLast) t=3;
916  break;
918  isFirst=isFirstChildNode((DocHtmlDescData*)p->parent(),p);
919  isLast =isLastChildNode ((DocHtmlDescData*)p->parent(),p);
920  if (isFirst) t=2;
921  if (isLast) t=4;
922  break;
924  isFirst=isFirstChildNode((DocXRefItem*)p->parent(),p);
925  isLast =isLastChildNode ((DocXRefItem*)p->parent(),p);
926  if (isFirst) t=2;
927  if (isLast) t=4;
928  break;
930  isFirst=isFirstChildNode((DocSimpleSect*)p->parent(),p);
931  isLast =isLastChildNode ((DocSimpleSect*)p->parent(),p);
932  if (isFirst) t=2;
933  if (isLast) t=4;
935  // if the paragraph is enclosed with separators it will
936  // be included in <dd>..</dd> so avoid addition paragraph
937  // markers
938  {
939  isFirst=isLast=TRUE;
940  }
941  break;
943  isFirst=isFirstChildNode((DocHtmlCell*)p->parent(),p);
944  isLast =isLastChildNode ((DocHtmlCell*)p->parent(),p);
945  if (isFirst) t=5;
946  if (isLast) t=6;
947  break;
948  default:
949  break;
950  }
951  //printf("para=%p parent()->kind=%d isFirst=%d isLast=%d t=%d\n",
952  // p,p->parent()->kind(),isFirst,isLast,t);
953  }
954  return t;
955 }
956 
958 {
959  if (m_hide) return;
960 
961  //printf("DocPara::visitPre: parent of kind %d ",
962  // p->parent() ? p->parent()->kind() : -1);
963 
964  bool needsTag = FALSE;
965  if (p && p->parent())
966  {
967  switch (p->parent()->kind())
968  {
978  case DocNode::Kind_Copy:
981  needsTag = TRUE;
982  break;
983  case DocNode::Kind_Root:
984  needsTag = !((DocRoot*)p->parent())->singleLine();
985  break;
986  default:
987  needsTag = FALSE;
988  }
989  }
990 
991  // if the first element of a paragraph is something that should be outside of
992  // the paragraph (<ul>,<dl>,<table>,..) then that will already started the
993  // paragraph and we don't need to do it here
994  uint nodeIndex = 0;
995  if (p && nodeIndex<p->children().count())
996  {
997  while (nodeIndex<p->children().count() &&
998  p->children().at(nodeIndex)->kind()==DocNode::Kind_WhiteSpace)
999  {
1000  nodeIndex++;
1001  }
1002  if (nodeIndex<p->children().count())
1003  {
1004  DocNode *n = p->children().at(nodeIndex);
1005  if (mustBeOutsideParagraph(n))
1006  {
1007  needsTag = FALSE;
1008  }
1009  }
1010  }
1011 
1012  // check if this paragraph is the first or last child of a <li> or <dd>.
1013  // this allows us to mark the tag with a special class so we can
1014  // fix the otherwise ugly spacing.
1015  int t;
1016  static const char *contexts[7] =
1017  { "", // 0
1018  " class=\"startli\"", // 1
1019  " class=\"startdd\"", // 2
1020  " class=\"endli\"", // 3
1021  " class=\"enddd\"", // 4
1022  " class=\"starttd\"", // 5
1023  " class=\"endtd\"" // 6
1024  };
1025  bool isFirst;
1026  bool isLast;
1027  t = getParagraphContext(p,isFirst,isLast);
1028  //printf("startPara first=%d last=%d\n",isFirst,isLast);
1029  if (isFirst && isLast) needsTag=FALSE;
1030 
1031  //printf(" needsTag=%d\n",needsTag);
1032  // write the paragraph tag (if needed)
1033  if (needsTag) m_t << "<p" << contexts[t] << ">";
1034 }
1035 
1037 {
1038  bool needsTag = FALSE;
1039  if (p->parent())
1040  {
1041  switch (p->parent()->kind())
1042  {
1043  case DocNode::Kind_Section:
1052  case DocNode::Kind_Copy:
1055  needsTag = TRUE;
1056  break;
1057  case DocNode::Kind_Root:
1058  needsTag = !((DocRoot*)p->parent())->singleLine();
1059  break;
1060  default:
1061  needsTag = FALSE;
1062  }
1063  }
1064 
1065  // if the last element of a paragraph is something that should be outside of
1066  // the paragraph (<ul>,<dl>,<table>) then that will already have ended the
1067  // paragraph and we don't need to do it here
1068  int nodeIndex = p->children().count()-1;
1069  if (nodeIndex>=0)
1070  {
1071  while (nodeIndex>=0 && p->children().at(nodeIndex)->kind()==DocNode::Kind_WhiteSpace)
1072  {
1073  nodeIndex--;
1074  }
1075  if (nodeIndex>=0)
1076  {
1077  DocNode *n = p->children().at(nodeIndex);
1078  if (mustBeOutsideParagraph(n))
1079  {
1080  needsTag = FALSE;
1081  }
1082  }
1083  }
1084 
1085  bool isFirst;
1086  bool isLast;
1087  getParagraphContext(p,isFirst,isLast);
1088  //printf("endPara first=%d last=%d\n",isFirst,isLast);
1089  if (isFirst && isLast) needsTag=FALSE;
1090 
1091  //printf("DocPara::visitPost needsTag=%d\n",needsTag);
1092 
1093  if (needsTag) m_t << "</p>\n";
1094 
1095 }
1096 
1098 {
1099 }
1100 
1102 {
1103 }
1104 
1106 {
1107  if (m_hide) return;
1108  forceEndParagraph(s);
1109  m_t << "<dl class=\"section " << s->typeString() << "\"><dt>";
1110  switch(s->type())
1111  {
1112  case DocSimpleSect::See:
1113  m_t << theTranslator->trSeeAlso(); break;
1114  case DocSimpleSect::Return:
1115  m_t << theTranslator->trReturns(); break;
1116  case DocSimpleSect::Author:
1117  m_t << theTranslator->trAuthor(TRUE,TRUE); break;
1118  case DocSimpleSect::Authors:
1119  m_t << theTranslator->trAuthor(TRUE,FALSE); break;
1120  case DocSimpleSect::Version:
1121  m_t << theTranslator->trVersion(); break;
1122  case DocSimpleSect::Since:
1123  m_t << theTranslator->trSince(); break;
1124  case DocSimpleSect::Date:
1125  m_t << theTranslator->trDate(); break;
1126  case DocSimpleSect::Note:
1127  m_t << theTranslator->trNote(); break;
1129  m_t << theTranslator->trWarning(); break;
1130  case DocSimpleSect::Pre:
1131  m_t << theTranslator->trPrecondition(); break;
1132  case DocSimpleSect::Post:
1133  m_t << theTranslator->trPostcondition(); break;
1135  m_t << theTranslator->trCopyright(); break;
1136  case DocSimpleSect::Invar:
1137  m_t << theTranslator->trInvariant(); break;
1138  case DocSimpleSect::Remark:
1139  m_t << theTranslator->trRemarks(); break;
1141  m_t << theTranslator->trAttention(); break;
1142  case DocSimpleSect::User: break;
1143  case DocSimpleSect::Rcs: break;
1144  case DocSimpleSect::Unknown: break;
1145  }
1146 
1147  // special case 1: user defined title
1148  if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
1149  {
1150  m_t << "</dt><dd>";
1151  }
1152 }
1153 
1155 {
1156  if (m_hide) return;
1157  m_t << "</dd></dl>\n";
1159 }
1160 
1162 {
1163 }
1164 
1166 {
1167  if (m_hide) return;
1168  m_t << "</dt><dd>";
1169 }
1170 
1172 {
1173  if (m_hide) return;
1174  forceEndParagraph(sl);
1175  m_t << "<ul>";
1176  if (!sl->isPreformatted()) m_t << "\n";
1177 
1178 }
1179 
1181 {
1182  if (m_hide) return;
1183  m_t << "</ul>";
1184  if (!sl->isPreformatted()) m_t << "\n";
1185  forceStartParagraph(sl);
1186 }
1187 
1189 {
1190  if (m_hide) return;
1191  m_t << "<li>";
1192 }
1193 
1195 {
1196  if (m_hide) return;
1197  m_t << "</li>";
1198  if (!li->isPreformatted()) m_t << "\n";
1199 }
1200 
1202 {
1203  if (m_hide) return;
1204  forceEndParagraph(s);
1205  m_t << "<h" << s->level() << ">";
1206  m_t << "<a class=\"anchor\" id=\"" << s->anchor();
1207  m_t << "\"></a>" << endl;
1209  m_t << "</h" << s->level() << ">\n";
1210 }
1211 
1213 {
1215 }
1216 
1218 {
1219  if (m_hide) return;
1220  forceEndParagraph(s);
1221  if (s->type()==DocHtmlList::Ordered)
1222  {
1223  m_t << "<ol" << htmlAttribsToString(s->attribs()) << ">\n";
1224  }
1225  else
1226  {
1227  m_t << "<ul" << htmlAttribsToString(s->attribs()) << ">\n";
1228  }
1229 }
1230 
1232 {
1233  if (m_hide) return;
1234  if (s->type()==DocHtmlList::Ordered)
1235  {
1236  m_t << "</ol>";
1237  }
1238  else
1239  {
1240  m_t << "</ul>";
1241  }
1242  if (!s->isPreformatted()) m_t << "\n";
1244 }
1245 
1247 {
1248  if (m_hide) return;
1249  m_t << "<li" << htmlAttribsToString(i->attribs()) << ">";
1250  if (!i->isPreformatted()) m_t << "\n";
1251 }
1252 
1254 {
1255  if (m_hide) return;
1256  m_t << "</li>\n";
1257 }
1258 
1260 {
1261  if (m_hide) return;
1262  forceEndParagraph(dl);
1263  m_t << "<dl" << htmlAttribsToString(dl->attribs()) << ">\n";
1264 }
1265 
1267 {
1268  if (m_hide) return;
1269  m_t << "</dl>\n";
1270  forceStartParagraph(dl);
1271 }
1272 
1274 {
1275  if (m_hide) return;
1276  m_t << "<dt" << htmlAttribsToString(dt->attribs()) << ">";
1277 }
1278 
1280 {
1281  if (m_hide) return;
1282  m_t << "</dt>\n";
1283 }
1284 
1286 {
1287  if (m_hide) return;
1288  m_t << "<dd" << htmlAttribsToString(dd->attribs()) << ">";
1289 }
1290 
1292 {
1293  if (m_hide) return;
1294  m_t << "</dd>\n";
1295 }
1296 
1298 {
1299  if (m_hide) return;
1300 
1301  forceEndParagraph(t);
1302 
1303  if (t->hasCaption())
1304  {
1305  m_t << "<a class=\"anchor\" id=\"" << t->caption()->anchor() << "\"></a>\n";
1306  }
1307 
1308  QString attrs = htmlAttribsToString(t->attribs());
1309  if (attrs.isEmpty())
1310  {
1311  m_t << "<table class=\"doxtable\">\n";
1312  }
1313  else
1314  {
1315  m_t << "<table " << htmlAttribsToString(t->attribs()) << ">\n";
1316  }
1317 }
1318 
1320 {
1321  if (m_hide) return;
1322  m_t << "</table>\n";
1324 }
1325 
1327 {
1328  if (m_hide) return;
1329  m_t << "<tr" << htmlAttribsToString(tr->attribs()) << ">\n";
1330 }
1331 
1333 {
1334  if (m_hide) return;
1335  m_t << "</tr>\n";
1336 }
1337 
1339 {
1340  if (m_hide) return;
1341  if (c->isHeading())
1342  {
1343  m_t << "<th" << htmlAttribsToString(c->attribs()) << ">";
1344  }
1345  else
1346  {
1347  m_t << "<td" << htmlAttribsToString(c->attribs()) << ">";
1348  }
1349 }
1350 
1352 {
1353  if (m_hide) return;
1354  if (c->isHeading()) m_t << "</th>"; else m_t << "</td>";
1355 }
1356 
1358 {
1359  if (m_hide) return;
1360  bool hasAlign = FALSE;
1362  HtmlAttrib *att;
1363  QCString id;
1364  m_t << "<caption" << htmlAttribsToString(c->attribs()) << ">";
1365 }
1366 
1368 {
1369  if (m_hide) return;
1370  m_t << "</caption>\n";
1371 }
1372 
1374 {
1375  if (m_hide) return;
1376  //forceEndParagraph(i);
1377  //m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>" << endl;
1378 }
1379 
1381 {
1382  if (m_hide) return;
1383  //forceStartParagraph(i);
1384 }
1385 
1387 {
1388  if (m_hide) return;
1389  if (href->url().left(7)=="mailto:")
1390  {
1391  writeObfuscatedMailAddress(href->url().mid(7));
1392  }
1393  else
1394  {
1395  QCString url = correctURL(href->url(),href->relPath());
1396  m_t << "<a href=\"" << convertToXML(url) << "\""
1397  << htmlAttribsToString(href->attribs()) << ">";
1398  }
1399 }
1400 
1402 {
1403  if (m_hide) return;
1404  m_t << "</a>";
1405 }
1406 
1408 {
1409  if (m_hide) return;
1410  forceEndParagraph(header);
1411  m_t << "<h" << header->level()
1412  << htmlAttribsToString(header->attribs()) << ">";
1413 }
1414 
1416 {
1417  if (m_hide) return;
1418  m_t << "</h" << header->level() << ">\n";
1419  forceStartParagraph(header);
1420 }
1421 
1423 {
1424  if (img->type()==DocImage::Html)
1425  {
1426  forceEndParagraph(img);
1427  if (m_hide) return;
1428  QString baseName=img->name();
1429  int i;
1430  if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
1431  {
1432  baseName=baseName.right(baseName.length()-i-1);
1433  }
1434  m_t << "<div class=\"image\">" << endl;
1435  QCString url = img->url();
1436  if (url.isEmpty())
1437  {
1438  m_t << "<img src=\"" << img->relPath() << img->name() << "\" alt=\""
1439  << baseName << "\"" << htmlAttribsToString(img->attribs())
1440  << "/>" << endl;
1441  }
1442  else
1443  {
1444  m_t << "<img src=\"" << correctURL(url,img->relPath()) << "\" "
1445  << htmlAttribsToString(img->attribs())
1446  << "/>" << endl;
1447  }
1448  if (img->hasCaption())
1449  {
1450  m_t << "<div class=\"caption\">" << endl;
1451  }
1452  }
1453  else // other format -> skip
1454  {
1455  pushEnabled();
1456  m_hide=TRUE;
1457  }
1458 }
1459 
1461 {
1462  if (img->type()==DocImage::Html)
1463  {
1464  if (m_hide) return;
1465  if (img->hasCaption())
1466  {
1467  m_t << "</div>";
1468  }
1469  m_t << "</div>" << endl;
1470  forceStartParagraph(img);
1471  }
1472  else // other format
1473  {
1474  popEnabled();
1475  }
1476 }
1477 
1479 {
1480  if (m_hide) return;
1481  m_t << "<div class=\"dotgraph\">" << endl;
1482  writeDotFile(df->file(),df->relPath(),df->context());
1483  if (df->hasCaption())
1484  {
1485  m_t << "<div class=\"caption\">" << endl;
1486  }
1487 }
1488 
1490 {
1491  if (m_hide) return;
1492  if (df->hasCaption())
1493  {
1494  m_t << "</div>" << endl;
1495  }
1496  m_t << "</div>" << endl;
1497 }
1498 
1500 {
1501  if (m_hide) return;
1502  m_t << "<div class=\"mscgraph\">" << endl;
1503  writeMscFile(df->file(),df->relPath(),df->context());
1504  if (df->hasCaption())
1505  {
1506  m_t << "<div class=\"caption\">" << endl;
1507  }
1508 }
1510 {
1511  if (m_hide) return;
1512  if (df->hasCaption())
1513  {
1514  m_t << "</div>" << endl;
1515  }
1516  m_t << "</div>" << endl;
1517 }
1518 
1520 {
1521  if (m_hide) return;
1522  m_t << "<div class=\"diagraph\">" << endl;
1523  writeDiaFile(df->file(),df->relPath(),df->context());
1524  if (df->hasCaption())
1525  {
1526  m_t << "<div class=\"caption\">" << endl;
1527  }
1528 }
1530 {
1531  if (m_hide) return;
1532  if (df->hasCaption())
1533  {
1534  m_t << "</div>" << endl;
1535  }
1536  m_t << "</div>" << endl;
1537 }
1538 
1540 {
1541  if (m_hide) return;
1542  startLink(lnk->ref(),lnk->file(),lnk->relPath(),lnk->anchor());
1543 }
1544 
1546 {
1547  if (m_hide) return;
1548  endLink();
1549 }
1550 
1552 {
1553  if (m_hide) return;
1554  if (!ref->file().isEmpty())
1555  {
1556  // when ref->isSubPage()==TRUE we use ref->file() for HTML and
1557  // ref->anchor() for LaTeX/RTF
1558  startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? QCString() : ref->anchor());
1559  }
1560  if (!ref->hasLinkText()) filter(ref->targetTitle());
1561 }
1562 
1564 {
1565  if (m_hide) return;
1566  if (!ref->file().isEmpty()) endLink();
1567  //m_t << " ";
1568 }
1569 
1571 {
1572  if (m_hide) return;
1573  QString refName=ref->file();
1574  if (refName.right(Doxygen::htmlFileExtension.length())!=
1576  {
1577  refName+=Doxygen::htmlFileExtension;
1578  }
1579  m_t << "<li><a href=\"" << refName << "#" << ref->anchor() << "\">";
1580 
1581 }
1582 
1584 {
1585  if (m_hide) return;
1586  m_t << "</a></li>\n";
1587 }
1588 
1590 {
1591  if (m_hide) return;
1592  forceEndParagraph(s);
1593  m_t << "<div class=\"multicol\">" << endl;
1594  m_t << "<ul>" << endl;
1595 }
1596 
1598 {
1599  if (m_hide) return;
1600  m_t << "</ul>" << endl;
1601  m_t << "</div>" << endl;
1603 }
1604 
1605 //void HtmlDocVisitor::visitPre(DocLanguage *l)
1606 //{
1607 // QString langId = Config_getEnum("OUTPUT_LANGUAGE");
1608 // if (l->id().lower()!=langId.lower())
1609 // {
1610 // pushEnabled();
1611 // m_hide = TRUE;
1612 // }
1613 //}
1614 //
1615 //void HtmlDocVisitor::visitPost(DocLanguage *l)
1616 //{
1617 // QString langId = Config_getEnum("OUTPUT_LANGUAGE");
1618 // if (l->id().lower()!=langId.lower())
1619 // {
1620 // popEnabled();
1621 // }
1622 //}
1623 
1625 {
1626  if (m_hide) return;
1627  forceEndParagraph(s);
1629  QCString heading;
1630  switch(s->type())
1631  {
1632  case DocParamSect::Param:
1633  heading=theTranslator->trParameters();
1634  className="params";
1635  break;
1636  case DocParamSect::RetVal:
1637  heading=theTranslator->trReturnValues();
1638  className="retval";
1639  break;
1641  heading=theTranslator->trExceptions();
1642  className="exception";
1643  break;
1646  className="tparams";
1647  break;
1648  default:
1649  ASSERT(0);
1650  }
1651  m_t << "<dl class=\"" << className << "\"><dt>";
1652  m_t << heading;
1653  m_t << "</dt><dd>" << endl;
1654  m_t << " <table class=\"" << className << "\">" << endl;
1655 }
1656 
1658 {
1659  if (m_hide) return;
1660  m_t << " </table>" << endl;
1661  m_t << " </dd>" << endl;
1662  m_t << "</dl>" << endl;
1664 }
1665 
1667 {
1668  //printf("DocParamList::visitPre\n");
1669  if (m_hide) return;
1670  m_t << " <tr>";
1671  DocParamSect *sect = 0;
1672  if (pl->parent()->kind()==DocNode::Kind_ParamSect)
1673  {
1674  sect=(DocParamSect*)pl->parent();
1675  }
1676  if (sect && sect->hasInOutSpecifier())
1677  {
1678  m_t << "<td class=\"paramdir\">";
1680  {
1681  m_t << "[";
1682  if (pl->direction()==DocParamSect::In)
1683  {
1684  m_t << "in";
1685  }
1686  else if (pl->direction()==DocParamSect::Out)
1687  {
1688  m_t << "out";
1689  }
1690  else if (pl->direction()==DocParamSect::InOut)
1691  {
1692  m_t << "in,out";
1693  }
1694  m_t << "]";
1695  }
1696  m_t << "</td>";
1697  }
1698  if (sect && sect->hasTypeSpecifier())
1699  {
1700  m_t << "<td class=\"paramtype\">";
1702  DocNode *type;
1703  bool first=TRUE;
1704  for (li.toFirst();(type=li.current());++li)
1705  {
1706  if (!first) m_t << "&#160;|&#160;"; else first=FALSE;
1707  if (type->kind()==DocNode::Kind_Word)
1708  {
1709  visit((DocWord*)type);
1710  }
1711  else if (type->kind()==DocNode::Kind_LinkedWord)
1712  {
1713  visit((DocLinkedWord*)type);
1714  }
1715  }
1716  m_t << "</td>";
1717  }
1718  m_t << "<td class=\"paramname\">";
1719  //QStrListIterator li(pl->parameters());
1720  //const char *s;
1722  DocNode *param;
1723  bool first=TRUE;
1724  for (li.toFirst();(param=li.current());++li)
1725  {
1726  if (!first) m_t << ","; else first=FALSE;
1727  if (param->kind()==DocNode::Kind_Word)
1728  {
1729  visit((DocWord*)param);
1730  }
1731  else if (param->kind()==DocNode::Kind_LinkedWord)
1732  {
1733  visit((DocLinkedWord*)param);
1734  }
1735  }
1736  m_t << "</td><td>";
1737 }
1738 
1740 {
1741  //printf("DocParamList::visitPost\n");
1742  if (m_hide) return;
1743  m_t << "</td></tr>" << endl;
1744 }
1745 
1747 {
1748  if (m_hide) return;
1749  if (x->title().isEmpty()) return;
1750 
1751  forceEndParagraph(x);
1752  bool anonymousEnum = x->file()=="@";
1753  if (!anonymousEnum)
1754  {
1755  m_t << "<dl class=\"" << x->key() << "\"><dt><b><a class=\"el\" href=\""
1756  << x->relPath() << x->file() << Doxygen::htmlFileExtension
1757  << "#" << x->anchor() << "\">";
1758  }
1759  else
1760  {
1761  m_t << "<dl class=\"" << x->key() << "\"><dt><b>";
1762  }
1763  filter(x->title());
1764  m_t << ":";
1765  if (!anonymousEnum) m_t << "</a>";
1766  m_t << "</b></dt><dd>";
1767 }
1768 
1770 {
1771  if (m_hide) return;
1772  if (x->title().isEmpty()) return;
1773  m_t << "</dd></dl>" << endl;
1775 }
1776 
1778 {
1779  if (m_hide) return;
1780  startLink(0,ref->file(),ref->relPath(),ref->anchor());
1781 }
1782 
1784 {
1785  if (m_hide) return;
1786  endLink();
1787  m_t << " ";
1788 }
1789 
1791 {
1792 }
1793 
1795 {
1796 }
1797 
1799 {
1800 }
1801 
1803 {
1804 }
1805 
1807 {
1808  if (m_hide) return;
1809  forceEndParagraph(b);
1810  QString attrs = htmlAttribsToString(b->attribs());
1811  if (attrs.isEmpty())
1812  {
1813  m_t << "<blockquote class=\"doxtable\">\n";
1814  }
1815  else
1816  {
1817  m_t << "<blockquote " << htmlAttribsToString(b->attribs()) << ">\n";
1818  }
1819 }
1820 
1822 {
1823  if (m_hide) return;
1824  m_t << "</blockquote>" << endl;
1826 }
1827 
1829 {
1830  if (m_hide) return;
1831  if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
1832  {
1833  forceEndParagraph(vf);
1835  m_t << "<p>";
1836  m_t << "flowchart: " ; // TODO: translate me
1837  m_t << "<a href=\"";
1838  m_t << fname.data();
1839  m_t << ".svg\">";
1841  m_t << "</a>";
1842  if (vf->hasCaption())
1843  {
1844  m_t << "<br />";
1845  }
1846  }
1847 }
1848 
1850 {
1851  if (m_hide) return;
1852  if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
1853  {
1854  m_t << "</p>";
1855  forceStartParagraph(vf);
1856  }
1857 }
1858 
1860 {
1861  if (m_hide) return;
1862 }
1863 
1865 {
1866  if (m_hide) return;
1867 }
1868 
1869 
1870 
1871 void HtmlDocVisitor::filter(const char *str)
1872 {
1873  if (str==0) return;
1874  const char *p=str;
1875  char c;
1876  while (*p)
1877  {
1878  c=*p++;
1879  switch(c)
1880  {
1881  case '<': m_t << "&lt;"; break;
1882  case '>': m_t << "&gt;"; break;
1883  case '&': m_t << "&amp;"; break;
1884  default: m_t << c;
1885  }
1886  }
1887 }
1888 
1889 /// Escape basic entities to produce a valid CDATA attribute value,
1890 /// assume that the outer quoting will be using the double quote &quot;
1892 {
1893  if (str==0) return;
1894  const char *p=str;
1895  char c;
1896  while (*p)
1897  {
1898  c=*p++;
1899  switch(c)
1900  {
1901  case '&': m_t << "&amp;"; break;
1902  case '"': m_t << "&quot;"; break;
1903  case '<': m_t << "&lt;"; break;
1904  case '>': m_t << "&gt;"; break;
1905  default: m_t << c;
1906  }
1907  }
1908 }
1909 
1911  const QCString &relPath,const QCString &anchor,
1912  const QCString &tooltip)
1913 {
1914  //printf("HtmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
1915  if (!ref.isEmpty()) // link to entity imported via tag file
1916  {
1917  m_t << "<a class=\"elRef\" ";
1918  m_t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
1919  }
1920  else // local link
1921  {
1922  m_t << "<a class=\"el\" ";
1923  }
1924  m_t << "href=\"";
1925  m_t << externalRef(relPath,ref,TRUE);
1926  if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension;
1927  if (!anchor.isEmpty()) m_t << "#" << anchor;
1928  m_t << "\"";
1929  if (!tooltip.isEmpty()) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
1930  m_t << ">";
1931 }
1932 
1934 {
1935  m_t << "</a>";
1936 }
1937 
1939 {
1940  m_enabled.push(new bool(m_hide));
1941 }
1942 
1944 {
1945  bool *v=m_enabled.pop();
1946  ASSERT(v!=0);
1947  m_hide = *v;
1948  delete v;
1949 }
1950 
1952  const QCString &context)
1953 {
1955  int i;
1956  if ((i=baseName.findRev('/'))!=-1)
1957  {
1958  baseName=baseName.right(baseName.length()-i-1);
1959  }
1960  if ((i=baseName.find('.'))!=-1) // strip extension
1961  {
1962  baseName=baseName.left(i);
1963  }
1964  baseName.prepend("dot_");
1965  QCString outDir = Config_getString("HTML_OUTPUT");
1966  writeDotGraphFromFile(fn,outDir,baseName,GOF_BITMAP);
1967  writeDotImageMapFromFile(m_t,fn,outDir,relPath,baseName,context);
1968 }
1969 
1971  const QCString &relPath,
1972  const QCString &context)
1973 {
1975  int i;
1976  if ((i=baseName.findRev('/'))!=-1) // strip path
1977  {
1978  baseName=baseName.right(baseName.length()-i-1);
1979  }
1980  if ((i=baseName.find('.'))!=-1) // strip extension
1981  {
1982  baseName=baseName.left(i);
1983  }
1984  baseName.prepend("msc_");
1985  QCString outDir = Config_getString("HTML_OUTPUT");
1986  QCString imgExt = getDotImageExtension();
1987  MscOutputFormat mscFormat = MSC_BITMAP;
1988  if ("svg" == imgExt)
1989  mscFormat = MSC_SVG;
1990  writeMscGraphFromFile(fileName,outDir,baseName,mscFormat);
1991  writeMscImageMapFromFile(m_t,fileName,outDir,relPath,baseName,context,mscFormat);
1992 }
1993 
1995  const QCString &relPath,
1996  const QCString &)
1997 {
1999  int i;
2000  if ((i=baseName.findRev('/'))!=-1) // strip path
2001  {
2002  baseName=baseName.right(baseName.length()-i-1);
2003  }
2004  if ((i=baseName.find('.'))!=-1) // strip extension
2005  {
2006  baseName=baseName.left(i);
2007  }
2008  baseName.prepend("dia_");
2009  QCString outDir = Config_getString("HTML_OUTPUT");
2010  writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
2011 
2012  m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl;
2013 }
2014 
2016  const QCString &relPath,
2017  const QCString &)
2018 {
2020  int i;
2021  if ((i=baseName.findRev('/'))!=-1) // strip path
2022  {
2023  baseName=baseName.right(baseName.length()-i-1);
2024  }
2025  if ((i=baseName.findRev('.'))!=-1) // strip extension
2026  {
2027  baseName=baseName.left(i);
2028  }
2029  static QCString outDir = Config_getString("HTML_OUTPUT");
2030  QCString imgExt = getDotImageExtension();
2031  if (imgExt=="svg")
2032  {
2033  generatePlantUMLOutput(fileName,outDir,PUML_SVG);
2034  //m_t << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" << relPath << baseName << ".svg" << "\" />" << endl;
2035  //m_t << "<p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p>";
2036  //m_t << "</iframe>" << endl;
2037  m_t << "<object type=\"image/svg+xml\" data=\"" << relPath << baseName << ".svg\"></object>" << endl;
2038  }
2039  else
2040  {
2041  generatePlantUMLOutput(fileName,outDir,PUML_BITMAP);
2042  m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl;
2043  }
2044 }
2045 
2046 /** Returns TRUE if the child nodes in paragraph \a para until \a nodeIndex
2047  contain a style change node that is still active and that style change is one that
2048  must be located outside of a paragraph, i.e. it is a center, div, or pre tag.
2049  See also bug746162.
2050  */
2051 static bool insideStyleChangeThatIsOutsideParagraph(DocPara *para,int nodeIndex)
2052 {
2053  //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2054  int styleMask=0;
2055  bool styleOutsideParagraph=FALSE;
2056  while (nodeIndex>=0 && !styleOutsideParagraph)
2057  {
2058  DocNode *n = para->children().at(nodeIndex);
2059  if (n->kind()==DocNode::Kind_StyleChange)
2060  {
2061  DocStyleChange *sc = (DocStyleChange*)n;
2062  if (!sc->enable()) // remember styles that has been closed already
2063  {
2064  styleMask|=(int)sc->style();
2065  }
2066  bool paraStyle = sc->style()==DocStyleChange::Center ||
2067  sc->style()==DocStyleChange::Div ||
2069  //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2070  if (sc->enable() && (styleMask&(int)sc->style())==0 && // style change that is still active
2071  paraStyle
2072  )
2073  {
2074  styleOutsideParagraph=TRUE;
2075  }
2076  }
2077  nodeIndex--;
2078  }
2079  return styleOutsideParagraph;
2080 }
2081 
2082 /** Used for items found inside a paragraph, which due to XHTML restrictions
2083  * have to be outside of the paragraph. This method will forcefully end
2084  * the current paragraph and forceStartParagraph() will restart it.
2085  */
2087 {
2088  //printf("forceEndParagraph(%p) %d\n",n,n->kind());
2089  if (n->parent() && n->parent()->kind()==DocNode::Kind_Para)
2090  {
2091  DocPara *para = (DocPara*)n->parent();
2092  int nodeIndex = para->children().findRef(n);
2093  nodeIndex--;
2094  if (nodeIndex<0) return; // first node
2095  while (nodeIndex>=0 &&
2096  para->children().at(nodeIndex)->kind()==DocNode::Kind_WhiteSpace
2097  )
2098  {
2099  nodeIndex--;
2100  }
2101  if (nodeIndex>=0)
2102  {
2103  DocNode *n = para->children().at(nodeIndex);
2104  //printf("n=%p kind=%d outside=%d\n",n,n->kind(),mustBeOutsideParagraph(n));
2105  if (mustBeOutsideParagraph(n)) return;
2106  }
2107  nodeIndex--;
2108  bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
2109  bool isFirst;
2110  bool isLast;
2111  getParagraphContext(para,isFirst,isLast);
2112  //printf("forceEnd first=%d last=%d styleOutsideParagraph=%d\n",isFirst,isLast,styleOutsideParagraph);
2113  if (isFirst && isLast) return;
2114  if (styleOutsideParagraph) return;
2115 
2116  m_t << "</p>";
2117  }
2118 }
2119 
2120 /** Used for items found inside a paragraph, which due to XHTML restrictions
2121  * have to be outside of the paragraph. This method will forcefully start
2122  * the paragraph, that was previously ended by forceEndParagraph().
2123  */
2125 {
2126  //printf("forceStartParagraph(%p) %d\n",n,n->kind());
2127  if (n->parent() && n->parent()->kind()==DocNode::Kind_Para) // if we are inside a paragraph
2128  {
2129  DocPara *para = (DocPara*)n->parent();
2130  int nodeIndex = para->children().findRef(n);
2131  int numNodes = para->children().count();
2132  bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
2133  if (styleOutsideParagraph) return;
2134  nodeIndex++;
2135  if (nodeIndex==numNodes) return; // last node
2136  while (nodeIndex<numNodes &&
2137  para->children().at(nodeIndex)->kind()==DocNode::Kind_WhiteSpace
2138  )
2139  {
2140  nodeIndex++;
2141  }
2142  if (nodeIndex<numNodes)
2143  {
2144  DocNode *n = para->children().at(nodeIndex);
2145  if (mustBeOutsideParagraph(n)) return;
2146  }
2147  else
2148  {
2149  return; // only whitespace at the end!
2150  }
2151 
2152  bool isFirst;
2153  bool isLast;
2154  getParagraphContext(para,isFirst,isLast);
2155  //printf("forceStart first=%d last=%d\n",isFirst,isLast);
2156  if (isFirst && isLast) return;
2157 
2158  m_t << "<p>";
2159  }
2160 }
2161 
QCString convertToXML(const char *s)
Definition: util.cpp:5717
DocNode * parent() const
Definition: docparser.h:147
QCString exampleFile() const
Definition: docparser.h:454
Type type() const
Definition: docparser.h:532
Type type() const
Definition: docparser.h:1034
virtual QCString trPrecondition()=0
const HtmlAttribList & attribs() const
Definition: docparser.h:1267
virtual QCString trSince()=0
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
QCString name() const
Definition: docparser.h:695
QCString file() const
Definition: docparser.h:723
QCString anchor() const
Definition: docparser.h:830
QCString relPath() const
Definition: docparser.h:877
QCString ref() const
Definition: docparser.h:219
QCString anchor() const
Definition: docparser.h:277
void writeMscGraphFromFile(const char *inFile, const char *outDir, const char *outFile, MscOutputFormat format)
Definition: msc.cpp:92
void writePlantUMLFile(const QCString &fileName, const QCString &relPath, const QCString &context)
bool isEmpty() const
Definition: qstring.h:682
QCString url() const
Definition: docparser.h:239
CodeOutputInterface & m_ci
const HtmlAttribList & attribs() const
Definition: docparser.h:927
QCString text() const
Definition: docparser.h:296
virtual QCString trAttention()=0
MemberDef * member() const
Definition: docparser.h:585
bool isFirst() const
Definition: docparser.h:537
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
QCString relPath() const
Definition: docparser.h:564
DocHtmlCaption * caption() const
Definition: docparser.h:1359
QCString file() const
Definition: docparser.h:747
QCString file() const
Definition: docparser.h:966
static TemplateVariant parseCode(MemberDef *md, const QCString &scopeName, const QCString &relPath, const QCString &code, int startLine=-1, int endLine=-1, bool showLineNumbers=FALSE)
Definition: context.cpp:1266
uint length() const
Definition: qcstring.h:195
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition: util.cpp:5822
bool isEmail() const
Definition: docparser.h:242
int level() const
Definition: docparser.h:942
QCString anchor() const
Definition: docparser.h:944
QCString typeString() const
Definition: docparser.cpp:4622
#define IO_WriteOnly
Definition: qiodevice.h:62
bool hasCaption() const
Definition: docparser.h:773
static QCString htmlFileExtension
Definition: doxygen.h:130
virtual QCString trInvariant()=0
QCString blockId() const
Definition: docparser.h:505
void writeDotImageMapFromFile(FTextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, int graphId)
Definition: dot.cpp:4255
int findRef(const type *d) const
Definition: qlist.h:89
static void visitPreCaption(FTextStream &t, DocVerbatim *s)
static QCString convertNameToFileName()
Concrete visitor implementation for HTML output.
const HtmlAttribList & attribs() const
Definition: docparser.h:1382
void startLink(const QCString &ref, const QCString &file, const QCString &relPath, const QCString &anchor, const QCString &tooltip="")
char & at(uint i) const
Definition: qcstring.h:326
virtual QCString trPostcondition()=0
QCString text() const
Definition: docparser.h:503
Type type() const
Definition: docparser.h:1101
QCString relPath() const
Definition: docparser.h:724
const bool FALSE
Definition: qglobal.h:370
const HtmlAttribList & attribs() const
Definition: docparser.h:1242
static const MemberDef * getFlowMember()
Definition: vhdldocgen.cpp:95
const HtmlAttribList & attribs() const
Definition: docparser.h:1354
virtual QCString trWarning()=0
static void visitPostCaption(FTextStream &t, DocVerbatim *s)
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content)
Definition: plantuml.cpp:25
const HtmlAttribList & attribs() const
Definition: docparser.h:1036
type * at(uint i) const
Definition: qlist.h:94
QCString m_langExt
static QCString className
Definition: declinfo.cpp:669
const HtmlAttribList & attribs() const
Definition: docparser.h:1294
QCString left(uint len) const
Definition: qcstring.cpp:213
virtual QCString trCopyright()=0
const QList< DocNode > & paramTypes()
Definition: docparser.h:1170
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
#define PREFRAG_END
Definition: htmlgen.h:27
const int DocVisitor_Html
Definition: docvisitor.h:23
static HtmlEntityMapper * instance()
Definition: htmlentity.cpp:341
QTextStream & hex(QTextStream &s)
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QCString tooltip() const
Definition: docparser.h:221
QCString file() const
Definition: docparser.h:827
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
Type type() const
Definition: docparser.h:502
virtual Kind kind() const =0
QCString anchor() const
Definition: docparser.h:859
QCString ref() const
Definition: docparser.h:294
void visitPre(DocAutoList *)
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
QCString correctURL(const QCString &url, const QCString &relPath)
Definition: util.cpp:8084
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString anchor() const
Definition: docparser.h:967
Definition * scope() const
Definition: docparser.h:584
virtual QCString trReturns()=0
virtual QCString trDate()=0
const HtmlAttribList & attribs() const
Definition: docparser.h:896
QCString getDefFileExtension() const
virtual QCString trNote()=0
static QCString convertIndexWordToAnchor(const QString &word)
void push(const type *d)
Definition: qstack.h:58
QCString exampleFile() const
Definition: docparser.h:542
QCString extractBlock(const QCString text, const QCString marker)
Definition: util.cpp:7998
int level() const
Definition: docparser.h:894
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:90
bool isExample() const
Definition: docparser.h:453
virtual QCString trExceptions()=0
bool isSubPage() const
Definition: docparser.h:836
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
QCString relPath() const
Definition: docparser.h:858
static ParserManager * parserManager
Definition: doxygen.h:141
QCString targetTitle() const
Definition: docparser.h:831
def cli(ctx)
Definition: main.py:7
#define PREFRAG_START
Definition: htmlgen.h:26
const HtmlAttribList & attribs() const
Definition: docparser.h:880
uint count() const
Definition: qlist.h:66
QCString relPath() const
Definition: docparser.h:672
int writeBlock(const char *data, uint len)
Definition: qfile_unix.cpp:537
QCString file() const
Definition: docparser.h:292
const char * data() const
Definition: qstring.h:542
bool hasCaption()
Definition: docparser.h:794
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor=0, const char *title=0)
Definition: index.h:142
QAsciiDict< Entry > fn
QCString file() const
Definition: docparser.h:771
QCString context() const
Definition: docparser.h:776
QCString ref() const
Definition: docparser.h:829
const QCString & name() const
Definition: definition.h:114
QCString value
Definition: htmlattrib.h:25
const double e
QCString file() const
Definition: docparser.h:857
virtual QCString trParameters()=0
QCString context() const
Definition: docparser.h:728
QCString relPath() const
Definition: docparser.h:772
QCString text() const
Definition: docparser.h:450
fileName
Definition: dumpTree.py:9
#define nodes
QCString text() const
Definition: docparser.h:563
QCString context() const
Definition: docparser.h:752
QCString anchor() const
Definition: docparser.h:670
FTextStream & m_t
QCString word() const
Definition: docparser.h:199
bool hasCaption() const
Definition: docparser.h:749
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
void visit(DocWord *)
QCString right(uint len) const
Definition: qcstring.cpp:231
uint length() const
Definition: qstring.h:679
bool hasCaption() const
Definition: docparser.h:696
std::void_t< T > n
virtual QCString trAuthor(bool first_capital, bool singular)=0
bool open(int)
Definition: qfile_unix.cpp:134
bool isExample() const
Definition: docparser.h:541
QCString context() const
Definition: docparser.h:535
virtual QCString trReturnValues()=0
int id() const
Definition: docvisitor.h:96
QCString relPath() const
Definition: docparser.h:828
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
const QList< DocNode > & children() const
Definition: docparser.h:461
void writeDotGraphFromFile(const char *inFile, const char *outDir, const char *outFile, GraphOutputFormat format)
Definition: dot.cpp:4203
p
Definition: test.py:223
QCString text() const
Definition: docparser.h:533
QCString key() const
Definition: docparser.h:673
A bunch of utility functions.
bool isLast() const
Definition: docparser.h:538
const char * data() const
Definition: qcstring.h:207
QCString anchor() const
Definition: memberdef.cpp:1031
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
Definition: htmlentity.cpp:386
Html attribute list iterator.
Definition: htmlattrib.h:71
Definition: msc.h:24
const HtmlAttribList & attribs() const
Definition: docparser.h:1226
#define Config_getString(val)
Definition: config.cpp:660
type * current() const
Definition: qlist.h:146
QCString url() const
Definition: docparser.h:876
virtual QCString trVersion()=0
Definition: msc.h:24
#define Config_getBool(val)
Definition: config.cpp:664
bool isBlock() const
Definition: docparser.h:457
Type type() const
Definition: docparser.h:1057
Style style() const
Definition: docparser.h:329
QCString getDotImageExtension(void)
Definition: util.cpp:8562
bool isHeading() const
Definition: docparser.h:1260
MscOutputFormat
Definition: msc.h:24
void generatePlantUMLOutput(const char *baseName, const char *outDir, PlantUMLOutputFormat format)
Definition: plantuml.cpp:54
void writeObfuscatedMailAddress(const QCString &url)
void err(const char *fmt,...)
Definition: message.cpp:226
QCString entry() const
Definition: docparser.h:586
bool isExample() const
Definition: docparser.h:506
bool isLastChildNode(T *parent, DocNode *node)
type * pop()
Definition: qstack.h:59
int findRev(QChar c, int index=-1, bool cs=TRUE) const
Definition: qstring.cpp:13021
static QString htmlAttribsToString(const HtmlAttribList &attribs)
QCString relPath() const
Definition: docparser.h:748
QCString word() const
Definition: docparser.h:215
bool isInline()
Definition: docparser.h:567
QCString relPath() const
Definition: docparser.h:455
static bool mustBeOutsideParagraph(DocNode *n)
QCString language() const
Definition: docparser.h:456
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
DocParamSect::Direction direction() const
Definition: docparser.h:1172
QCString title() const
Definition: docparser.h:943
void filter(const char *str)
void forceEndParagraph(DocNode *n)
QCString file() const
Definition: docparser.h:495
bool hasInOutSpecifier() const
Definition: docparser.h:1103
const QList< DocNode > & parameters()
Definition: docparser.h:1169
static void visitCaption(HtmlDocVisitor *parent, QList< DocNode > children)
void writeDiaGraphFromFile(const char *inFile, const char *outDir, const char *outFile, DiaOutputFormat format)
Definition: dia.cpp:28
const HtmlAttribList & attribs() const
Definition: docparser.h:334
bool isSeparatedParagraph(DocSimpleSect *parent, DocPara *par)
QCString context() const
Definition: docparser.h:451
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
static const int NUM_HTML_LIST_TYPES
static const char types[][NUM_HTML_LIST_TYPES]
QCString relPath() const
Definition: docparser.h:699
bool isEnumList() const
Definition: docparser.h:621
bool hasTypeSpecifier() const
Definition: docparser.h:1104
SymType symbol() const
Definition: docparser.h:418
QCString file() const
Definition: docparser.h:669
virtual QCString trTemplateParameters()=0
bool hasLinkText() const
Definition: docparser.h:832
static QCString type
Definition: declinfo.cpp:672
bool remove()
Definition: qfile.cpp:205
static int getParagraphContext(DocPara *p, bool &isFirst, bool &isLast)
const HtmlAttribList & attribs() const
Definition: docparser.h:701
QStack< bool > m_enabled
static bool * b
Definition: config.cpp:1043
Definition * m_ctx
Translator * theTranslator
Definition: language.cpp:157
QCString anchor() const
Definition: docparser.h:1298
const HtmlAttribList & attribs() const
Definition: docparser.h:912
QCString exampleFile() const
Definition: docparser.h:507
QCString context() const
Definition: docparser.h:504
QCString anchor() const
Definition: docparser.h:295
list x
Definition: train.py:276
virtual QCString trRemarks()=0
QCString file() const
Definition: docparser.h:217
bool enable() const
Definition: docparser.h:331
bool hasCaption() const
Definition: docparser.h:458
QCString chars() const
Definition: docparser.h:434
virtual QCString trSeeAlso()=0
QCString title() const
Definition: docparser.h:671
static QCString baseName
Definition: scanner.cpp:10890
QCString extension() const
Definition: docparser.h:496
QCString name
Definition: htmlattrib.h:24
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
bool hasCaption() const
Definition: docparser.h:725
void writeDotFile(const QCString &fileName, const QCString &relPath, const QCString &context)
Type type() const
Definition: docparser.h:449
QCString relPath() const
Definition: docparser.h:218
void filterQuotedCdataAttr(const char *str)
A list of Html attributes.
Definition: htmlattrib.h:32
Definition: dot.h:42
void close()
Definition: qfile_unix.cpp:614
Definition: dia.h:24
QCString url() const
Definition: docparser.h:700
unsigned uint
Definition: qglobal.h:351
Type type() const
Definition: docparser.h:694
QCString anchor() const
Definition: docparser.h:220
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
QCString externalLinkTarget()
Definition: util.cpp:7850
bool isPreformatted() const
Definition: docparser.h:158
bool isFirstChildNode(T *parent, DocNode *node)
int depth() const
Definition: docparser.h:623
virtual void accept(DocVisitor *v)=0
QCString relPath() const
Definition: docparser.h:293
const HtmlAttribList & attribs() const
Definition: docparser.h:1317
static QCString * s
Definition: config.cpp:1042
def parent(G, child, parent_type)
Definition: graph.py:67
union ptb::content::word::word word
const bool TRUE
Definition: qglobal.h:371
static QCString str
static IndexList * indexList
Definition: doxygen.h:149
HtmlDocVisitor(FTextStream &t, CodeOutputInterface &ci, Definition *ctx)
bool hasCaption()
Definition: docparser.h:1353
QString right(uint len) const
Definition: qstring.cpp:13231
void forceStartParagraph(DocNode *n)
QTextStream & endl(QTextStream &s)
void writeMscFile(const QCString &fileName, const QCString &relPath, const QCString &context)
void visitPost(DocAutoList *)
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:7856
void writeMscImageMapFromFile(FTextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, MscOutputFormat format)
Definition: msc.cpp:194
#define ASSERT(x)
Definition: qglobal.h:590
const QList< DocNode > & children() const
Definition: docparser.h:185
QCString name() const
Definition: docparser.h:562
type * toFirst()
Definition: qlist.h:135
void writeDiaFile(const QCString &fileName, const QCString &relPath, const QCString &context)
static bool insideStyleChangeThatIsOutsideParagraph(DocPara *para, int nodeIndex)