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>");
204 printf(
"<include file=\"%s\" type=\"",
qPrint(inc.
file()));
212 printf(
"htmlinclude");
213 if (inc.
isBlock()) printf(
" block=\"yes\"");
229 printf(
"<incoperator pattern=\"%s\" type=\"",
qPrint(op.
pattern()));
247 printf(
"<indexentry>%s</indexentry\n",
qPrint(i.
entry()));
252 printf(
"<simplesectsep/>");
265 if (!opt.noPar()) txt +=
"[";
267 if (!opt.noPar()) txt +=
"]";
269 printf(
"<cite ref=\"%s\" file=\"%s\" "
270 "anchor=\"%s\" text=\"%s\""
285 for (
const auto &child : t.children())
287 std::visit(*
this, child);
319 printf(
"<li class=\"unchecked\">\n");
323 printf(
"<li class=\"checked\">\n");
352 printf(
"<simplesect type=");
378 std::visit(*
this, *s.
title());
382 printf(
"</simplesect>\n");
390 printf(
"</title>\n");
414 printf(
"<sect%d>\n",s.
level());
417 std::visit(*
this, *s.
title());
421 printf(
"</sect%d>\n",s.
level());
429 for (
const auto &opt : s.
attribs())
431 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
454 for (
const auto &opt : li.
attribs())
456 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
490 printf(
"<table rows=\"%zu\" cols=\"%zu\">\n",
495 std::visit(*
this, *t.
caption());
498 printf(
"</table>\n");
514 printf(
"</t%c>\n",c.
isHeading()?
'h':
'd');
519 printf(
"<caption>\n");
522 printf(
"</caption>\n");
527 printf(
"<internal>\n");
530 printf(
"</internal>\n");
535 printf(
"<a url=\"%s\">\n",
qPrint(href.
url()));
544 for (
const auto &opt : summary.
attribs())
546 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
551 printf(
"</summary>\n");
557 for (
const auto &opt :
details.attribs())
559 printf(
" %s=\"%s\"",
qPrint(opt.name),
qPrint(opt.value));
562 auto summary =
details.summary();
565 std::visit(*
this,*summary);
569 printf(
"</details>\n");
574 printf(
"<h%d>\n",header.
level());
577 printf(
"</h%d>\n",header.
level());
582 printf(
"<image src=\"%s\" type=\"",
qPrint(img.
name()));
594 printf(
"</image>\n");
599 printf(
"<dotfile src=\"%s\">\n",
qPrint(df.
name()));
602 printf(
"</dotfile>\n");
607 printf(
"<mscfile src=\"%s\">\n",
qPrint(df.
name()));
610 printf(
"</mscfile>\n");
615 printf(
"<diafile src=\"%s\">\n",
qPrint(df.
name()));
618 printf(
"</diafile>\n");
623 printf(
"<plantumlfile src=\"%s\">\n",
qPrint(df.
name()));
626 printf(
"</plantumlfile>\n");
631 printf(
"<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
640 printf(
"<ref ref=\"%s\" file=\"%s\" "
641 "anchor=\"%s\" targetTitle=\"%s\""
642 " hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
654 printf(
"<secrefitem target=\"%s\">\n",
qPrint(ref.
target()));
657 printf(
"</secrefitem>\n");
662 printf(
"<secreflist>\n");
665 printf(
"</secreflist>\n");
670 printf(
"<parameters>");
676 std::visit(*
this,param);
682 printf(
"</parameters>\n");
687 printf(
"<paramsect type=");
699 printf(
"</paramsect>\n");
704 printf(
"<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
708 printf(
"</xrefitem>\n");
716 printf(
"</internalref>\n");
729 printf(
"<blockquote>\n");
732 printf(
"</blockquote>\n");
737 printf(
"<vhdlflow>\n");
740 printf(
"</vhdlflow>\n");
745 printf(
"<parblock>\n");
748 printf(
"</parblock>\n");
756 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 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 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)