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=\"mailto:";
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;
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() <<
">";
451 m_t <<
"<span" << attribs.toString() <<
">";
466 attribs.mergeAttribute(
"class",
"param");
468 m_t <<
"<code" << attribs.toString() <<
">";
564 m_t <<
"<pre class=\"fragment\">";
573 m_t <<
"<code class=\"JavaDocCode\">";
601 if (!fileName.empty())
603 m_t <<
"<div class=\"dotgraph\">\n";
619 "msc {"+s.
text()+
"}",
621 if (!fileName.empty())
623 m_t <<
"<div class=\"mscgraph\">\n";
645 for (
const auto &baseName: baseNameVector)
647 m_t <<
"<div class=\"plantumlgraph\">\n";
658 if (
Config_getEnum(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLI)
666 m_t <<
"<div class=\"mermaidgraph\">\n";
673 m_t <<
"<div class=\"mermaidgraph\">\n";
674 m_t <<
"<pre class=\"mermaid\">\n";
753 m_t <<
"<pre class=\"fragment\">";
795 std::unique_ptr<FileDef> fd;
837 m_t <<
"<p class=\"formulaDsp\">\n";
843 bool closeInline =
false;
844 if (!bDisplay && !text.
empty() && text.
at(0)==
'$' &&
851 else if (!bDisplay && !text.
empty())
866 enum class ImageType { Light, Dark };
867 enum class Visibility { Always, Dark, Light, AutoDark, AutoLight };
868 auto writeFormula = [&](ImageType imgType,Visibility visibility) ->
DString {
871 DString extension =
Config_getEnum(HTML_FORMULA_FORMAT)==HTML_FORMULA_FORMAT_t::svg ?
".svg":
".png" ;
872 if (visibility==Visibility::AutoDark || visibility==Visibility::AutoLight)
875 t <<
"<source srcset=\"" << f.
relPath() << f.
name();
876 if (visibility==Visibility::AutoDark)
879 t <<
"\" media=\"(prefers-color-scheme: light)\"";
885 t <<
"\" media=\"(prefers-color-scheme: dark)\"";
889 t <<
"<img class=\"formula";
890 t << (bDisplay ?
"Dsp" :
"Inl");
891 if (visibility==Visibility::Light) t <<
" light-mode-visible";
892 else if (visibility==Visibility::Dark) t <<
" dark-mode-visible";
894 if (imgType==ImageType::Dark) t <<
"_dark";
896 if (formula && formula->
width()!=-1)
899 t << formula->
width();
901 if (formula && formula->
height()!=-1)
907 if (visibility==Visibility::AutoDark || visibility==Visibility::AutoLight)
917 case HTML_COLORSTYLE_t::LIGHT:
918 m_t << writeFormula(ImageType::Light,Visibility::Always);
920 case HTML_COLORSTYLE_t::DARK:
921 m_t << writeFormula(ImageType::Dark, Visibility::Always);
923 case HTML_COLORSTYLE_t::AUTO_LIGHT:
924 m_t << writeFormula(ImageType::Light, Visibility::AutoLight);
926 case HTML_COLORSTYLE_t::AUTO_DARK:
927 m_t << writeFormula(ImageType::Dark, Visibility::AutoDark);
929 case HTML_COLORSTYLE_t::TOGGLE:
931 m_t << writeFormula(ImageType::Light,Visibility::Light);
932 m_t << writeFormula(ImageType::Dark, Visibility::Dark);
950 m_t <<
"<a id=\"" << anchor <<
"\" name=\"" << anchor <<
"\"></a>";
978 if (!opt.noPar())
filter(
"[");
980 if (!opt.noPar())
filter(
"]");
1012 m_t <<
"<ul class=\"check\">";
1039 m_t <<
"<li class=\"unchecked\">";
1043 m_t <<
"<li class=\"checked\">";
1057 bool b = std::visit([&](
auto &&x) {
1060 return val==
static_cast<const DocNode*
>(&x);
1080 auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](
const auto &n) {
return holds_value(&par,n); });
1081 if (it==std::end(nodes))
return false;
1082 size_t count =
parent.children().size();
1083 auto isSeparator = [](
auto &&it_) {
return std::get_if<DocSimpleSectSep>(&(*it_))!=
nullptr; };
1084 if (count>1 && it==std::begin(nodes))
1086 return isSeparator(std::next(it));
1088 else if (count>1 && it==std::prev(std::end(nodes)))
1090 return isSeparator(std::prev(it));
1092 else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes)))
1094 return isSeparator(std::prev(it)) && isSeparator(std::next(it));
1106 const auto &parBlock = std::get_if<DocParBlock>(p.
parent());
1130 if (!isFirst && !isLast)
1136 const auto &docAutoListItem = std::get_if<DocAutoListItem>(p.
parent());
1137 if (docAutoListItem)
1144 const auto &docSimpleListItem = std::get_if<DocSimpleListItem>(p.
parent());
1145 if (docSimpleListItem)
1152 const auto &docParamList = std::get_if<DocParamList>(p.
parent());
1160 const auto &docHtmlListItem = std::get_if<DocHtmlListItem>(p.
parent());
1161 if (docHtmlListItem)
1170 const auto &docSecRefItem = std::get_if<DocSecRefItem>(p.
parent());
1180 const auto &docHtmlDescData = std::get_if<DocHtmlDescData>(p.
parent());
1181 if (docHtmlDescData)
1190 const auto &docXRefItem = std::get_if<DocXRefItem>(p.
parent());
1200 const auto &docSimpleSect = std::get_if<DocSimpleSect>(p.
parent());
1212 isFirst=isLast=
true;
1217 const auto &docHtmlCell = std::get_if<DocHtmlCell>(p.
parent());
1233 bool needsTag =
false;
1253 else if (std::get_if<DocRoot>(p.
parent()))
1255 needsTag = !std::get<DocRoot>(*p.
parent()).singleLine();
1270 bool needsTagBefore = needsTag;
1271 bool needsTagAfter = needsTag;
1279 [](
const auto &node) { return !isInvisibleNode(node); });
1285 needsTagBefore =
false;
1293 bool isFirst =
false;
1294 bool isLast =
false;
1297 if (isFirst && isLast) needsTagBefore=
false;
1316 auto it = std::prev(std::end(p.
children()));
1324 needsTagAfter =
false;
1342 if (isFirst && isLast) needsTagAfter=
false;
1345 if (needsTagAfter)
m_t <<
"</p>\n";
1361 m_t <<
"<dl class=\"section " << s.
typeString() <<
"\"><dt>";
1403 std::visit(*
this,*s.
title());
1407 m_t <<
"</dd></dl>\n";
1445 m_t <<
"<h" << s.
level() <<
" class=\"doxsection\">";
1446 m_t <<
"<a class=\"anchor\" id=\"" << s.
anchor();
1450 std::visit(*
this,*s.
title());
1452 m_t <<
"</h" << s.
level() <<
">\n";
1529 m_t <<
"<a class=\"anchor\" id=\"" << anc <<
"\"></a>\n";
1536 m_t <<
"<table class=\"doxtable\">\n";
1544 std::visit(*
this,*t.
caption());
1547 m_t <<
"</table>\n";
1579 m_t <<
"</caption>\n";
1610 m_t <<
"</summary>\n";
1621 std::visit(*
this,*summary);
1624 m_t <<
"</details>\n";
1634 m_t <<
"</h" << header.
level() <<
">\n";
1643 bool typeSVG = img.
isSVG();
1652 if (!inlineImage)
m_t <<
"<div class=\"image\">\n";
1656 sizeAttribs+=
" width=\""+img.
width()+
"\"";
1660 sizeAttribs+=
" height=\""+img.
height()+
"\"";
1683 <<
"\"" << sizeAttribs << attrs;
1690 m_t <<
">" << alt <<
"</object>\n";
1695 m_t <<
"<img src=\"" <<
convertToHtml(src) <<
"\" alt=\"" << alt <<
"\"" << sizeAttribs << attrs;
1698 m_t <<
" class=\"inline\"";
1714 m_t <<
"<div class=\"caption\">\n";
1717 else if (inlineImage)
1751 bool exists =
false;
1759 if (!fileName.empty())
1761 m_t <<
"<div class=\"dotgraph\">\n";
1765 m_t <<
"<div class=\"caption\">\n";
1782 bool exists =
false;
1790 if (!fileName.empty())
1792 m_t <<
"<div class=\"mscgraph\">\n";
1796 m_t <<
"<div class=\"caption\">\n";
1813 bool exists =
false;
1821 if (!fileName.empty())
1823 m_t <<
"<div class=\"diagraph\">\n";
1827 m_t <<
"<div class=\"caption\">\n";
1856 for (
const auto &bName: baseNameVector)
1859 m_t <<
"<div class=\"plantumlgraph\">\n";
1863 m_t <<
"<div class=\"caption\">\n";
1880 if (
Config_getEnum(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLI)
1889 m_t <<
"<div class=\"mermaidgraph\">\n";
1893 m_t <<
"<div class=\"caption\">\n";
1907 m_t <<
"<div class=\"mermaidgraph\">\n";
1908 m_t <<
"<pre class=\"mermaid\">\n";
1913 m_t <<
"<div class=\"caption\">\n";
1969 m_t <<
"<ul class=\"multicol\">\n";
1994 className=
"exception";
1998 className=
"tparams";
2003 m_t <<
"<dl class=\"" << className <<
"\"><dt>";
2005 m_t <<
"</dt><dd>\n";
2006 m_t <<
" <table class=\"" << className <<
"\">\n";
2008 m_t <<
" </table>\n";
2017 m_t <<
" " << s.
chars() <<
" ";
2028 m_t <<
"<td class=\"paramdir\">";
2050 m_t <<
"<td class=\"paramtype\">";
2053 std::visit(*
this,type);
2057 m_t <<
"<td class=\"paramname\">";
2061 if (!first)
m_t <<
",";
else first=
false;
2062 std::visit(*
this,param);
2067 std::visit(*
this,par);
2069 m_t <<
"</td></tr>\n";
2078 bool anonymousEnum = x.
file()==
"@";
2085 m_t <<
"<dl class=\"" << key <<
"\"><dt><b><a class=\"el\" href=\""
2087 <<
"#" << x.
anchor() <<
"\">";
2091 m_t <<
"<dl class=\"" << key <<
"\"><dt><b>";
2094 if (!anonymousEnum)
m_t <<
"</a>";
2095 m_t <<
"</b></dt><dd>";
2098 m_t <<
"</dd></dl>\n";
2122 m_t <<
"</blockquote>\n";
2136 m_t <<
"<a href=\"";
2162 if (str.
empty())
return;
2163 const char *p=str.
data();
2169 case '\n':
if(retainNewline)
m_t <<
"<br/>";
m_t << c;
break;
2170 case '<':
m_t <<
"<";
break;
2171 case '>':
m_t <<
">";
break;
2173 if (!citeEntry) {
m_t <<
"&";
break;}
2181 if ((*p ==
'(') || (*p ==
')') || (*p ==
'[') || (*p ==
']'))
2182 m_t <<
"\\‍" << *p++;
2188 uint8_t uc =
static_cast<uint8_t
>(c);
2189 if (uc<32 && !isspace(c))
2191 m_t <<
"$" <<
hex[uc>>4] <<
hex[uc&0xF] <<
";";
2207 if (str.
empty())
return str;
2210 const char *p=str.
data();
2216 case '&': result+=
"&";
break;
2217 case '"': result+=
""";
break;
2218 case '<': result+=
"<";
break;
2219 case '>': result+=
">";
break;
2221 if ((*p ==
'(') || (*p ==
')') || (*p ==
'[') || (*p ==
']'))
2233 uint8_t uc =
static_cast<uint8_t
>(c);
2234 if (uc<32 && !isspace(c))
2238 result+=
hex[uc&0xF];
2259 m_t <<
"<a class=\"elRef\" ";
2264 m_t <<
"<a class=\"el\" ";
2284 const DString &context,
const DString &srcFile,
int srcLine,
bool newFile)
2294 const DString &context,
const DString &srcFile,
int srcLine,
bool newFile)
2306 const DString &,
const DString &srcFile,
int srcLine,
bool newFile)
2313 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />\n";
2328 m_t <<
"<object type=\"image/svg+xml\" data=\"" << relPath << baseName <<
".svg\"></object>\n";
2333 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />\n";
2348 m_t <<
"<object type=\"image/svg+xml\" data=\"" << relPath << baseName <<
"." << imgExt <<
"\"></object>\n";
2352 m_t <<
"<img src=\"" << relPath << baseName <<
"." << imgExt <<
"\" />\n";
2366 bool styleOutsideParagraph=
false;
2367 while (!styleOutsideParagraph)
2375 styleMask|=
static_cast<int>(sc->
style());
2381 if (sc->
enable() && (styleMask&
static_cast<int>(sc->
style()))==0 &&
2385 styleOutsideParagraph=
true;
2388 if (it!=std::begin(para->
children()))
2397 return styleOutsideParagraph;
2407 const DocPara *para=std::get_if<DocPara>(n.parent());
2415 auto it = std::find_if(std::begin(children),std::end(children),
2416 [&n](
const auto &np) {
return holds_value(&n,np); });
2417 if (it==std::end(children))
return;
2418 if (it==std::begin(children))
return;
2425 if (it!=std::begin(children))
2437 bool styleOutsideParagraph=
false;
2438 if (it!=std::begin(children))
2443 bool isFirst =
false;
2444 bool isLast =
false;
2447 if (isFirst && isLast)
return;
2448 if (styleOutsideParagraph)
return;
2464 if (n.parent() && (para = std::get_if<DocPara>(n.parent())))
2468 auto it = std::find_if(std::begin(children),
2470 [&n](
const auto &np)
2472 if (it==std::end(children))
return;
2476 if (styleOutsideParagraph)
return;
2482 if (it!=std::end(children))
2492 bool needsTag =
true;
2493 bool isFirst =
false;
2494 bool isLast =
false;
2496 if (isFirst && isLast) needsTag =
false;
2499 if (needsTag)
m_t <<
"<p>";
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 & setNum(short n)
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()).
char & at(size_t i)
Returns a reference to the character at index i.
DString & prepend(const char *s)
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
const std::string & str() const
bool stripPrefix(const DString &prefix)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool startsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
The common base class of all entity definitions found in the sources.
virtual DString getDefFileExtension() const =0
virtual const DString & name() const =0
virtual DString anchor() 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
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.
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.
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.
DString 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.
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 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 DString convertNameToFileName()
Iterator< const GrowVector, const DocNodeVariant > const_iterator
bool empty() const
checks whether the container is empty
Class representing a list of HTML attributes.
void mergeAttribute(const DString &optName, const DString &optValue, bool prepend=false)
DString toString(DString *pAltValue=nullptr) const
void filter(const DString &str, bool retainNewline=false, bool citeEntry=false)
void startLink(const DString &ref, const DString &file, const DString &relPath, const DString &anchor, const DString &tooltip="")
DString filterQuotedCdataAttr(const DString &str)
Escape basic entities to produce a valid CDATA attribute value, assume that the outer quoting will be...
HtmlDocVisitor(TextStream &t, OutputCodeList &ci, const Definition *ctx, const DString &fn=DString())
void forceStartParagraph(const DocNode &n)
void operator()(const DocWord &)
void visitCaption(TextStream &t, const T &n)
void writeObfuscatedMailAddress(const DString &url)
void writeDotFile(const DString &fileName, const DString &relPath, const DString &context, const DString &srcFile, int srcLine, bool newFile=true)
void writeDiaFile(const DString &fileName, const DString &relPath, const DString &context, const DString &srcFile, int srcLine, bool newFile=true)
void visitChildren(const T &t)
void writeMscFile(const DString &fileName, const DString &relPath, const DString &context, const DString &srcFile, int srcLine, bool newFile=true)
void writePlantUMLFile(const DString &fileName, const DString &relPath, const DString &context, const DString &srcFile, int srcLine)
void forceEndParagraph(const DocNode &n)
void writeMermaidFile(const DString &fileName, const DString &relPath, const DString &context, const DString &srcFile, int srcLine)
const char * writeHtmlEntity(T &result, const char *s, HtmlEntityMapperFunc &&mapper, const char *fallback)
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.
void addIndexItem(const Definition *context, const MemberDef *md, const DString §ionAnchor=DString(), const DString &title=DString())
static MermaidManager & instance()
static DString imageExtension(ImageFormat imageFormat)
static ImageFormat convertToImageFormat(OutputFormat outputFormat)
void generateMermaidOutput(const DString &baseName, const DString &outDir, ImageFormat format, bool toIndex)
Register a generated Mermaid image with the index.
DString writeMermaidSource(const DString &outDirArg, const DString &fileName, const DString &content, ImageFormat format, const DString &srcFile, int srcLine)
Write a Mermaid source file and register it for CLI rendering.
Class representing a list of different code generators.
void startCodeFragment(const DString &style)
void endCodeFragment(const DString &style)
void generatePlantUMLOutput(const DString &baseName, const DString &outDir, OutputFormat format, bool toIndex)
Convert a PlantUML file to an image.
OutputFormat
Plant UML output image formats.
StringVector writePlantUMLSource(const DString &outDirArg, const DString &fileName, const DString &content, OutputFormat format, const DString &engine, const DString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
static PlantumlManager & instance()
Text streaming class that buffers data.
std::string str() const
Return the contents of the buffer as a std::string object.
virtual DString trExceptions()=0
virtual DString trReturns()=0
virtual DString trParameters()=0
virtual DString trCopyright()=0
virtual DString trWarning()=0
virtual DString trSince()=0
virtual DString trNote()=0
virtual DString trAuthor(bool first_capital, bool singular)=0
virtual DString trReturnValues()=0
virtual DString trVersion()=0
virtual DString trTemplateParameters()=0
virtual DString trImportant()=0
virtual DString trPrecondition()=0
virtual DString trFlowchart()=0
virtual DString trAttention()=0
virtual DString trInvariant()=0
virtual DString trRemarks()=0
virtual DString trDate()=0
virtual DString trSeeAlso()=0
virtual DString trPostcondition()=0
static const MemberDef * getFlowMember()
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
void writeDiaGraphFromFile(const DString &inFile, const DString &outDir, const DString &outFile, DiaOutputFormat format, const DString &srcFile, int srcLine, bool toIndex)
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 DString &inFile, const DString &outDir, const DString &outFile, GraphOutputFormat format, const DString &srcFile, int srcLine, bool toIndex)
void writeDotImageMapFromFile(TextStream &t, const DString &inFile, const DString &outDir, const DString &relPath, const DString &baseName, const DString &context, int graphId, const DString &srcFile, int srcLine, bool newFile)
std::unique_ptr< FileDef > createFileDef(const DString &p, const DString &n, const DString &ref, const DString &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 contexts_t getParagraphContext(const DocPara &p, bool &isFirst, bool &isLast)
static DString convertIndexWordToAnchor(const DString &word)
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 writeMscGraphFromFile(const DString &inFile, const DString &outDir, const DString &outFile, MscOutputFormat format, const DString &srcFile, int srcLine, bool toIndex)
void writeMscImageMapFromFile(TextStream &t, const DString &inFile, const DString &outDir, const DString &relPath, const DString &baseName, const DString &context, MscOutputFormat format, const DString &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.
DString writeInlineGraph(const DString &baseName, const DString &extension, const DString &content, bool &exists)
DString externalLinkTarget(const bool parent)
DString correctURL(const DString &url, const DString &relPath)
Corrects URL url according to the relative path relPath.
DString getFileNameExtension(const DString &fn)
DString convertToHtml(const DString &s, bool keepEntities)
bool readInputFile(const DString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)
void addHtmlExtensionIfMissing(DString &fName)
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 createHtmlUrl(const DString &relPath, const DString &ref, bool isLocalFile, const DString &targetFileName, const DString &anchor)
DString getDotImageExtension()
DString makeBaseName(const DString &name, const DString &ext)
DString stripPath(const DString &s)
SrcLangExt getLanguageFromCodeLang(DString &fileName)
Routine to handle the language attribute of the \code command.
A bunch of utility functions.