36 t <<
"<simplesect kind=\"";
46 t <<
"authors";
break;
48 t <<
"version";
break;
56 t <<
"warning";
break;
62 t <<
"copyright";
break;
64 t <<
"invariant";
break;
68 t <<
"attention";
break;
70 t <<
"important";
break;
82 t <<
"</simplesect>\n";
87 for (
const auto &n : children)
89 std::visit(visitor,n);
134 t <<
" inline=\"yes\"";
147 t <<
"</" << cmd <<
">\n";
209 m_t <<
"<emoji name=\"" << name <<
"\" unicode=\"";
222 m_t <<
"<ulink url=\"";
233 m_t <<
"<linebreak/>\n";
239 m_t <<
"<hruler/>\n";
254 if (s.
enable())
m_t <<
"<strike>";
else m_t <<
"</strike>";
260 if (s.
enable())
m_t <<
"<underline>";
else m_t <<
"</underline>";
266 if (s.
enable())
m_t <<
"<emphasis>";
else m_t <<
"</emphasis>";
271 if (s.
enable())
m_t <<
"<computeroutput>";
else m_t <<
"</computeroutput>";
274 if (s.
enable())
m_t <<
"<subscript>";
else m_t <<
"</subscript>";
277 if (s.
enable())
m_t <<
"<superscript>";
else m_t <<
"</superscript>";
280 if (s.
enable())
m_t <<
"<center>";
else m_t <<
"</center>";
283 if (s.
enable())
m_t <<
"<small>";
else m_t <<
"</small>";
291 m_t <<
"<preformatted>";
296 m_t <<
"</preformatted>";
317 m_t <<
"<programlisting";
319 m_t <<
" filename=\"" << lang <<
"\">";
325 m_t <<
"</programlisting>";
328 m_t <<
"<javadocliteral>";
330 m_t <<
"</javadocliteral>";
333 m_t <<
"<javadoccode>";
335 m_t <<
"</javadoccode>";
340 m_t <<
"</verbatim>";
345 m_t <<
"<htmlonly block=\"yes\">";
352 m_t <<
"</htmlonly>";
365 m_t <<
"<latexonly>";
367 m_t <<
"</latexonly>";
370 m_t <<
"<docbookonly>";
372 m_t <<
"</docbookonly>";
388 visitPreStart(
m_t,
"plantuml", s.
hasCaption(), *
this, s.
children(),
DString(
""),
false,
DocImage::Html, s.
width(), s.
height(), s.
engine());
403 m_t <<
"<anchor id=\"" << anc.
file() <<
"_1" << anc.
anchor() <<
"\"/>";
415 m_t <<
"<programlisting filename=\"" << inc.
file() <<
"\">";
427 m_t <<
"</programlisting>";
431 m_t <<
"<programlisting filename=\"" << inc.
file() <<
"\">";
441 m_t <<
"</programlisting>";
449 m_t <<
"<htmlonly block=\"yes\">";
456 m_t <<
"</htmlonly>";
459 m_t <<
"<latexonly>";
461 m_t <<
"</latexonly>";
477 m_t <<
"<docbookonly>";
479 m_t <<
"</docbookonly>";
484 m_t <<
"</verbatim>";
488 m_t <<
"<programlisting filename=\"" << inc.
file() <<
"\">";
497 m_t <<
"</programlisting>";
523 std::unique_ptr<FileDef> fd;
557 m_t <<
"<formula id=\"" << f.
id() <<
"\">";
565 m_t <<
"<indexentry>"
568 m_t <<
"</primaryie>"
569 "<secondaryie></secondaryie>"
598 if (!opt.noPar())
filter(
"[");
600 if (!opt.noPar())
filter(
"]");
614 m_t <<
"<orderedlist>\n";
618 m_t <<
"<itemizedlist>\n";
623 m_t <<
"</orderedlist>\n";
627 m_t <<
"</itemizedlist>\n";
637 m_t <<
"<listitem override=\"unchecked\">";
641 m_t <<
"<listitem override=\"checked\">";
648 m_t <<
"</listitem>";
670 std::visit(*
this,*s.
title());
687 m_t <<
"<itemizedlist>\n";
689 m_t <<
"</itemizedlist>\n";
700 m_t <<
"</listitem>\n";
715 m_t <<
"<sect" << s.
level() <<
" id=\"" << sectId <<
"\">\n";
718 std::visit(*
this,*s.
title());
721 m_t <<
"</sect" << s.
level() <<
">";
736 m_t <<
"<orderedlist";
737 for (
const auto &opt : s.
attribs())
739 m_t <<
" " << opt.name <<
"=\"" << opt.value <<
"\"";
745 m_t <<
"<itemizedlist>\n";
750 m_t <<
"</orderedlist>\n";
754 m_t <<
"</itemizedlist>\n";
762 for (
const auto &opt : l.
attribs())
764 if (opt.name==
"value")
766 m_t <<
" " << opt.name <<
"=\"" << opt.value <<
"\"";
771 m_t <<
"</listitem>\n";
777 m_t <<
"<variablelist>\n";
779 m_t <<
"</variablelist>\n";
785 m_t <<
"<varlistentry><term>";
787 m_t <<
"</term></varlistentry>\n";
795 m_t <<
"</listitem>\n";
803 for (
const auto &opt : t.
attribs())
805 if (opt.name==
"width")
807 m_t <<
" " << opt.name <<
"=\"" << opt.value <<
"\"";
813 std::visit(*
this,*t.
caption());
830 if (c.
isHeading())
m_t <<
"<entry thead=\"yes\"";
else m_t <<
"<entry thead=\"no\"";
831 for (
const auto &opt : c.
attribs())
833 if (opt.name==
"colspan" || opt.name==
"rowspan")
835 m_t <<
" " << opt.name <<
"=\"" << opt.value.toInt() <<
"\"";
837 else if (opt.name==
"align" &&
838 (opt.value==
"right" || opt.value==
"left" || opt.value==
"center"))
840 m_t <<
" align=\"" << opt.value <<
"\"";
842 else if (opt.name==
"valign" &&
843 (opt.value ==
"bottom" || opt.value ==
"top" || opt.value ==
"middle"))
845 m_t <<
" valign=\"" << opt.value <<
"\"";
847 else if (opt.name==
"width")
849 m_t <<
" width=\"" << opt.value <<
"\"";
851 else if (opt.name==
"class")
853 if (opt.value.startsWith(
"markdownTable"))
855 if (opt.value.endsWith(
"Right"))
857 m_t <<
" align='right'";
859 else if (opt.value.endsWith(
"Left"))
861 m_t <<
" align='left'";
863 else if (opt.value.endsWith(
"Center"))
865 m_t <<
" align='center'";
869 else if (!opt.value.empty())
890 m_t <<
"</caption>\n";
898 m_t <<
"</internal>\n";
924 std::visit(*
this,*summary);
933 m_t <<
"<heading level=\"" << header.
level() <<
"\">";
935 m_t <<
"</heading>\n";
953 auto it = std::find_if(attribs.begin(),attribs.end(),
954 [](
const auto &att) { return att.name==
"alt"; });
955 DString altValue = it!=attribs.end() ? it->value :
"";
1039 m_t <<
"<tocitem id=\"" << ref.
file();
1044 m_t <<
"</tocitem>\n";
1050 m_t <<
"<toclist>\n";
1052 m_t <<
"</toclist>\n";
1058 m_t <<
"<parameterlist kind=\"";
1062 m_t <<
"param";
break;
1064 m_t <<
"retval";
break;
1066 m_t <<
"exception";
break;
1068 m_t <<
"templateparam";
break;
1074 m_t <<
"</parameterlist>\n";
1079 m_t <<
"</parametertype>\n";
1080 m_t <<
"<parametertype>";
1086 m_t <<
"<parameteritem>\n";
1087 m_t <<
"<parameternamelist>\n";
1092 m_t <<
"<parametertype>";
1095 std::visit(*
this,type);
1097 m_t <<
"</parametertype>\n";
1099 m_t <<
"<parametername";
1102 m_t <<
" direction=\"";
1118 std::visit(*
this,param);
1119 m_t <<
"</parametername>\n";
1121 m_t <<
"</parameternamelist>\n";
1122 m_t <<
"<parameterdescription>\n";
1125 std::visit(*
this,par);
1127 m_t <<
"</parameterdescription>\n";
1128 m_t <<
"</parameteritem>\n";
1135 m_t <<
"<xrefsect id=\"";
1138 m_t <<
"<xreftitle>";
1140 m_t <<
"</xreftitle>";
1141 m_t <<
"<xrefdescription>";
1144 m_t <<
"</xrefdescription>";
1145 m_t <<
"</xrefsect>";
1165 m_t <<
"<blockquote>";
1167 m_t <<
"</blockquote>";
1177 m_t <<
"<parblock>";
1179 m_t <<
"</parblock>";
1191 m_t <<
"<ref refid=\"" << file;
1192 if (!anchor.
empty())
m_t <<
"_1" << anchor;
1193 m_t <<
"\" kindref=\"";
1194 if (!anchor.
empty())
m_t <<
"member";
else m_t <<
"compound";
1196 if (!ref.
empty())
m_t <<
" external=\"" << ref <<
"\"";
static CodeFragmentManager & instance()
void parseCodeFragment(OutputCodeList &codeOutList, const DString &fileName, const DString &blockId, const DString &scopeName, bool showLineNumbers, bool trimLeft, bool stripCodeComments)
virtual void parseCode(OutputCodeList &codeOutList, const DString &scopeName, const DString &input, SrcLangExt lang, bool stripCodeComments, const CodeParserOptions &options)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
const std::string & str() const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
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.
const HtmlAttribList & attribs() const
Node representing a HTML description data.
Node representing a Html description list.
Node representing a Html description item.
const DocNodeVariant * summary() const
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.
Node representing a HTML table.
size_t numColumns() const
const DocNodeVariant * caption() const
const HtmlAttribList & attribs() const
Node representing an image.
const HtmlAttribList & attribs() const
bool isInlineImage() const
Node representing a include/dontinclude operator block.
bool stripCodeComments() const
DString exampleFile() const
DString includeFileName() const
Node representing an included text block from file.
bool stripCodeComments() const
DString exampleFile() const
DString extension() const
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.
DocNodeVariant * parent()
Node representing an block of paragraphs.
Node representing a paragraph in the documentation tree.
Node representing a parameter list.
const DocNodeList & parameters() const
const DocNodeList & paramTypes() const
DocParamSect::Direction direction() const
const DocNodeList & paragraphs() const
Node representing a parameter section.
Node representing a uml file.
Node representing a reference to some item.
DString targetTitle() 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.
const DocNodeList & children() const
DString exampleFile() const
Node representing a VHDL flow chart.
void pushHidden(bool hide)
CodeParserInterface & getCodeParser(const DString &langExt)
Node representing some amount of white space.
Node representing a word.
Node representing an item of a cross-referenced list.
static FileNameLinkedMap * imageNameLinkedMap
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.
A model of a file symbol.
virtual DString absFilePath() const =0
Minimal replacement for QFileInfo.
std::string fileName() const
std::string dirPath(bool absPath=true) const
FileDef * findFileDef(const DString &n, bool &ambig) const
Returns the file definition in fnMap that matches the file name n.
bool empty() const
checks whether the container is empty
Class representing a list of HTML attributes.
const char * xml(SymType symb) const
Access routine to the XML code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
Class representing a list of different code generators.
Text streaming class that buffers data.
Concrete visitor implementation for XML output.
void visitChildren(const T &t)
XmlDocVisitor(TextStream &t, OutputCodeList &ci, const DString &langExt)
void filter(const DString &str, const bool keepEntities=false, const bool citeEntry=false)
void operator()(const DocWord &)
void startLink(const DString &ref, const DString &file, const DString &anchor)
#define Config_getBool(name)
#define Config_getString(name)
std::unique_ptr< FileDef > createFileDef(const DString &p, const DString &n, const DString &ref, const DString &dn)
Options to configure the code parser.
CodeParserOptions & setStartLine(int lineNr)
CodeParserOptions & setInlineFragment(bool enable)
CodeParserOptions & setShowLineNumbers(bool enable)
CodeParserOptions & setFileDef(const FileDef *fd)
DString correctURL(const DString &url, const DString &relPath)
Corrects URL url according to the relative path relPath.
DString getFileNameExtension(const DString &fn)
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
bool copyFile(const DString &src, const DString &dest)
Copies the contents of file with name src to the newly created file with name dest.
DString stripPath(const DString &s)
SrcLangExt getLanguageFromCodeLang(DString &fileName)
Routine to handle the language attribute of the \code command.
A bunch of utility functions.
static void visitCaption(XmlDocVisitor &visitor, const DocNodeList &children)
static void visitPostEnd(TextStream &t, const char *cmd)
static void endSimpleSect(TextStream &t, const DocSimpleSect &)
static void visitPreStart(TextStream &t, const char *cmd, bool doCaption, XmlDocVisitor &visitor, const DocNodeList &children, const DString &name, bool writeType, DocImage::Type type, const DString &width, const DString &height, const DString engine=DString(), const DString &alt=DString(), bool inlineImage=false)
static void startSimpleSect(TextStream &t, const DocSimpleSect &s)