56#define XML_DB(x) do {} while(0)
73 const char *s = str.
data();
87 int spacesToNextTabStop = tabSize - (col%tabSize);
88 while (spacesToNextTabStop--)
90 if (col>=stripIndentAmount) t <<
"<sp/>";
96 if (col>=stripIndentAmount) t <<
"<sp/>";
99 case '<': t <<
"<"; col++;
break;
100 case '>': t <<
">"; col++;
break;
101 case '&': t <<
"&"; col++;
break;
102 case '\'': t <<
"'"; col++;
break;
103 case '"': t <<
"""; col++;
break;
104 case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
105 case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
106 case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
107 case 27:
case 28:
case 29:
case 30:
case 31:
109 t <<
"<sp value=\"" << int(c) <<
"\"/>";
120 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
121 t <<
"<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
122 t <<
"xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
123 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
131 QCString fileName=outputDirectory+
"/combine.xslt";
135 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
140 "<!-- XSLT script to combine the generated output into a single file. \n"
141 " If you have xsltproc you could use:\n"
142 " xsltproc combine.xslt index.xml >all.xml\n"
144 "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
145 " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n"
146 " <xsl:template match=\"/\">\n"
147 " <doxygen version=\"{doxygenindex/@version}\" xml:lang=\"{doxygenindex/@xml:lang}\">\n"
148 " <!-- Load all doxygen generated xml files -->\n"
149 " <xsl:for-each select=\"doxygenindex/compound\">\n"
150 " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
154 "</xsl:stylesheet>\n";
161 t <<
"<ref refid=\"" << compoundId;
162 if (!anchorId.
isEmpty()) t <<
"_1" << anchorId;
163 t <<
"\" kindref=\"";
164 if (!anchorId.
isEmpty()) t <<
"member";
else t <<
"compound";
166 if (!extRef.
isEmpty()) t <<
" external=\"" << extRef <<
"\"";
183 void writeLink(
const QCString &extRef,
const QCString &file,
184 const QCString &anchor,std::string_view text
205 *
m_t <<
"<highlight class=\"normal\">";
237 XML_DB((
"(writeCodeLink)\n"));
240 *
m_t <<
"<highlight class=\"normal\">";
252 XML_DB((
"(writeToolTip)\n"));
259 XML_DB((
"(startCodeLine)\n"));
269 *
m_t <<
" refkind=\"member\"";
273 *
m_t <<
" refkind=\"compound\"";
289 XML_DB((
"(endCodeLine)\n"));
292 *
m_t <<
"</highlight>";
297 *
m_t <<
"</codeline>\n";
308 XML_DB((
"(startFontClass)\n"));
311 *
m_t <<
"</highlight>";
314 *
m_t <<
"<highlight class=\"" << colorClass <<
"\">";
321 XML_DB((
"(endFontClass)\n"));
322 *
m_t <<
"</highlight>";
329 XML_DB((
"(writeCodeAnchor)\n"));
333 const QCString &anchorId,
int l,
bool)
336 XML_DB((
"(writeLineNumber)\n"));
357 XML_DB((
"(startCodeFragment)\n"));
358 *
m_t <<
" <programlisting>\n";
363 XML_DB((
"(endCodeFragment)\n"));
364 *
m_t <<
" </programlisting>\n";
376 indentStr.
fill(
' ',indent);
379 t << indentStr <<
"<templateparamlist>\n";
382 t << indentStr <<
" <param>\n";
383 if (!a.type.isEmpty())
385 t << indentStr <<
" <type>";
389 if (!a.name.isEmpty())
391 t << indentStr <<
" <declname>" <<
convertToXML(a.name) <<
"</declname>\n";
392 t << indentStr <<
" <defname>" <<
convertToXML(a.name) <<
"</defname>\n";
394 if (!a.defval.isEmpty())
396 t << indentStr <<
" <defval>";
400 if (!a.typeConstraint.isEmpty())
402 t << indentStr <<
" <typeconstraint>";
404 t <<
"</typeconstraint>\n";
406 t << indentStr <<
" </param>\n";
408 t << indentStr <<
"</templateparamlist>\n";
441 auto astImpl =
dynamic_cast<const DocNodeAST*
>(ast.get());
450 std::visit(visitor,astImpl->root);
459 intf->resetCodeParserState();
463 intf->parseCode(xmlList,
489 t <<
" <" << tagName <<
" refid=\"";
500 t <<
">" <<
convertToXML(name) <<
"</" << tagName <<
">\n";
508 auto isDigit = [](
char c) {
return c>=
'0' && c<=
'9'; };
509 int len =
static_cast<int>(s.
length());
515 if (i<len-1 && s[i]==
'@' && isDigit(s[i+1]))
517 if (j>=2 && i>=2 && s[i-2]==
':' && s[i-1]==
':') j-=2;
519 while (i<len && isDigit(s[i])) i++;
542 else if (typeStr==
"virtual") typeStr=
"";
570 int i = argsStr.
find(
"noexcept(");
573 int bracketCount = 1;
576 bool insideString =
false;
577 bool insideChar =
false;
581 char c = argsStr[p++];
584 if (c==
'"' && pc!=
'\\') insideString=
false;
588 if (c==
'\'' && pc!=
'\\') insideChar=
false;
594 case '(': bracketCount++;
break;
595 case ')': bracketCount--;
found = bracketCount==0;
break;
596 case '"': insideString =
true;
break;
597 case '\'': insideChar =
true;
break;
602 expr = argsStr.
mid(i+9,p-i-10);
672 i=defStr.
find(
"auto ");
675 defStr=defStr.
left(i)+typeStr+defStr.
mid(i+4);
683 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
688 t <<
" <member refid=\""
690 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
696 t <<
" <memberdef kind=\"";
697 t << memType <<
"\" id=\"";
715 if (md->
isStatic()) t <<
"yes";
else t <<
"no";
720 t <<
" nodiscard=\"yes\"";
725 t <<
" constexpr=\"yes\"";
730 t <<
" consteval=\"yes\"";
735 t <<
" constinit=\"yes\"";
740 t <<
" extern=\"yes\"";
751 if (md->
isExplicit()) t <<
"yes";
else t <<
"no";
755 if (md->
isInline()) t <<
"yes";
else t <<
"no";
767 t <<
" final=\"yes\"";
772 t <<
" sealed=\"yes\"";
782 t <<
" optional=\"yes\"";
787 t <<
" required=\"yes\"";
792 t <<
" noexcept=\"yes\"";
797 t <<
" noexceptexpression=\"" <<
convertToXML(noExceptExpr) <<
"\"";
802 t <<
" volatile=\"yes\"";
819 if (md->
isStrong()) t <<
"yes";
else t <<
"no";
830 if (md->
isMutable()) t <<
"yes";
else t <<
"no";
835 t <<
" initonly=\"yes\"";
839 t <<
" attribute=\"yes\"";
843 t <<
" property=\"yes\"";
847 t <<
" readonly=\"yes\"";
851 t <<
" bound=\"yes\"";
855 t <<
" removable=\"yes\"";
859 t <<
" constrained=\"yes\"";
863 t <<
" transient=\"yes\"";
867 t <<
" maybevoid=\"yes\"";
871 t <<
" maybedefault=\"yes\"";
875 t <<
" maybeambiguous=\"yes\"";
881 if (md->
isReadable()) t <<
"yes";
else t <<
"no";
885 if (md->
isWritable()) t <<
"yes";
else t <<
"no";
889 if (md->
isGettable()) t <<
"yes";
else t <<
"no";
892 t <<
" privategettable=\"";
896 t <<
" protectedgettable=\"";
901 if (md->
isSettable()) t <<
"yes";
else t <<
"no";
904 t <<
" privatesettable=\"";
908 t <<
" protectedsettable=\"";
916 else if (md->
isCopy()) t <<
"copy";
917 else if (md->
isRetain()) t <<
"retain";
918 else if (md->
isStrong()) t <<
"strong";
919 else if (md->
isWeak()) t <<
"weak";
926 if (md->
isAddable()) t <<
"yes";
else t <<
"no";
934 if (md->
isRaisable()) t <<
"yes";
else t <<
"no";
953 t <<
" <definition>" <<
convertToXML(defStr) <<
"</definition>\n";
954 t <<
" <argsstring>" <<
convertToXML(argsStr) <<
"</argsstring>\n";
967 if (nameStr!=qualifiedNameStr)
969 t <<
" <qualifiedname>" <<
convertToXML(qualifiedNameStr) <<
"</qualifiedname>\n";
983 if (bitfield.
at(0)==
':') bitfield=bitfield.
mid(1);
984 t <<
" <bitfield>" <<
convertToXML(bitfield) <<
"</bitfield>\n";
990 t <<
" <reimplements refid=\""
996 t <<
" <reimplementedby refid=\""
998 <<
convertToXML(rbmd->name()) <<
"</reimplementedby>\n";
1003 t <<
" <qualifier>" <<
convertToXML(qmd.c_str()) <<
"</qualifier>\n";
1021 auto defIt = defAl.
begin();
1026 if (defIt!=defAl.
end())
1032 if (!a.attrib.isEmpty())
1034 t <<
" <attributes>";
1036 t <<
"</attributes>\n";
1038 if (isFortran && defArg && !defArg->
type.
isEmpty())
1044 else if (!a.type.isEmpty())
1050 if (!a.name.isEmpty())
1054 t <<
"</declname>\n";
1060 t <<
"</defname>\n";
1062 if (!a.array.isEmpty())
1068 if (!a.defval.isEmpty())
1076 t <<
" <briefdescription>";
1079 t <<
"</briefdescription>\n";
1091 t <<
" <param></param>\n";
1097 t <<
" <param><defname>" << a.type <<
"</defname></param>\n";
1103 t <<
" <requiresclause>";
1105 t <<
" </requiresclause>\n";
1110 t <<
" <initializer>";
1112 t <<
"</initializer>\n";
1117 t <<
" <exceptions>";
1119 t <<
"</exceptions>\n";
1127 <<
"_1" << emd->anchor() <<
"\" kind=\"enumvalue\"><name>"
1131 << emd->anchor() <<
"\" prot=\"";
1132 switch (emd->protection())
1143 if (!emd->initializer().isEmpty())
1145 t <<
" <initializer>";
1147 t <<
"</initializer>\n";
1149 t <<
" <briefdescription>\n";
1150 writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1151 t <<
" </briefdescription>\n";
1152 t <<
" <detaileddescription>\n";
1153 writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
1154 t <<
" </detaileddescription>\n";
1155 t <<
" </enumvalue>\n";
1158 t <<
" <briefdescription>\n";
1160 t <<
" </briefdescription>\n";
1161 t <<
" <detaileddescription>\n";
1163 t <<
" </detaileddescription>\n";
1164 t <<
" <inbodydescription>\n";
1166 t <<
" </inbodydescription>\n";
1169 t <<
" <location file=\""
1194 for (
const auto &refmd : refList)
1199 for (
const auto &refmd : refByList)
1204 t <<
" </memberdef>\n";
1220 if (ml==
nullptr)
return;
1222 for (
const auto &md : *ml)
1230 if (count==0)
return;
1232 t <<
" <sectiondef kind=\"" << kind <<
"\">\n";
1233 if (!header.isEmpty())
1235 t <<
" <header>" <<
convertToXML(header) <<
"</header>\n";
1237 if (!documentation.isEmpty())
1239 t <<
" <description>";
1241 t <<
"</description>\n";
1243 for (
const auto &md : *ml)
1250 t <<
" </sectiondef>\n";
1255 t <<
" <listofallmembers>\n";
1258 for (
auto &mi : *mni)
1266 md->
anchor() <<
"\" prot=\"";
1282 if (!mi->ambiguityResolutionScope().isEmpty())
1284 t <<
" ambiguityscope=\"" <<
convertToXML(mi->ambiguityResolutionScope()) <<
"\"";
1291 t <<
" </listofallmembers>\n";
1296 for (
const auto &cd : cl)
1298 if (!cd->isHidden() && !cd->isAnonymous())
1302 switch(cd->protection())
1309 t <<
"\">" <<
convertToXML(cd->name()) <<
"</innerclass>\n";
1316 for (
const auto &cd : cl)
1320 t <<
" <innerconcept refid=\"" << cd->getOutputFileBase()
1321 <<
"\">" <<
convertToXML(cd->name()) <<
"</innerconcept>\n";
1328 for (
const auto &mod : ml)
1330 if (mod->isHidden())
1332 t <<
" <innermodule refid=\"" << mod->getOutputFileBase()
1333 <<
"\">" <<
convertToXML(mod->name()) <<
"</innermodule>\n";
1340 for (
const auto &nd : nl)
1342 if (!nd->isHidden() && !nd->isAnonymous())
1344 t <<
" <innernamespace refid=\"" << nd->getOutputFileBase()
1345 <<
"\"" << (nd->isInline() ?
" inline=\"yes\"" :
"")
1346 <<
">" <<
convertToXML(nd->name()) <<
"</innernamespace>\n";
1353 if (exportMap.empty())
return;
1354 t <<
" <exports>\n";
1355 for (
auto &[moduleName,importInfo] : exportMap)
1364 t << importInfo.importName;
1367 t <<
" </exports>\n";
1372 for (
const auto &fd : fl)
1374 t <<
" <innerfile refid=\"" << fd->getOutputFileBase()
1375 <<
"\">" <<
convertToXML(fd->name()) <<
"</innerfile>\n";
1381 for (
const auto &pd : pl)
1383 t <<
" <innerpage refid=\"" << pd->getOutputFileBase();
1384 if (pd->getGroupDef())
1386 t <<
"_" << pd->name();
1388 t <<
"\">" <<
convertToXML(pd->title()) <<
"</innerpage>\n";
1394 for (
const auto &sgd : gl)
1396 t <<
" <innergroup refid=\"" << sgd->getOutputFileBase()
1398 <<
"</innergroup>\n";
1406 for(
const auto subdir : *dl)
1408 t <<
" <innerdir refid=\"" << subdir->getOutputFileBase()
1409 <<
"\">" <<
convertToXML(subdir->displayName()) <<
"</innerdir>\n";
1429 t <<
"</includes>\n";
1458 msg(
"Generating XML output for class %s\n",
qPrint(cd->
name()));
1469 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1475 t <<
" <compounddef id=\""
1486 if (cd->
isFinal()) t <<
"\" final=\"yes";
1487 if (cd->
isSealed()) t <<
"\" sealed=\"yes";
1488 if (cd->
isAbstract()) t <<
"\" abstract=\"yes";
1490 t <<
" <compoundname>";
1494 t <<
"</compoundname>\n";
1497 t <<
" <basecompoundref ";
1498 if (bcd.classDef->isLinkable())
1518 if (!bcd.templSpecifiers.isEmpty())
1522 bcd.classDef->name(),bcd.templSpecifiers)
1529 t <<
"</basecompoundref>\n";
1533 t <<
" <derivedcompoundref refid=\""
1550 t <<
"\">" <<
convertToXML(bcd.classDef->displayName())
1551 <<
"</derivedcompoundref>\n";
1562 mg->documentation());
1575 t <<
" <requiresclause>";
1577 t <<
" </requiresclause>\n";
1582 t <<
" <qualifier>" <<
convertToXML(qcd.c_str()) <<
"</qualifier>\n";
1585 t <<
" <briefdescription>\n";
1587 t <<
" </briefdescription>\n";
1588 t <<
" <detaileddescription>\n";
1590 t <<
" </detaileddescription>\n";
1594 t <<
" <inheritancegraph>\n";
1596 t <<
" </inheritancegraph>\n";
1601 t <<
" <collaborationgraph>\n";
1603 t <<
" </collaborationgraph>\n";
1605 t <<
" <location file=\""
1621 t <<
" </compounddef>\n";
1622 t <<
"</doxygen>\n";
1624 ti <<
" </compound>\n";
1632 <<
"\" kind=\"concept\"" <<
"><name>"
1640 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1646 <<
"\" kind=\"concept\">\n";
1647 t <<
" <compoundname>";
1651 t <<
"</compoundname>\n";
1654 t <<
" <initializer>";
1656 t <<
" </initializer>\n";
1657 t <<
" <briefdescription>\n";
1659 t <<
" </briefdescription>\n";
1660 t <<
" <detaileddescription>\n";
1662 t <<
" </detaileddescription>\n";
1663 t <<
" <location file=\""
1667 t <<
" </compounddef>\n";
1668 t <<
"</doxygen>\n";
1670 ti <<
" </compound>\n";
1677 <<
"\" kind=\"module\"" <<
"><name>"
1685 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1691 <<
"\" kind=\"module\">\n";
1692 t <<
" <compoundname>";
1694 t <<
"</compoundname>\n";
1708 mg->documentation());
1710 t <<
" <briefdescription>\n";
1712 t <<
" </briefdescription>\n";
1713 t <<
" <detaileddescription>\n";
1715 t <<
" </detaileddescription>\n";
1717 t <<
" <location file=\""
1721 t <<
" </compounddef>\n";
1722 t <<
"</doxygen>\n";
1724 ti <<
" </compound>\n";
1742 <<
"\" kind=\"namespace\"" <<
"><name>"
1750 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1757 <<
"\" kind=\"namespace\" "
1758 << (nd->
isInline()?
"inline=\"yes\" ":
"")
1761 t <<
" <compoundname>";
1765 t <<
"</compoundname>\n";
1774 mg->documentation());
1785 t <<
" <briefdescription>\n";
1787 t <<
" </briefdescription>\n";
1788 t <<
" <detaileddescription>\n";
1790 t <<
" </detaileddescription>\n";
1791 t <<
" <location file=\""
1795 t <<
" </compounddef>\n";
1796 t <<
"</doxygen>\n";
1798 ti <<
" </compound>\n";
1828 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1835 <<
"\" kind=\"file\" language=\""
1837 t <<
" <compoundname>";
1839 t <<
"</compoundname>\n";
1844 if (inc.fileDef && !inc.fileDef->isReference())
1846 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1849 t << inc.includeName;
1850 t <<
"</includes>\n";
1855 t <<
" <includedby";
1856 if (inc.fileDef && !inc.fileDef->isReference())
1858 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1861 t << inc.includeName;
1862 t <<
"</includedby>\n";
1868 t <<
" <incdepgraph>\n";
1870 t <<
" </incdepgraph>\n";
1876 t <<
" <invincdepgraph>\n";
1878 t <<
" </invincdepgraph>\n";
1888 mg->documentation());
1899 t <<
" <briefdescription>\n";
1901 t <<
" </briefdescription>\n";
1902 t <<
" <detaileddescription>\n";
1904 t <<
" </detaileddescription>\n";
1910 t <<
" </compounddef>\n";
1911 t <<
"</doxygen>\n";
1913 ti <<
" </compound>\n";
1940 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1946 t <<
" <compounddef id=\""
1962 mg->documentation());
1973 t <<
" <briefdescription>\n";
1975 t <<
" </briefdescription>\n";
1976 t <<
" <detaileddescription>\n";
1978 t <<
" </detaileddescription>\n";
1979 t <<
" </compounddef>\n";
1980 t <<
"</doxygen>\n";
1982 ti <<
" </compound>\n";
1997 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2003 t <<
" <compounddef id=\""
2010 t <<
" <briefdescription>\n";
2012 t <<
" </briefdescription>\n";
2013 t <<
" <detaileddescription>\n";
2015 t <<
" </detaileddescription>\n";
2017 t <<
" </compounddef>\n";
2018 t <<
"</doxygen>\n";
2020 ti <<
" </compound>\n";
2030 const char *kindName = isExample ?
"example" :
"page";
2039 if (pageName==
"index") pageName=
"indexpage";
2041 ti <<
" <compound refid=\"" << pageName
2046 QCString fileName=outputDirectory+
"/"+pageName+
".xml";
2050 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2056 t <<
" <compounddef id=\"" << pageName;
2057 t <<
"\" kind=\"" << kindName <<
"\">\n";
2059 <<
"</compoundname>\n";
2090 auto writeIndent = [&]() {
for (
int i=0;i<4+indent*2;i++) t <<
" "; };
2091 auto incIndent = [&](
const char *text) {
writeIndent(); t << text <<
"\n"; indent++; };
2092 auto decIndent = [&](
const char *text) { indent--;
writeIndent(); t << text <<
"\n"; };
2093 incIndent(
"<tableofcontents>");
2098 if (si->type().isSection())
2101 int nextLevel = si->type().level();
2102 if (nextLevel>level)
2104 for (
int l=level;l<nextLevel;l++)
2106 if (l < maxLevel) incIndent(
"<tableofcontents>");
2109 else if (nextLevel<level)
2111 for (
int l=level;l>nextLevel;l--)
2113 if (l <= maxLevel && inLi[l]) decIndent(
"</tocsect>");
2115 if (l <= maxLevel) decIndent(
"</tableofcontents>");
2118 if (nextLevel <= maxLevel)
2120 if (inLi[nextLevel])
2122 decIndent(
"</tocsect>");
2124 else if (level>nextLevel)
2126 decIndent(
"</tableofcontents>");
2127 incIndent(
"<tableofcontents>");
2131 if (titleDoc.
isEmpty()) titleDoc = label;
2132 incIndent(
"<tocsect>");
2133 writeIndent(); t <<
"<name>" << titleDoc <<
"</name>\n";
2135 inLi[nextLevel]=
true;
2140 while (level>1 && level <= maxLevel)
2142 if (inLi[level]) decIndent(
"</tocsect>");
2144 decIndent(
"</tableofcontents>");
2147 if (level <= maxLevel && inLi[level]) decIndent(
"</tocsect>");
2149 decIndent(
"</tableofcontents>");
2151 t <<
" <briefdescription>\n";
2153 t <<
" </briefdescription>\n";
2154 t <<
" <detaileddescription>\n";
2165 t <<
" </detaileddescription>\n";
2169 t <<
" </compounddef>\n";
2170 t <<
"</doxygen>\n";
2172 ti <<
" </compound>\n";
2186 Dir xmlDir(outputDirectory.
str());
2192 QCString fileName=outputDirectory+
"/compound.xsd";
2196 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2204 const char *startLine = compound_xsd.
data();
2208 const char *endLine = startLine+1;
2209 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2210 int len=
static_cast<int>(endLine-startLine);
2214 if (s.
find(
"<!-- Automatically insert here the HTML entities -->")!=-1)
2220 t.
write(startLine,len);
2228 fileName=outputDirectory+
"/doxyfile.xsd";
2232 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2240 const char *startLine = doxyfile_xsd.
data();
2244 const char *endLine = startLine+1;
2245 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2246 int len=
static_cast<int>(endLine-startLine);
2250 if (s.
find(
"<!-- Automatically insert here the configuration settings -->")!=-1)
2256 t.
write(startLine,len);
2264 fileName=outputDirectory+
"/Doxyfile.xml";
2268 err(
"Cannot open file %s for writing\n",fileName.
data());
2278 fileName=outputDirectory+
"/index.xml";
2282 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2290 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2291 t <<
"<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2292 t <<
"xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2293 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
2303 msg(
"Generating XML output for concept %s\n",
qPrint(cd->displayName()));
2308 msg(
"Generating XML output for namespace %s\n",
qPrint(nd->displayName()));
2313 for (
const auto &fd : *fn)
2315 msg(
"Generating XML output for file %s\n",
qPrint(fd->name()));
2321 msg(
"Generating XML output for group %s\n",
qPrint(gd->name()));
2326 msg(
"Generating XML output for page %s\n",
qPrint(pd->name()));
2331 msg(
"Generate XML output for dir %s\n",
qPrint(dd->name()));
2336 msg(
"Generating XML output for module %s\n",
qPrint(mod->name()));
2341 msg(
"Generating XML output for example %s\n",
qPrint(pd->name()));
2346 msg(
"Generating XML output for the main page\n");
2351 t <<
"</doxygenindex>\n";
This class represents an function or template argument list.
RefQualifierType refQualifier() const
bool hasParameters() const
bool constSpecifier() const
bool volatileSpecifier() const
A abstract class representing of a compound symbol.
virtual bool isAbstract() const =0
Returns TRUE if there is at least one pure virtual member in this class.
virtual bool isFinal() const =0
Returns TRUE if this class is marked as final.
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string.
virtual const MemberLists & getMemberLists() const =0
Returns the list containing the list of members sorted per type.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual bool isSealed() const =0
Returns TRUE if this class is marked as sealed.
virtual StringVector getQualifiers() const =0
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual const MemberGroupList & getMemberGroups() const =0
Returns the member groups defined for this class.
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual FileDef * getFileDef() const =0
Returns the namespace this compound is in, or 0 if it has a global scope.
virtual const IncludeInfo * includeInfo() const =0
virtual QCString requiresClause() const =0
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
virtual QCString initializer() const =0
virtual ArgumentList getTemplateParameterList() const =0
virtual const IncludeInfo * includeInfo() const =0
virtual const FileDef * getFileDef() const =0
The common base class of all entity definitions found in the sources.
virtual QCString docFile() const =0
virtual int getEndBodyLine() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual DefType definitionType() const =0
virtual const SectionRefs & getSectionRefs() const =0
returns the section dictionary, only of importance for pagedef
virtual QCString anchor() const =0
virtual int inbodyLine() const =0
virtual const FileDef * getBodyDef() const =0
virtual int briefLine() const =0
virtual bool isLinkableInProject() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual bool isAnonymous() const =0
virtual bool isHidden() const =0
virtual QCString documentation() const =0
virtual QCString qualifiedName() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual bool isArtificial() const =0
virtual QCString briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual const MemberVector & getReferencedByMembers() const =0
virtual int getStartBodyLine() const =0
virtual QCString getDefFileExtension() const =0
virtual int getDefColumn() const =0
virtual bool isReference() const =0
virtual const MemberVector & getReferencesMembers() const =0
virtual QCString inbodyDocumentation() const =0
virtual const QCString & name() const =0
A model of a directory symbol.
virtual const DirList & subDirs() const =0
virtual const FileList & getFiles() const =0
Class representing a directory in the file system.
Class representing the abstract syntax tree of a documentation block.
Representation of a class inheritance or dependency graph.
void writeXML(TextStream &t)
Representation of an include dependency graph.
void writeXML(TextStream &t)
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static std::unique_ptr< PageDef > mainPage
static FileNameLinkedMap * inputNameLinkedMap
static ParserManager * parserManager
static ClassLinkedMap * classLinkedMap
static PageLinkedMap * exampleLinkedMap
static PageLinkedMap * pageLinkedMap
static DirLinkedMap * dirLinkedMap
static GroupLinkedMap * groupLinkedMap
A model of a file symbol.
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual const MemberGroupList & getMemberGroups() const =0
virtual QCString absFilePath() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual const IncludeInfoList & includeFileList() const =0
virtual const MemberLists & getMemberLists() const =0
virtual const QCString & docName() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const IncludeInfoList & includedByFileList() const =0
A model of a group of symbols.
virtual const GroupList & getSubGroups() const =0
virtual QCString groupTitle() const =0
virtual const FileList & getFiles() const =0
virtual const MemberLists & getMemberLists() const =0
virtual const MemberGroupList & getMemberGroups() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const PageLinkedRefMap & getPages() const =0
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual const ModuleLinkedRefMap & getModules() const =0
void writeXMLSchema(TextStream &t)
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const T * find(const std::string &key) const
Find an object given the key.
bool isXmlEnabled() const
A model of a class/file/namespace member symbol.
virtual QCString typeString() const =0
virtual bool isConstExpr() const =0
virtual bool isConstEval() const =0
virtual bool isInitonly() const =0
virtual bool isNoExcept() const =0
virtual QCString requiresClause() const =0
virtual bool isAssign() const =0
virtual bool isExplicit() const =0
virtual bool isNew() const =0
virtual bool isMaybeVoid() const =0
virtual bool isSealed() const =0
virtual QCString definition() const =0
virtual QCString enumBaseType() const =0
virtual bool isConstInit() const =0
virtual QCString excpString() const =0
virtual const ClassDef * getClassDef() const =0
virtual const ArgumentList & templateArguments() const =0
virtual GroupDef * getGroupDef()=0
virtual bool isSettable() const =0
virtual bool isRetain() const =0
virtual bool isAddable() const =0
virtual const MemberVector & enumFieldList() const =0
virtual const FileDef * getFileDef() const =0
virtual bool isInline() const =0
virtual const ArgumentList & argumentList() const =0
virtual bool isWritable() const =0
virtual bool isMaybeAmbiguous() const =0
virtual bool isPrivateGettable() const =0
virtual const MemberVector & reimplementedBy() const =0
virtual bool isRequired() const =0
virtual bool isAttribute() const =0
virtual bool isExternal() const =0
virtual bool isCopy() const =0
virtual QCString getScopeString() const =0
virtual int getDeclLine() const =0
virtual bool isTypeAlias() const =0
virtual int getDeclColumn() const =0
virtual bool isStatic() const =0
virtual const MemberDef * reimplements() const =0
virtual bool isMaybeDefault() const =0
virtual QCString getWriteAccessor() const =0
virtual bool isPrivateSettable() const =0
virtual StringVector getQualifiers() const =0
virtual QCString bitfieldString() const =0
virtual bool isRaisable() const =0
virtual bool isRemovable() const =0
virtual bool isConstrained() const =0
virtual bool isReadonly() const =0
virtual bool isBound() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual QCString getDeclFileName() const =0
virtual bool isProtectedSettable() const =0
virtual bool isProtectedGettable() const =0
virtual bool hasOneLineInitializer() const =0
virtual bool isTransient() const =0
virtual bool hasMultiLineInitializer() const =0
virtual Protection protection() const =0
virtual bool isOptional() const =0
virtual QCString getReadAccessor() const =0
virtual bool isGettable() const =0
virtual MemberType memberType() const =0
virtual bool isReadable() const =0
virtual bool isWeak() const =0
virtual bool isNoDiscard() const =0
virtual bool isStrong() const =0
virtual QCString argsString() const =0
virtual Specifier virtualness(int count=0) const =0
virtual bool isUNOProperty() const =0
virtual bool isFinal() const =0
virtual const ArgumentList & declArgumentList() const =0
virtual bool isMutable() const =0
virtual bool isFriendClass() const =0
virtual const QCString & initializer() const =0
A list of MemberDef objects as shown in documentation sections.
MemberListType listType() const
constexpr bool isDetailed() const
constexpr const char * toXML() const
constexpr bool isDeclaration() const
virtual const MemberGroupList & getMemberGroups() const =0
virtual bool isPrimaryInterface() const =0
virtual const MemberLists & getMemberLists() const =0
virtual FileList getUsedFiles() const =0
virtual const ImportInfoMap & getExports() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
static ModuleManager & instance()
ModuleDef * getPrimaryInterface(const QCString &moduleName) const
An abstract interface of a namespace symbol.
virtual ConceptLinkedRefMap getConcepts() const =0
virtual const MemberLists & getMemberLists() const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual bool isInline() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual const MemberGroupList & getMemberGroups() const =0
Class representing a list of different code generators.
void add(OutputCodeIntfPtr &&p)
void endCodeFragment(const QCString &style)
void startCodeFragment(const QCString &style)
A model of a page symbol.
virtual const PageLinkedRefMap & getSubPages() const =0
virtual LocalToc localToc() const =0
virtual const GroupDef * getGroupDef() const =0
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
void fill(char c, int len=-1)
Fills a string with a predefined character.
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
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.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
void resize(size_t newlen)
const std::string & str() const
int findRev(char c, int index=-1, bool cs=TRUE) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
bool stripPrefix(const QCString &prefix)
static ResourceMgr & instance()
Returns the one and only instance of this class.
bool copyResource(const QCString &name, const QCString &targetDir) const
Copies a registered resource to a given target directory.
QCString getAsString(const QCString &name) const
Gets the resource data as a C string.
class that provide information about a section.
static SectionManager & instance()
returns a reference to the singleton
class that represents a list of constant references to sections.
Abstract interface for a hyperlinked text fragment.
Implements TextGeneratorIntf for an XML stream.
TextGeneratorXMLImpl(TextStream &t)
void writeString(std::string_view s, bool) const override
void writeLink(const QCString &extRef, const QCString &file, const QCString &anchor, std::string_view text) const override
void writeBreak(int) const override
Text streaming class that buffers data.
void write(const char *buf, size_t len)
Adds a array of character to the stream.
void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &) override
void setStripIndentAmount(size_t amount) override
void codify(const QCString &text) override
Generator for producing XML formatted source code.
void endCodeLine() override
size_t m_stripIndentAmount
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
void startCodeLine(int) override
void startSpecialComment() override
bool m_normalHLNeedStartTag
void endSpecialComment() override
void stripCodeComments(bool b) override
void startFontClass(const QCString &colorClass) override
void writeLineNumber(const QCString &extRef, const QCString &compId, const QCString &anchorId, int l, bool writeLineAnchor) override
void endCodeFragment(const QCString &) override
XMLCodeGenerator(TextStream *t)
void endFontClass() override
void writeCodeAnchor(const QCString &) override
void startCodeFragment(const QCString &) override
Concrete visitor implementation for XML output.
#define Config_getInt(name)
#define Config_getBool(name)
#define Config_getString(name)
std::vector< bool > BoolVector
IDocParserPtr createDocParser()
factory function to create a parser
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
constexpr uint32_t IncludeKind_LocalMask
Translator * theTranslator
void msg(const char *fmt,...)
std::unordered_map< std::string, ImportInfo > ImportInfoMap
void writeXMLDoxyfile(TextStream &t)
void writeXSDDoxyfile(TextStream &t)
std::ofstream openOutputStream(const QCString &name, bool append=false)
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
static void writeIndent(TextStream &t, int indent)
This class contains the information about the argument of a function or template.
bool hasDocumentation() const
Class representing the data associated with a #include statement.
Protection
Protection level of members.
SrcLangExt
Language as given by extension.
Specifier
Virtualness of a member.
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.
Various UTF8 related helper functions.
size_t updateColumnCount(const char *s, size_t col)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
void clearSubDirs(const Dir &d)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString filterTitle(const QCString &title)
void createSubDirs(const Dir &d)
static QCString stripFromPath(const QCString &p, const StringVector &l)
QCString convertToXML(const QCString &s, bool keepEntities)
QCString langToString(SrcLangExt lang)
Returns a string representation of lang.
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
void linkifyText(const TextGeneratorIntf &out, const Definition *scope, const FileDef *fileScope, const Definition *self, const QCString &text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
QCString convertCharEntitiesToUTF8(const QCString &str)
A bunch of utility functions.
static QCString classOutputFileBase(const ClassDef *cd)
static void generateXMLForGroup(const GroupDef *gd, TextStream &ti)
static void writeInnerConcepts(const ConceptLinkedRefMap &cl, TextStream &t)
static void writeInnerGroups(const GroupList &gl, TextStream &t)
static void writeXMLDocBlock(TextStream &t, const QCString &fileName, int lineNr, const Definition *scope, const MemberDef *md, const QCString &text)
static void writeInnerDirs(const DirList *dl, TextStream &t)
static void writeListOfAllMembers(const ClassDef *cd, TextStream &t)
static void stripAnonymousMarkers(QCString &s)
static void generateXMLForClass(const ClassDef *cd, TextStream &ti)
static void writeMemberReference(TextStream &t, const Definition *def, const MemberDef *rmd, const QCString &tagName)
static void generateXMLForFile(FileDef *fd, TextStream &ti)
static QCString memberOutputFileBase(const MemberDef *md)
static void writeMemberTemplateLists(const MemberDef *md, TextStream &t)
void writeXMLCodeBlock(TextStream &t, FileDef *fd)
static void writeTemplateList(const ClassDef *cd, TextStream &t)
static bool memberVisible(const Definition *d, const MemberDef *md)
static void writeIncludeInfo(const IncludeInfo *ii, TextStream &t)
static void stripQualifiers(QCString &typeStr)
static void writeInnerPages(const PageLinkedRefMap &pl, TextStream &t)
static void generateXMLForNamespace(const NamespaceDef *nd, TextStream &ti)
static void writeXMLHeader(TextStream &t)
static void writeInnerModules(const ModuleLinkedRefMap &ml, TextStream &t)
static void generateXMLForModule(const ModuleDef *mod, TextStream &ti)
static void generateXMLForConcept(const ConceptDef *cd, TextStream &ti)
static void writeExports(const ImportInfoMap &exportMap, TextStream &t)
static void writeInnerFiles(const FileList &fl, TextStream &t)
static void generateXMLForMember(const MemberDef *md, TextStream &ti, TextStream &t, const Definition *def)
void writeXMLCodeString(bool hide, TextStream &t, const QCString &str, size_t &col, size_t stripIndentAmount)
void writeXMLLink(TextStream &t, const QCString &extRef, const QCString &compoundId, const QCString &anchorId, const QCString &text, const QCString &tooltip)
static void writeTemplateArgumentList(TextStream &t, const ArgumentList &al, const Definition *scope, const FileDef *fileScope, int indent)
void writeXMLString(TextStream &t, const QCString &s)
static void generateXMLSection(const Definition *d, TextStream &ti, TextStream &t, const MemberList *ml, const QCString &kind, const QCString &header=QCString(), const QCString &documentation=QCString())
static void writeInnerClasses(const ClassLinkedRefMap &cl, TextStream &t)
static void writeInnerNamespaces(const NamespaceLinkedRefMap &nl, TextStream &t)
static void generateXMLForDir(DirDef *dd, TextStream &ti)
static void generateXMLForPage(PageDef *pd, TextStream &ti, bool isExample)
static QCString extractNoExcept(QCString &argsStr)
static void writeCombineScript()