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 <<
"\"";
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 (
const auto &[moduleName,importInfoList] : exportMap)
1357 for (
const auto &importInfo : importInfoList)
1366 t << importInfo.importName;
1370 t <<
" </exports>\n";
1375 for (
const auto &fd : fl)
1377 t <<
" <innerfile refid=\"" << fd->getOutputFileBase()
1378 <<
"\">" <<
convertToXML(fd->name()) <<
"</innerfile>\n";
1384 for (
const auto &pd : pl)
1386 t <<
" <innerpage refid=\"" << pd->getOutputFileBase();
1387 if (pd->getGroupDef())
1389 t <<
"_" << pd->name();
1391 t <<
"\">" <<
convertToXML(pd->title()) <<
"</innerpage>\n";
1397 for (
const auto &sgd : gl)
1399 t <<
" <innergroup refid=\"" << sgd->getOutputFileBase()
1401 <<
"</innergroup>\n";
1409 for(
const auto subdir : *dl)
1411 t <<
" <innerdir refid=\"" << subdir->getOutputFileBase()
1412 <<
"\">" <<
convertToXML(subdir->displayName()) <<
"</innerdir>\n";
1432 t <<
"</includes>\n";
1461 msg(
"Generating XML output for class %s\n",
qPrint(cd->
name()));
1472 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1478 t <<
" <compounddef id=\""
1489 if (cd->
isFinal()) t <<
"\" final=\"yes";
1490 if (cd->
isSealed()) t <<
"\" sealed=\"yes";
1491 if (cd->
isAbstract()) t <<
"\" abstract=\"yes";
1493 t <<
" <compoundname>";
1497 t <<
"</compoundname>\n";
1500 t <<
" <basecompoundref ";
1501 if (bcd.classDef->isLinkable())
1521 if (!bcd.templSpecifiers.isEmpty())
1525 bcd.classDef->name(),bcd.templSpecifiers)
1532 t <<
"</basecompoundref>\n";
1536 t <<
" <derivedcompoundref refid=\""
1553 t <<
"\">" <<
convertToXML(bcd.classDef->displayName())
1554 <<
"</derivedcompoundref>\n";
1565 mg->documentation());
1578 t <<
" <requiresclause>";
1580 t <<
" </requiresclause>\n";
1585 t <<
" <qualifier>" <<
convertToXML(qcd.c_str()) <<
"</qualifier>\n";
1588 t <<
" <briefdescription>\n";
1590 t <<
" </briefdescription>\n";
1591 t <<
" <detaileddescription>\n";
1593 t <<
" </detaileddescription>\n";
1597 t <<
" <inheritancegraph>\n";
1599 t <<
" </inheritancegraph>\n";
1604 t <<
" <collaborationgraph>\n";
1606 t <<
" </collaborationgraph>\n";
1608 t <<
" <location file=\""
1624 t <<
" </compounddef>\n";
1625 t <<
"</doxygen>\n";
1627 ti <<
" </compound>\n";
1635 <<
"\" kind=\"concept\"" <<
"><name>"
1643 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1649 <<
"\" kind=\"concept\">\n";
1650 t <<
" <compoundname>";
1654 t <<
"</compoundname>\n";
1657 t <<
" <initializer>";
1659 t <<
" </initializer>\n";
1660 t <<
" <briefdescription>\n";
1662 t <<
" </briefdescription>\n";
1663 t <<
" <detaileddescription>\n";
1665 t <<
" </detaileddescription>\n";
1666 t <<
" <location file=\""
1670 t <<
" </compounddef>\n";
1671 t <<
"</doxygen>\n";
1673 ti <<
" </compound>\n";
1680 <<
"\" kind=\"module\"" <<
"><name>"
1688 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1694 <<
"\" kind=\"module\">\n";
1695 t <<
" <compoundname>";
1697 t <<
"</compoundname>\n";
1711 mg->documentation());
1713 t <<
" <briefdescription>\n";
1715 t <<
" </briefdescription>\n";
1716 t <<
" <detaileddescription>\n";
1718 t <<
" </detaileddescription>\n";
1720 t <<
" <location file=\""
1724 t <<
" </compounddef>\n";
1725 t <<
"</doxygen>\n";
1727 ti <<
" </compound>\n";
1745 <<
"\" kind=\"namespace\"" <<
"><name>"
1753 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1760 <<
"\" kind=\"namespace\" "
1761 << (nd->
isInline()?
"inline=\"yes\" ":
"")
1764 t <<
" <compoundname>";
1768 t <<
"</compoundname>\n";
1777 mg->documentation());
1788 t <<
" <briefdescription>\n";
1790 t <<
" </briefdescription>\n";
1791 t <<
" <detaileddescription>\n";
1793 t <<
" </detaileddescription>\n";
1794 t <<
" <location file=\""
1798 t <<
" </compounddef>\n";
1799 t <<
"</doxygen>\n";
1801 ti <<
" </compound>\n";
1831 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1838 <<
"\" kind=\"file\" language=\""
1840 t <<
" <compoundname>";
1842 t <<
"</compoundname>\n";
1847 if (inc.fileDef && !inc.fileDef->isReference())
1849 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1852 t << inc.includeName;
1853 t <<
"</includes>\n";
1858 t <<
" <includedby";
1859 if (inc.fileDef && !inc.fileDef->isReference())
1861 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1864 t << inc.includeName;
1865 t <<
"</includedby>\n";
1871 t <<
" <incdepgraph>\n";
1873 t <<
" </incdepgraph>\n";
1879 t <<
" <invincdepgraph>\n";
1881 t <<
" </invincdepgraph>\n";
1891 mg->documentation());
1902 t <<
" <briefdescription>\n";
1904 t <<
" </briefdescription>\n";
1905 t <<
" <detaileddescription>\n";
1907 t <<
" </detaileddescription>\n";
1913 t <<
" </compounddef>\n";
1914 t <<
"</doxygen>\n";
1916 ti <<
" </compound>\n";
1943 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1949 t <<
" <compounddef id=\""
1965 mg->documentation());
1976 t <<
" <briefdescription>\n";
1978 t <<
" </briefdescription>\n";
1979 t <<
" <detaileddescription>\n";
1981 t <<
" </detaileddescription>\n";
1982 t <<
" </compounddef>\n";
1983 t <<
"</doxygen>\n";
1985 ti <<
" </compound>\n";
2000 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2006 t <<
" <compounddef id=\""
2013 t <<
" <briefdescription>\n";
2015 t <<
" </briefdescription>\n";
2016 t <<
" <detaileddescription>\n";
2018 t <<
" </detaileddescription>\n";
2020 t <<
" </compounddef>\n";
2021 t <<
"</doxygen>\n";
2023 ti <<
" </compound>\n";
2033 const char *kindName = isExample ?
"example" :
"page";
2042 if (pageName==
"index") pageName=
"indexpage";
2044 ti <<
" <compound refid=\"" << pageName
2049 QCString fileName=outputDirectory+
"/"+pageName+
".xml";
2053 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2059 t <<
" <compounddef id=\"" << pageName;
2060 t <<
"\" kind=\"" << kindName <<
"\">\n";
2062 <<
"</compoundname>\n";
2093 auto writeIndent = [&]() {
for (
int i=0;i<4+indent*2;i++) t <<
" "; };
2094 auto incIndent = [&](
const char *text) {
writeIndent(); t << text <<
"\n"; indent++; };
2095 auto decIndent = [&](
const char *text) { indent--;
writeIndent(); t << text <<
"\n"; };
2096 incIndent(
"<tableofcontents>");
2101 if (si->type().isSection())
2104 int nextLevel = si->type().level();
2105 if (nextLevel>level)
2107 for (
int l=level;l<nextLevel;l++)
2109 if (l < maxLevel) incIndent(
"<tableofcontents>");
2112 else if (nextLevel<level)
2114 for (
int l=level;l>nextLevel;l--)
2116 if (l <= maxLevel && inLi[l]) decIndent(
"</tocsect>");
2118 if (l <= maxLevel) decIndent(
"</tableofcontents>");
2121 if (nextLevel <= maxLevel)
2123 if (inLi[nextLevel])
2125 decIndent(
"</tocsect>");
2127 else if (level>nextLevel)
2129 decIndent(
"</tableofcontents>");
2130 incIndent(
"<tableofcontents>");
2134 if (titleDoc.
isEmpty()) titleDoc = label;
2135 incIndent(
"<tocsect>");
2136 writeIndent(); t <<
"<name>" << titleDoc <<
"</name>\n";
2138 inLi[nextLevel]=
true;
2143 while (level>1 && level <= maxLevel)
2145 if (inLi[level]) decIndent(
"</tocsect>");
2147 decIndent(
"</tableofcontents>");
2150 if (level <= maxLevel && inLi[level]) decIndent(
"</tocsect>");
2152 decIndent(
"</tableofcontents>");
2154 t <<
" <briefdescription>\n";
2156 t <<
" </briefdescription>\n";
2157 t <<
" <detaileddescription>\n";
2168 t <<
" </detaileddescription>\n";
2172 t <<
" </compounddef>\n";
2173 t <<
"</doxygen>\n";
2175 ti <<
" </compound>\n";
2189 Dir xmlDir(outputDirectory.
str());
2195 QCString fileName=outputDirectory+
"/compound.xsd";
2199 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2207 const char *startLine = compound_xsd.
data();
2211 const char *endLine = startLine+1;
2212 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2213 int len=
static_cast<int>(endLine-startLine);
2217 if (s.
find(
"<!-- Automatically insert here the HTML entities -->")!=-1)
2223 t.
write(startLine,len);
2231 fileName=outputDirectory+
"/doxyfile.xsd";
2235 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2243 const char *startLine = doxyfile_xsd.
data();
2247 const char *endLine = startLine+1;
2248 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2249 int len=
static_cast<int>(endLine-startLine);
2253 if (s.
find(
"<!-- Automatically insert here the configuration settings -->")!=-1)
2259 t.
write(startLine,len);
2267 fileName=outputDirectory+
"/Doxyfile.xml";
2271 err(
"Cannot open file %s for writing\n",fileName.
data());
2281 fileName=outputDirectory+
"/index.xml";
2285 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2293 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2294 t <<
"<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2295 t <<
"xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2296 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
2306 msg(
"Generating XML output for concept %s\n",
qPrint(cd->displayName()));
2311 msg(
"Generating XML output for namespace %s\n",
qPrint(nd->displayName()));
2316 for (
const auto &fd : *fn)
2318 msg(
"Generating XML output for file %s\n",
qPrint(fd->name()));
2324 msg(
"Generating XML output for group %s\n",
qPrint(gd->name()));
2329 msg(
"Generating XML output for page %s\n",
qPrint(pd->name()));
2334 msg(
"Generate XML output for dir %s\n",
qPrint(dd->name()));
2339 msg(
"Generating XML output for module %s\n",
qPrint(mod->name()));
2344 msg(
"Generating XML output for example %s\n",
qPrint(pd->name()));
2349 msg(
"Generating XML output for the main page\n");
2354 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, ImportInfoList > 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()