75 default:
return nullptr;
78static const char *
hex=
"0123456789ABCDEF";
85 result += cntStr.
setNum(cnt);
88 const char *str = word.
data();
94 if ((c >=
'a' && c <=
'z') ||
95 (c >=
'A' && c <=
'Z') ||
96 (c >=
'0' && c <=
'9') ||
107 enc[1] =
hex[(c & 0xf0) >> 4];
108 enc[2] =
hex[c & 0xf];
142 const DocVerbatim *dv = std::get_if<DocVerbatim>(&n);
156 const DocFormula *df = std::get_if<DocFormula>(&n);
161 const DocImage *di = std::get_if<DocImage>(&n);
218 const DocImage *di = std::get_if<DocImage>(&node);
221 const DocVerbatim *dv = std::get_if<DocVerbatim>(&node);
224 const DocInclude *dinc = std::get_if<DocInclude>(&node);
246 t <<
"<div class=\"caption\">\n";
247 for (
const auto &child : n.children())
249 std::visit(*
this, child);
304 err(
"HTML: non supported HTML-entity found: {}\n",
316 m_t <<
"<span class=\"emoji\">" << res <<
"</span>";
328 m_t <<
"<a href=\"mailto:" << url <<
"\">";
332 m_t <<
"<a href=\"#\" onclick=\"location.href='mai'+'lto:'";
335 const char *p = url.
data();
340 for (uint32_t j=0;j<size && *p;j++)
345 if (size==3) size=2;
else size=3;
348 m_t <<
"; return false;\">";
366 const char *p = url.
data();
371 for (uint32_t j=0;j<size && *p;j++)
375 if (*p)
m_t <<
"<span class=\"obfuscator\">.nosp@m.</span>";
376 if (size==5) size=4;
else size=5;
434 attribs.mergeAttribute(
"class",
"arg");
436 m_t <<
"<em" << attribs.toString() <<
">";
464 attribs.mergeAttribute(
"class",
"param");
466 m_t <<
"<code" << attribs.toString() <<
">";
546 m_ci.startCodeFragment(
"DoxyCode");
557 m_ci.endCodeFragment(
"DoxyCode");
562 m_t <<
"<pre class=\"fragment\">";
571 m_t <<
"<code class=\"JavaDocCode\">";
599 if (!fileName.isEmpty())
601 m_t <<
"<div class=\"dotgraph\">\n";
617 "msc {"+s.
text()+
"}",
619 if (!fileName.isEmpty())
621 m_t <<
"<div class=\"mscgraph\">\n";
643 for (
const auto &baseName: baseNameVector)
645 m_t <<
"<div class=\"plantumlgraph\">\n";
656 if (
Config_getEnum(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLI)
668 m_t <<
"<div class=\"mermaidgraph\">\n";
675 m_t <<
"<div class=\"mermaidgraph\">\n";
676 m_t <<
"<pre class=\"mermaid\">\n";
702 m_ci.startCodeFragment(
"DoxyCode");
714 m_ci.endCodeFragment(
"DoxyCode");
720 m_ci.startCodeFragment(
"DoxyCode");
734 m_ci.endCodeFragment(
"DoxyCode");
755 m_t <<
"<pre class=\"fragment\">";
763 m_ci.startCodeFragment(
"DoxyCode");
772 m_ci.endCodeFragment(
"DoxyCode");
785 if (!
m_hide)
m_ci.startCodeFragment(
"DoxyCode");
797 std::unique_ptr<FileDef> fd;
823 if (!
m_hide)
m_ci.endCodeFragment(
"DoxyCode");
839 m_t <<
"<p class=\"formulaDsp\">\n";
845 bool closeInline =
FALSE;
846 if (!bDisplay && !text.
isEmpty() && text.
at(0)==
'$' &&
853 else if (!bDisplay && !text.
isEmpty())
868 enum class ImageType { Light, Dark };
869 enum class Visibility { Always, Dark, Light, AutoDark, AutoLight };
870 auto writeFormula = [&](ImageType imgType,Visibility visibility) ->
QCString {
874 if (visibility==Visibility::AutoDark || visibility==Visibility::AutoLight)
877 t <<
"<source srcset=\"" << f.
relPath() << f.
name();
878 if (visibility==Visibility::AutoDark)
881 t <<
"\" media=\"(prefers-color-scheme: light)\"";
887 t <<
"\" media=\"(prefers-color-scheme: dark)\"";
891 t <<
"<img class=\"formula";
892 t << (bDisplay ?
"Dsp" :
"Inl");
893 if (visibility==Visibility::Light) t <<
" light-mode-visible";
894 else if (visibility==Visibility::Dark) t <<
" dark-mode-visible";
896 if (imgType==ImageType::Dark) t <<
"_dark";
898 if (formula && formula->
width()!=-1)
901 t << formula->
width();
903 if (formula && formula->
height()!=-1)
909 if (visibility==Visibility::AutoDark || visibility==Visibility::AutoLight)
919 case HTML_COLORSTYLE_t::LIGHT:
920 m_t << writeFormula(ImageType::Light,Visibility::Always);
922 case HTML_COLORSTYLE_t::DARK:
923 m_t << writeFormula(ImageType::Dark, Visibility::Always);
925 case HTML_COLORSTYLE_t::AUTO_LIGHT:
926 m_t << writeFormula(ImageType::Light, Visibility::AutoLight);
928 case HTML_COLORSTYLE_t::AUTO_DARK:
929 m_t << writeFormula(ImageType::Dark, Visibility::AutoDark);
931 case HTML_COLORSTYLE_t::TOGGLE:
933 m_t << writeFormula(ImageType::Light,Visibility::Light);
934 m_t << writeFormula(ImageType::Dark, Visibility::Dark);
952 m_t <<
"<a id=\"" << anchor <<
"\" name=\"" << anchor <<
"\"></a>";
980 if (!opt.noPar())
filter(
"[");
982 if (!opt.noPar())
filter(
"]");
1014 m_t <<
"<ul class=\"check\">";
1041 m_t <<
"<li class=\"unchecked\">";
1045 m_t <<
"<li class=\"checked\">";
1059 bool b = std::visit([&](
auto &&x) {
1062 return val==
static_cast<const DocNode*
>(&x);
1082 auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](
const auto &n) {
return holds_value(&par,n); });
1083 if (it==std::end(nodes))
return FALSE;
1084 size_t count =
parent.children().size();
1085 auto isSeparator = [](
auto &&it_) {
return std::get_if<DocSimpleSectSep>(&(*it_))!=
nullptr; };
1086 if (count>1 && it==std::begin(nodes))
1088 return isSeparator(std::next(it));
1090 else if (count>1 && it==std::prev(std::end(nodes)))
1092 return isSeparator(std::prev(it));
1094 else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes)))
1096 return isSeparator(std::prev(it)) && isSeparator(std::next(it));
1108 const auto parBlock = std::get_if<DocParBlock>(p.
parent());
1132 if (!isFirst && !isLast)
1138 const auto docAutoListItem = std::get_if<DocAutoListItem>(p.
parent());
1139 if (docAutoListItem)
1146 const auto docSimpleListItem = std::get_if<DocSimpleListItem>(p.
parent());
1147 if (docSimpleListItem)
1154 const auto docParamList = std::get_if<DocParamList>(p.
parent());
1162 const auto docHtmlListItem = std::get_if<DocHtmlListItem>(p.
parent());
1163 if (docHtmlListItem)
1172 const auto docSecRefItem = std::get_if<DocSecRefItem>(p.
parent());
1182 const auto docHtmlDescData = std::get_if<DocHtmlDescData>(p.
parent());
1183 if (docHtmlDescData)
1192 const auto docXRefItem = std::get_if<DocXRefItem>(p.
parent());
1202 const auto docSimpleSect = std::get_if<DocSimpleSect>(p.
parent());
1214 isFirst=isLast=
TRUE;
1219 const auto docHtmlCell = std::get_if<DocHtmlCell>(p.
parent());
1235 bool needsTag =
FALSE;
1255 else if (std::get_if<DocRoot>(p.
parent()))
1257 needsTag = !std::get<DocRoot>(*p.
parent()).singleLine();
1272 bool needsTagBefore = needsTag;
1273 bool needsTagAfter = needsTag;
1281 [](
const auto &node) { return !isInvisibleNode(node); });
1287 needsTagBefore =
FALSE;
1295 bool isFirst =
false;
1296 bool isLast =
false;
1299 if (isFirst && isLast) needsTagBefore=
FALSE;
1318 auto it = std::prev(std::end(p.
children()));
1326 needsTagAfter =
FALSE;
1344 if (isFirst && isLast) needsTagAfter=
FALSE;
1347 if (needsTagAfter)
m_t <<
"</p>\n";
1363 m_t <<
"<dl class=\"section " << s.
typeString() <<
"\"><dt>";
1405 std::visit(*
this,*s.
title());
1409 m_t <<
"</dd></dl>\n";
1447 m_t <<
"<h" << s.
level() <<
" class=\"doxsection\">";
1448 m_t <<
"<a class=\"anchor\" id=\"" << s.
anchor();
1452 std::visit(*
this,*s.
title());
1454 m_t <<
"</h" << s.
level() <<
">\n";
1531 m_t <<
"<a class=\"anchor\" id=\"" << anc <<
"\"></a>\n";
1538 m_t <<
"<table class=\"doxtable\">\n";
1546 std::visit(*
this,*t.
caption());
1549 m_t <<
"</table>\n";
1581 m_t <<
"</caption>\n";
1612 m_t <<
"</summary>\n";
1623 std::visit(*
this,*summary);
1626 m_t <<
"</details>\n";
1636 m_t <<
"</h" << header.
level() <<
">\n";
1645 bool typeSVG = img.
isSVG();
1654 if (!inlineImage)
m_t <<
"<div class=\"image\">\n";
1658 sizeAttribs+=
" width=\""+img.
width()+
"\"";
1662 sizeAttribs+=
" height=\""+img.
height()+
"\"";
1685 <<
"\"" << sizeAttribs << attrs;
1692 m_t <<
">" << alt <<
"</object>\n";
1697 m_t <<
"<img src=\"" <<
convertToHtml(src) <<
"\" alt=\"" << alt <<
"\"" << sizeAttribs << attrs;
1700 m_t <<
" class=\"inline\"";
1716 m_t <<
"<div class=\"caption\">\n";
1719 else if (inlineImage)
1753 bool exists =
false;
1761 if (!fileName.isEmpty())
1763 m_t <<
"<div class=\"dotgraph\">\n";
1767 m_t <<
"<div class=\"caption\">\n";
1784 bool exists =
false;
1792 if (!fileName.isEmpty())
1794 m_t <<
"<div class=\"mscgraph\">\n";
1798 m_t <<
"<div class=\"caption\">\n";
1815 bool exists =
false;
1823 if (!fileName.isEmpty())
1825 m_t <<
"<div class=\"diagraph\">\n";
1829 m_t <<
"<div class=\"caption\">\n";
1858 for (
const auto &bName: baseNameVector)
1861 m_t <<
"<div class=\"plantumlgraph\">\n";
1865 m_t <<
"<div class=\"caption\">\n";
1882 if (
Config_getEnum(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLI)
1895 m_t <<
"<div class=\"mermaidgraph\">\n";
1899 m_t <<
"<div class=\"caption\">\n";
1913 m_t <<
"<div class=\"mermaidgraph\">\n";
1914 m_t <<
"<pre class=\"mermaid\">\n";
1919 m_t <<
"<div class=\"caption\">\n";
1975 m_t <<
"<ul class=\"multicol\">\n";
2000 className=
"exception";
2004 className=
"tparams";
2009 m_t <<
"<dl class=\"" << className <<
"\"><dt>";
2011 m_t <<
"</dt><dd>\n";
2012 m_t <<
" <table class=\"" << className <<
"\">\n";
2014 m_t <<
" </table>\n";
2023 m_t <<
" " << s.
chars() <<
" ";
2034 m_t <<
"<td class=\"paramdir\">";
2056 m_t <<
"<td class=\"paramtype\">";
2059 std::visit(*
this,type);
2063 m_t <<
"<td class=\"paramname\">";
2067 if (!first)
m_t <<
",";
else first=
FALSE;
2068 std::visit(*
this,param);
2073 std::visit(*
this,par);
2075 m_t <<
"</td></tr>\n";
2084 bool anonymousEnum = x.
file()==
"@";
2089 m_t <<
"<dl class=\"" << x.
key() <<
"\"><dt><b><a class=\"el\" href=\""
2091 <<
"#" << x.
anchor() <<
"\">";
2095 m_t <<
"<dl class=\"" << x.
key() <<
"\"><dt><b>";
2098 if (!anonymousEnum)
m_t <<
"</a>";
2099 m_t <<
"</b></dt><dd>";
2102 m_t <<
"</dd></dl>\n";
2126 m_t <<
"</blockquote>\n";
2140 m_t <<
"<a href=\"";
2167 const char *p=str.
data();
2173 case '\n':
if(retainNewline)
m_t <<
"<br/>";
m_t << c;
break;
2174 case '<':
m_t <<
"<";
break;
2175 case '>':
m_t <<
">";
break;
2176 case '&':
m_t <<
"&";
break;
2178 if ((*p ==
'(') || (*p ==
')') || (*p ==
'[') || (*p ==
']'))
2179 m_t <<
"\\‍" << *p++;
2185 uint8_t uc =
static_cast<uint8_t
>(c);
2186 if (uc<32 && !isspace(c))
2188 m_t <<
"$" <<
hex[uc>>4] <<
hex[uc&0xF] <<
";";
2204 if (str.
isEmpty())
return str;
2207 const char *p=str.
data();
2213 case '&': result+=
"&";
break;
2214 case '"': result+=
""";
break;
2215 case '<': result+=
"<";
break;
2216 case '>': result+=
">";
break;
2218 if ((*p ==
'(') || (*p ==
')') || (*p ==
'[') || (*p ==
']'))
2230 uint8_t uc =
static_cast<uint8_t
>(c);
2231 if (uc<32 && !isspace(c))
2235 result+=
hex[uc&0xF];
2256 m_t <<
"<a class=\"elRef\" ";
2261 m_t <<
"<a class=\"el\" ";
2310 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />\n";
2325 m_t <<
"<object type=\"image/svg+xml\" data=\"" << relPath << baseName <<
".svg\"></object>\n";
2330 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />\n";
2343 m_t <<
"<object type=\"image/svg+xml\" data=\"" << relPath << baseName <<
".svg\"></object>\n";
2348 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />\n";
2362 bool styleOutsideParagraph=
FALSE;
2363 while (!styleOutsideParagraph)
2371 styleMask|=
static_cast<int>(sc->
style());
2377 if (sc->
enable() && (styleMask&
static_cast<int>(sc->
style()))==0 &&
2381 styleOutsideParagraph=
TRUE;
2384 if (it!=std::begin(para->
children()))
2393 return styleOutsideParagraph;
2403 const DocPara *para=std::get_if<DocPara>(n.parent());
2411 auto it = std::find_if(std::begin(children),std::end(children),
2412 [&n](
const auto &np) {
return holds_value(&n,np); });
2413 if (it==std::end(children))
return;
2414 if (it==std::begin(children))
return;
2421 if (it!=std::begin(children))
2433 bool styleOutsideParagraph=
false;
2434 if (it!=std::begin(children))
2439 bool isFirst =
false;
2440 bool isLast =
false;
2443 if (isFirst && isLast)
return;
2444 if (styleOutsideParagraph)
return;
2460 if (n.parent() && (para = std::get_if<DocPara>(n.parent())))
2464 auto it = std::find_if(std::begin(children),
2466 [&n](
const auto &np)
2468 if (it==std::end(children))
return;
2472 if (styleOutsideParagraph)
return;
2478 if (it!=std::end(children))
2488 bool needsTag =
true;
2489 bool isFirst =
false;
2490 bool isLast =
false;
2492 if (isFirst && isLast) needsTag =
false;
2495 if (needsTag)
m_t <<
"<p>";
void parseCodeFragment(OutputCodeList &codeOutList, const QCString &fileName, const QCString &blockId, const QCString &scopeName, bool showLineNumbers, bool trimLeft, bool stripCodeComments)
static CodeFragmentManager & instance()
virtual void parseCode(OutputCodeList &codeOutList, const QCString &scopeName, const QCString &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.
The common base class of all entity definitions found in the sources.
virtual QCString anchor() const =0
virtual QCString getDefFileExtension() const =0
virtual const QCString & name() const =0
Node representing an anchor.
const HtmlAttribList & attribs() const
Node representing an auto List.
bool isCheckedList() const
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.
const HtmlAttribList & attribs() const
Node representing a horizontal ruler.
const HtmlAttribList & attribs() const
Node representing an HTML blockquote.
const HtmlAttribList & attribs() const
Node representing a HTML table caption.
const HtmlAttribList & attribs() const
Node representing a HTML table cell.
const HtmlAttribList & attribs() const
Node representing a HTML description data.
const HtmlAttribList & attribs() const
Node representing a Html description list.
const HtmlAttribList & attribs() const
Node representing a Html description item.
const HtmlAttribList & attribs() const
const HtmlAttribList & attribs() const
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.
const HtmlAttribList & attribs() const
const HtmlAttribList & attribs() const
Node representing a HTML table.
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
QCString includeFileName() const
QCString exampleFile() const
Node representing an included text block from file.
QCString extension() const
bool stripCodeComments() const
QCString exampleFile() const
Node representing an entry in the index.
const Definition * scope() const
const MemberDef * member() const
Node representing an internal section of documentation.
Node representing an internal reference to some item.
Node representing a line break.
const HtmlAttribList & attribs() const
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.
Abstract node interface with type information.
bool isPreformatted() const
DocNodeVariant * parent()
Node representing an block of paragraphs.
Node representing a paragraph in the documentation tree.
const HtmlAttribList & attribs() const
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.
bool hasInOutSpecifier() const
bool hasTypeSpecifier() const
Node representing a uml file.
Node representing a reference to some item.
QCString 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.
QCString typeString() const
const DocNodeVariant * title() const
Node representing a separator between two simple sections of the same type.
Node representing a style change.
const HtmlAttribList & attribs() const
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.
QCString language() const
QCString exampleFile() const
Node representing a VHDL flow chart.
CodeParserInterface & getCodeParser(const QCString &langExt)
void pushHidden(bool hide)
Node representing some amount of white space.
Node representing a word.
Node representing an item of a cross-referenced list.
static IndexList * indexList
const char * unicode(int index) const
Access routine to the unicode sequence for the Emoji entity.
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Minimal replacement for QFileInfo.
std::string fileName() const
std::string dirPath(bool absPath=true) const
static QCString convertNameToFileName()
Iterator< const GrowVector, const DocNodeVariant > const_iterator
bool empty() const
checks whether the container is empty
Class representing a list of HTML attributes.
QCString toString(QCString *pAltValue=nullptr) const
void mergeAttribute(const QCString &optName, const QCString &optValue)
HtmlDocVisitor(TextStream &t, OutputCodeList &ci, const Definition *ctx, const QCString &fn=QCString())
void writeMscFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine, bool newFile=true)
void writePlantUMLFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine)
QCString filterQuotedCdataAttr(const QCString &str)
Escape basic entities to produce a valid CDATA attribute value, assume that the outer quoting will be...
void forceStartParagraph(const DocNode &n)
void operator()(const DocWord &)
void startLink(const QCString &ref, const QCString &file, const QCString &relPath, const QCString &anchor, const QCString &tooltip="")
void visitCaption(TextStream &t, const T &n)
void writeDotFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine, bool newFile=true)
void visitChildren(const T &t)
void writeMermaidFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine)
void filter(const QCString &str, const bool retainNewline=false)
void forceEndParagraph(const DocNode &n)
void writeDiaFile(const QCString &fileName, const QCString &relPath, const QCString &context, const QCString &srcFile, int srcLine, bool newFile=true)
void writeObfuscatedMailAddress(const QCString &url)
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const char * html(SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
OutputFormat
Mermaid output image formats.
QCString writeMermaidSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &srcFile, int srcLine)
Write a Mermaid source file and register it for CLI rendering.
void generateMermaidOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Register a generated Mermaid image with the index.
static MermaidManager & instance()
Class representing a list of different code generators.
OutputFormat
Plant UML output image formats.
StringVector writePlantUMLSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
static PlantumlManager & instance()
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
This is an alternative implementation of QCString.
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool startsWith(const char *s) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
char & at(size_t i)
Returns a reference to the character at index i.
bool isEmpty() const
Returns TRUE iff the string is empty.
const std::string & str() const
QCString & setNum(short n)
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Text streaming class that buffers data.
std::string str() const
Return the contents of the buffer as a std::string object.
static const MemberDef * getFlowMember()
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
static constexpr auto hex
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary, DocPlantUmlFile, DocMermaidFile > DocNodeVariant
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
void writeDotGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine)
void writeDotImageMapFromFile(TextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, int graphId, const QCString &srcFile, int srcLine, bool newFile)
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
static bool isInvisibleNode(const DocNodeVariant &node)
static bool determineIfNeedsTag(const DocPara &p)
static const char g_types[][NUM_HTML_LIST_TYPES]
static constexpr const char * contexts(contexts_t type)
bool isFirstChildNode(const T *parent, const DocPara &node)
static const int NUM_HTML_LIST_TYPES
static QCString convertIndexWordToAnchor(const QCString &word)
static contexts_t getParagraphContext(const DocPara &p, bool &isFirst, bool &isLast)
static bool mustBeOutsideParagraph(const DocNodeVariant &n)
static bool isDocVerbatimVisible(const DocVerbatim &s)
static bool insideStyleChangeThatIsOutsideParagraph(const DocPara *para, DocNodeList::const_iterator it)
Returns TRUE if the child nodes in paragraph para until nodeIndex contain a style change node that is...
static bool holds_value(const Node *val, const DocNodeVariant &v)
static bool isDocIncOperatorVisible(const DocIncOperator &s)
bool isSeparatedParagraph(const DocSimpleSect &parent, const DocPara &par)
bool isLastChildNode(const T *parent, const DocPara &node)
static bool isDocIncludeVisible(const DocInclude &s)
Translator * theTranslator
void writeMscImageMapFromFile(TextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, MscOutputFormat format, const QCString &srcFile, int srcLine)
void writeMscGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, MscOutputFormat format, const QCString &srcFile, int srcLine)
Portable versions of functions that are platform dependent.
Options to configure the code parser.
CodeParserOptions & setSearchCtx(const Definition *d)
CodeParserOptions & setStartLine(int lineNr)
CodeParserOptions & setInlineFragment(bool enable)
CodeParserOptions & setShowLineNumbers(bool enable)
CodeParserOptions & setFileDef(const FileDef *fd)
const char * writeUTF8Char(TextStream &t, const char *s)
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
QCString writeFileContents(const QCString &baseName, const QCString &extension, const QCString &content, bool &exists)
Thread-safe function to write a string to a file.
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString convertToHtml(const QCString &s, bool keepEntities)
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
QCString stripPath(const QCString &s)
bool readInputFile(const QCString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
QCString getDotImageExtension()
QCString makeBaseName(const QCString &name, const QCString &ext)
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
QCString externalLinkTarget(const bool parent)
QCString getFileNameExtension(const QCString &fn)
void addHtmlExtensionIfMissing(QCString &fName)
QCString createHtmlUrl(const QCString &relPath, const QCString &ref, bool href, bool isLocalFile, const QCString &targetFileName, const QCString &anchor)
A bunch of utility functions.