19#ifndef PRINTDOCVISITOR_H
20#define PRINTDOCVISITOR_H
80 printf(
"print: non supported emoji found: %s\n",
qPrint(s.
name()));
104 if (s.
enable()) printf(
"<bold>");
else printf(
"</bold>");
107 if (s.
enable()) printf(
"<s>");
else printf(
"</s>");
110 if (s.
enable()) printf(
"<strike>");
else printf(
"</strike>");
113 if (s.
enable()) printf(
"<del>");
else printf(
"</del>");
116 if (s.
enable()) printf(
"<underline>");
else printf(
"</underline>");
119 if (s.
enable()) printf(
"<ins>");
else printf(
"</ins>");
122 if (s.
enable()) printf(
"<italic>");
else printf(
"</italic>");
125 if (s.
enable()) printf(
"<kbd>");
else printf(
"</kbd>");
128 if (s.
enable()) printf(
"<tt>");
else printf(
"</tt>");
131 if (s.
enable()) printf(
"<code>");
else printf(
"</code>");
134 if (s.
enable()) printf(
"<sub>");
else printf(
"</sub>");
137 if (s.
enable()) printf(
"<sup>");
else printf(
"</sup>");
140 if (s.
enable()) printf(
"<center>");
else printf(
"</center>");
143 if (s.
enable()) printf(
"<small>");
else printf(
"</small>");
146 if (s.
enable()) printf(
"<cite>");
else printf(
"</cite>");
149 if (s.
enable()) printf(
"<pre>");
else printf(
"</pre>");
152 if (s.
enable()) printf(
"<div>");
else printf(
"</div>");
155 if (s.
enable()) printf(
"<span>");
else printf(
"</span>");
206 printf(
"<include file=\"%s\" type=\"",
qPrint(inc.
file()));
214 printf(
"htmlinclude");
215 if (inc.
isBlock()) printf(
" block=\"yes\"");
231 printf(
"<incoperator pattern=\"%s\" type=\"",
qPrint(op.
pattern()));
249 printf(
"<indexentry>%s</indexentry\n",
qPrint(i.
entry()));
254 printf(
"<simplesectsep/>");
267 if (!opt.noPar()) txt +=
"[";
269 if (!opt.noPar()) txt +=
"]";
271 printf(
"<cite ref=\"%s\" file=\"%s\" "
272 "anchor=\"%s\" text=\"%s\""
287 for (
const auto &child : t.children())
289 std::visit(*
this, child);
321 printf(
"<li class=\"unchecked\">\n");
325 printf(
"<li class=\"checked\">\n");
354 printf(
"<simplesect type=");
380 std::visit(*
this, *s.
title());
384 printf(
"</simplesect>\n");
392 printf(
"</title>\n");
416 printf(
"<sect%d>\n",s.
level());
419 std::visit(*
this, *s.
title());
423 printf(
"</sect%d>\n",s.
level());
431 for (
const auto &opt : s.
attribs())
433 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
456 for (
const auto &opt : li.
attribs())
458 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
492 printf(
"<table rows=\"%zu\" cols=\"%zu\">\n",
497 std::visit(*
this, *t.
caption());
500 printf(
"</table>\n");
516 printf(
"</t%c>\n",c.
isHeading()?
'h':
'd');
521 printf(
"<caption>\n");
524 printf(
"</caption>\n");
529 printf(
"<internal>\n");
532 printf(
"</internal>\n");
537 printf(
"<a url=\"%s\">\n",
qPrint(href.
url()));
546 for (
const auto &opt : summary.
attribs())
548 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
553 printf(
"</summary>\n");
559 for (
const auto &opt :
details.attribs())
561 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
564 auto summary =
details.summary();
567 std::visit(*
this,*summary);
571 printf(
"</details>\n");
576 printf(
"<h%d>\n",header.
level());
579 printf(
"</h%d>\n",header.
level());
584 printf(
"<image src=\"%s\" type=\"",
qPrint(img.
name()));
596 printf(
"</image>\n");
601 printf(
"<dotfile src=\"%s\">\n",
qPrint(df.
name()));
604 printf(
"</dotfile>\n");
609 printf(
"<mscfile src=\"%s\">\n",
qPrint(df.
name()));
612 printf(
"</mscfile>\n");
617 printf(
"<diafile src=\"%s\">\n",
qPrint(df.
name()));
620 printf(
"</diafile>\n");
625 printf(
"<plantumlfile src=\"%s\">\n",
qPrint(df.
name()));
628 printf(
"</plantumlfile>\n");
633 printf(
"<mermaidfile src=\"%s\">\n",
qPrint(df.
name()));
636 printf(
"</mermaidfile>\n");
641 printf(
"<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
650 printf(
"<ref ref=\"%s\" file=\"%s\" "
651 "anchor=\"%s\" targetTitle=\"%s\""
652 " hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
664 printf(
"<secrefitem target=\"%s\">\n",
qPrint(ref.
target()));
667 printf(
"</secrefitem>\n");
672 printf(
"<secreflist>\n");
675 printf(
"</secreflist>\n");
680 printf(
"<parameters>");
686 std::visit(*
this,param);
692 printf(
"</parameters>\n");
697 printf(
"<paramsect type=");
709 printf(
"</paramsect>\n");
714 printf(
"<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
718 printf(
"</xrefitem>\n");
726 printf(
"</internalref>\n");
739 printf(
"<blockquote>\n");
742 printf(
"</blockquote>\n");
747 printf(
"<vhdlflow>\n");
750 printf(
"</vhdlflow>\n");
755 printf(
"<parblock>\n");
758 printf(
"</parblock>\n");
766 for (
int i=0;i<
m_indent;i++) printf(
".");
Node representing an anchor.
Node representing an auto List.
Node representing an item of a auto list.
Node representing a citation of some bibliographic reference.
CiteInfoOption option() const
Node representing a dia file.
Node representing a dot file.
Node representing an emoji.
Node representing a Hypertext reference.
Node representing a horizontal ruler.
Node representing an HTML blockquote.
Node representing a HTML table caption.
Node representing a HTML table cell.
Node representing a HTML description data.
Node representing a Html description list.
Node representing a Html description item.
Node representing a Html list.
const HtmlAttribList & attribs() const
Node representing a HTML list item.
const HtmlAttribList & attribs() const
Node representing a HTML table row.
const HtmlAttribList & attribs() const
Node representing a HTML table.
size_t numColumns() const
const DocNodeVariant * caption() const
Node representing an image.
bool isInlineImage() const
Node representing a include/dontinclude operator block.
Node representing an included text block from file.
Node representing an entry in the index.
Node representing an internal section of documentation.
Node representing an internal reference to some item.
Node representing a line break.
Node representing a link to some item.
Node representing a word that can be linked to something.
Node representing a mermaid file.
Node representing a msc file.
Node representing an block of paragraphs.
Node representing a paragraph in the documentation tree.
Node representing a parameter list.
const DocNodeList & parameters() const
Node representing a parameter section.
Node representing a uml file.
Node representing a reference to some item.
QCString targetTitle() const
bool refToSection() const
Root node of documentation tree.
Node representing a reference to a section.
Node representing a list of section references.
Node representing a normal section.
const DocNodeVariant * title() const
Node representing a separator.
Node representing a simple list.
Node representing a simple list item.
const DocNodeVariant * paragraph() const
Node representing a simple section.
const DocNodeVariant * title() const
Node representing a separator between two simple sections of the same type.
Node representing a style change.
Node representing a special symbol.
HtmlEntityMapper::SymType symbol() const
Root node of a text fragment.
Node representing a simple section title.
Node representing a URL (or email address).
Node representing a verbatim, unparsed text fragment.
Node representing a VHDL flow chart.
Node representing some amount of white space.
Node representing a word.
Node representing an item of a cross-referenced list.
const char * name(int index) const
Access routine to the name of the Emoji entity.
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
bool empty() const
checks whether the container is empty
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const char * utf8(SymType symb, bool useInPrintf=FALSE) const
Access routine to the UTF8 code of the HTML entity.
void operator()(const DocSeparator &)
void operator()(const DocWord &w)
void operator()(const DocSimpleSect &s)
void operator()(const DocAnchor &a)
void operator()(const DocSymbol &s)
void operator()(const DocInclude &inc)
void operator()(const DocHRef &href)
void operator()(const DocHtmlCaption &c)
void operator()(const DocLinkedWord &w)
void operator()(const DocVerbatim &s)
void operator()(const DocHtmlBlockQuote &q)
void operator()(const DocParamList &pl)
void operator()(const DocDiaFile &df)
void operator()(const DocStyleChange &s)
void operator()(const DocTitle &t)
void operator()(const DocText &t)
void operator()(const DocIndexEntry &i)
void operator()(const DocSimpleSectSep &)
void operator()(const DocSimpleList &l)
void operator()(const DocInternal &i)
void operator()(const DocLink &lnk)
void visitChildren(const T &t)
void operator()(const DocHtmlHeader &header)
void operator()(const DocParamSect &ps)
void operator()(const DocInternalRef &r)
void operator()(const DocHtmlDescData &dd)
void operator()(const DocVhdlFlow &vf)
void operator()(const DocURL &u)
void operator()(const DocHtmlTable &t)
void operator()(const DocIncOperator &op)
void operator()(const DocPlantUmlFile &df)
void operator()(const DocXRefItem &x)
void operator()(const DocSecRefItem &ref)
void operator()(const DocEmoji &s)
void operator()(const DocMscFile &df)
void operator()(const DocSecRefList &rl)
void operator()(const DocRoot &r)
void operator()(const DocHtmlList &s)
void operator()(const DocHorRuler &)
void operator()(const DocHtmlDescTitle &dt)
void operator()(const DocHtmlSummary &summary)
void operator()(const DocMermaidFile &df)
void operator()(const DocDotFile &df)
void operator()(const DocLineBreak &)
void operator()(const DocAutoListItem &li)
void operator()(const DocSection &s)
void operator()(const DocHtmlCell &c)
void operator()(const DocAutoList &l)
void operator()(const DocPara &p)
void operator()(const DocRef &ref)
void operator()(const DocHtmlDetails &details)
void operator()(const DocImage &img)
void operator()(const DocFormula &f)
void operator()(const DocHtmlDescList &l)
void operator()(const DocHtmlRow &tr)
void operator()(const DocWhiteSpace &w)
void operator()(const DocParBlock &pb)
void operator()(const DocSimpleListItem &li)
void operator()(const DocHtmlListItem &li)
void operator()(const DocCite &cite)
This is an alternative implementation of QCString.
bool isEmpty() const
Returns TRUE iff the string is empty.
const char * qPrint(const char *s)