57#define XML_DB(x) do {} while(0)
85 const char *s = str.
data();
99 int spacesToNextTabStop = tabSize - (col%tabSize);
100 while (spacesToNextTabStop--)
102 if (col>=stripIndentAmount) t <<
"<sp/>";
108 if (col>=stripIndentAmount) t <<
"<sp/>";
111 case '<': t <<
"<"; col++;
break;
112 case '>': t <<
">"; col++;
break;
113 case '&': t <<
"&"; col++;
break;
114 case '\'': t <<
"'"; col++;
break;
115 case '"': t <<
"""; col++;
break;
116 case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
117 case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
118 case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
119 case 27:
case 28:
case 29:
case 30:
case 31:
121 t <<
"<sp value=\"" << int(c) <<
"\"/>";
132 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
133 t <<
"<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
134 t <<
"xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
135 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
143 QCString fileName=outputDirectory+
"/combine.xslt";
147 err(
"Cannot open file {} for writing!\n",fileName);
152 "<!-- XSLT script to combine the generated output into a single file. \n"
153 " If you have xsltproc you could use:\n"
154 " xsltproc combine.xslt index.xml >all.xml\n"
156 "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
157 " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n"
158 " <xsl:template match=\"/\">\n"
159 " <doxygen version=\"{doxygenindex/@version}\" xml:lang=\"{doxygenindex/@xml:lang}\">\n"
160 " <!-- Load all doxygen generated xml files -->\n"
161 " <xsl:for-each select=\"doxygenindex/compound\">\n"
162 " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
166 "</xsl:stylesheet>\n";
173 t <<
"<ref refid=\"" << compoundId;
174 if (!anchorId.
isEmpty()) t <<
"_1" << anchorId;
175 t <<
"\" kindref=\"";
176 if (!anchorId.
isEmpty()) t <<
"member";
else t <<
"compound";
178 if (!extRef.
isEmpty()) t <<
" external=\"" << extRef <<
"\"";
196 const QCString &anchor,std::string_view text
217 *
m_t <<
"<highlight class=\"normal\">";
249 XML_DB((
"(writeCodeLink)\n"));
252 *
m_t <<
"<highlight class=\"normal\">";
264 XML_DB((
"(writeToolTip)\n"));
271 XML_DB((
"(startCodeLine)\n"));
281 *
m_t <<
" refkind=\"member\"";
285 *
m_t <<
" refkind=\"compound\"";
301 XML_DB((
"(endCodeLine)\n"));
304 *
m_t <<
"</highlight>";
309 *
m_t <<
"</codeline>\n";
320 XML_DB((
"(startFontClass)\n"));
323 *
m_t <<
"</highlight>";
326 *
m_t <<
"<highlight class=\"" << colorClass <<
"\">";
333 XML_DB((
"(endFontClass)\n"));
334 *
m_t <<
"</highlight>";
341 XML_DB((
"(writeCodeAnchor)\n"));
345 const QCString &anchorId,
int l,
bool)
348 XML_DB((
"(writeLineNumber)\n"));
363 XML_DB((
"(startCodeFragment)\n"));
364 *
m_t <<
" <programlisting>\n";
369 XML_DB((
"(endCodeFragment)\n"));
370 *
m_t <<
" </programlisting>\n";
382 indentStr.
fill(
' ',indent);
385 t << indentStr <<
"<templateparamlist>\n";
388 t << indentStr <<
" <param>\n";
389 if (!a.type.isEmpty())
391 t << indentStr <<
" <type>";
395 if (!a.name.isEmpty())
397 t << indentStr <<
" <declname>" <<
convertToXML(a.name) <<
"</declname>\n";
398 t << indentStr <<
" <defname>" <<
convertToXML(a.name) <<
"</defname>\n";
400 if (!a.defval.isEmpty())
402 t << indentStr <<
" <defval>";
406 if (!a.typeConstraint.isEmpty())
408 t << indentStr <<
" <typeconstraint>";
410 t <<
"</typeconstraint>\n";
412 if (a.hasTemplateDocumentation())
414 t << indentStr <<
" <briefdescription>\n";
415 t << indentStr <<
" ";
424 t << indentStr <<
" </briefdescription>\n";
426 t << indentStr <<
" </param>\n";
428 t << indentStr <<
"</templateparamlist>\n";
466 auto astImpl =
dynamic_cast<const DocNodeAST*
>(ast.get());
475 std::visit(visitor,astImpl->root);
484 intf->resetCodeParserState();
488 intf->parseCode(xmlList,
507 t <<
" <" << tagName <<
" refid=\"";
518 t <<
">" <<
convertToXML(name) <<
"</" << tagName <<
">\n";
533 else if (typeStr==
"virtual") typeStr=
"";
565 int len =
static_cast<int>(strlen(keyword));
566 int searchEnd =
static_cast<int>(str.
size());
567 while (searchStart<searchEnd)
569 int index = str.
find(keyword, searchStart);
574 int end = index + len;
577 if ((index>0 && str[index-1]!=
' ') ||
578 (
end!=searchEnd && str[
end] !=
' ')
585 if (needSpace && index>0)
587 str.
remove(index-1, len+1);
588 searchEnd -= (len+1);
590 else if (needSpace &&
end<searchEnd)
593 searchEnd -= (len+1);
609 int i = argsStr.
find(
"noexcept(");
612 int bracketCount = 1;
615 bool insideString =
false;
616 bool insideChar =
false;
618 while (!found && p<argsStr.
length())
620 char c = argsStr[p++];
623 if (c==
'"' && pc!=
'\\') insideString=
false;
627 if (c==
'\'' && pc!=
'\\') insideChar=
false;
633 case '(': bracketCount++;
break;
634 case ')': bracketCount--; found = bracketCount==0;
break;
635 case '"': insideString =
true;
break;
636 case '\'': insideChar =
true;
break;
641 expr = argsStr.
mid(i+9,p-i-10);
654 t <<
prefix <<
" <" << tagName <<
">\n";
655 for (
const auto &ref : refs)
660 t <<
prefix <<
" </" << tagName <<
">\n";
666 writeRefsForType(satisfiesRefs,
"satisfies");
667 writeRefsForType(verifiesRefs,
"verifies");
734 argsStr +=
" override";
746 argsStr +=
"=default";
750 argsStr +=
"=delete";
752 i=defStr.
find(
"auto ");
755 defStr=defStr.
left(i)+typeStr+defStr.
mid(i+4);
762 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
767 t <<
" <member refid=\""
769 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
775 t <<
" <memberdef kind=\"";
776 t << memType <<
"\" id=\"";
787 if (md->
isStatic()) t <<
"yes";
else t <<
"no";
792 t <<
" nodiscard=\"yes\"";
797 t <<
" constexpr=\"yes\"";
802 t <<
" consteval=\"yes\"";
807 t <<
" constinit=\"yes\"";
812 t <<
" extern=\"yes\"";
823 if (md->
isExplicit()) t <<
"yes";
else t <<
"no";
827 if (md->
isInline()) t <<
"yes";
else t <<
"no";
839 t <<
" final=\"yes\"";
844 t <<
" sealed=\"yes\"";
854 t <<
" optional=\"yes\"";
859 t <<
" required=\"yes\"";
864 t <<
" noexcept=\"yes\"";
869 t <<
" noexceptexpression=\"" <<
convertToXML(noExceptExpr) <<
"\"";
874 t <<
" volatile=\"yes\"";
884 if (md->
isStrong()) t <<
"yes";
else t <<
"no";
895 if (md->
isMutable()) t <<
"yes";
else t <<
"no";
900 t <<
" thread_local=\"yes\"";
905 t <<
" initonly=\"yes\"";
909 t <<
" attribute=\"yes\"";
913 t <<
" property=\"yes\"";
917 t <<
" readonly=\"yes\"";
921 t <<
" bound=\"yes\"";
925 t <<
" removable=\"yes\"";
929 t <<
" constrained=\"yes\"";
933 t <<
" transient=\"yes\"";
937 t <<
" maybevoid=\"yes\"";
941 t <<
" maybedefault=\"yes\"";
945 t <<
" maybeambiguous=\"yes\"";
951 if (md->
isReadable()) t <<
"yes";
else t <<
"no";
955 if (md->
isWritable()) t <<
"yes";
else t <<
"no";
959 if (md->
isGettable()) t <<
"yes";
else t <<
"no";
962 t <<
" privategettable=\"";
966 t <<
" protectedgettable=\"";
971 if (md->
isSettable()) t <<
"yes";
else t <<
"no";
974 t <<
" privatesettable=\"";
978 t <<
" protectedsettable=\"";
986 else if (md->
isCopy()) t <<
"copy";
987 else if (md->
isRetain()) t <<
"retain";
988 else if (md->
isStrong()) t <<
"strong";
989 else if (md->
isWeak()) t <<
"weak";
996 if (md->
isAddable()) t <<
"yes";
else t <<
"no";
1000 if (md->
isRemovable()) t <<
"yes";
else t <<
"no";
1004 if (md->
isRaisable()) t <<
"yes";
else t <<
"no";
1022 t <<
" <definition>" <<
convertToXML(defStr) <<
"</definition>\n";
1023 t <<
" <argsstring>" <<
convertToXML(argsStr) <<
"</argsstring>\n";
1034 t <<
" <name>" <<
convertToXML(nameStr) <<
"</name>\n";
1035 if (nameStr!=qualifiedNameStr)
1037 t <<
" <qualifiedname>" <<
convertToXML(qualifiedNameStr) <<
"</qualifiedname>\n";
1051 if (bitfield.
at(0)==
':') bitfield=bitfield.
mid(1);
1052 t <<
" <bitfield>" <<
convertToXML(bitfield) <<
"</bitfield>\n";
1058 t <<
" <reimplements refid=\""
1064 t <<
" <reimplementedby refid=\""
1066 <<
convertToXML(rbmd->name()) <<
"</reimplementedby>\n";
1071 t <<
" <qualifier>" <<
convertToXML(qmd) <<
"</qualifier>\n";
1086 bool isFortran = md->
getLanguage()==SrcLangExt::Fortran;
1089 auto defIt = defAl.
begin();
1094 if (defIt!=defAl.
end())
1100 if (!a.attrib.isEmpty())
1102 t <<
" <attributes>";
1104 t <<
"</attributes>\n";
1106 if (isFortran && defArg && !defArg->
type.
isEmpty())
1112 else if (!a.type.isEmpty())
1118 if (!a.name.isEmpty())
1122 t <<
"</declname>\n";
1128 t <<
"</defname>\n";
1130 if (!a.array.isEmpty())
1136 if (!a.defval.isEmpty())
1144 t <<
" <briefdescription>";
1147 t <<
"</briefdescription>\n";
1159 t <<
" <param></param>\n";
1165 t <<
" <param><defname>" << a.type <<
"</defname></param>\n";
1171 t <<
" <requiresclause>";
1173 t <<
" </requiresclause>\n";
1178 t <<
" <initializer>";
1180 t <<
"</initializer>\n";
1185 t <<
" <exceptions>";
1187 t <<
"</exceptions>\n";
1196 <<
"_1" << emd->anchor() <<
"\" kind=\"enumvalue\"><name>"
1200 << emd->anchor() <<
"\" prot=\"" <<
to_string_lower(emd->protection());
1205 if (!emd->initializer().isEmpty())
1207 t <<
" <initializer>";
1209 t <<
"</initializer>\n";
1211 t <<
" <briefdescription>\n";
1212 writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1213 t <<
" </briefdescription>\n";
1214 t <<
" <detaileddescription>\n";
1215 writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
1216 t <<
" </detaileddescription>\n";
1217 t <<
" </enumvalue>\n";
1220 t <<
" <briefdescription>\n";
1222 t <<
" </briefdescription>\n";
1223 t <<
" <detaileddescription>\n";
1225 t <<
" </detaileddescription>\n";
1226 t <<
" <inbodydescription>\n";
1228 t <<
" </inbodydescription>\n";
1231 t <<
" <location file=\""
1256 for (
const auto &refmd : refList)
1261 for (
const auto &refmd : refByList)
1266 t <<
" </memberdef>\n";
1282 if (ml==
nullptr)
return;
1284 for (
const auto &md : *ml)
1292 if (count==0)
return;
1294 t <<
" <sectiondef kind=\"" << kind <<
"\">\n";
1295 if (!header.isEmpty())
1297 t <<
" <header>" <<
convertToXML(header) <<
"</header>\n";
1299 if (!documentation.isEmpty())
1301 t <<
" <description>";
1303 t <<
"</description>\n";
1305 for (
const auto &md : *ml)
1312 t <<
" </sectiondef>\n";
1317 t <<
" <listofallmembers>\n";
1320 for (
auto &mi : *mni)
1330 if (!mi->ambiguityResolutionScope().isEmpty())
1332 t <<
" ambiguityscope=\"" <<
convertToXML(mi->ambiguityResolutionScope()) <<
"\"";
1339 t <<
" </listofallmembers>\n";
1344 for (
const auto &cd : cl)
1346 if (!cd->isHidden() && !cd->isAnonymous())
1350 t <<
"\">" <<
convertToXML(cd->name()) <<
"</innerclass>\n";
1357 for (
const auto &cd : cl)
1359 if (!cd->isHidden())
1361 t <<
" <innerconcept refid=\"" << cd->getOutputFileBase()
1362 <<
"\">" <<
convertToXML(cd->name()) <<
"</innerconcept>\n";
1369 for (
const auto &mod : ml)
1371 if (!mod->isHidden())
1373 t <<
" <innermodule refid=\"" << mod->getOutputFileBase()
1374 <<
"\">" <<
convertToXML(mod->name()) <<
"</innermodule>\n";
1381 for (
const auto &nd : nl)
1383 if (!nd->isHidden() && !nd->isAnonymous())
1385 t <<
" <innernamespace refid=\"" << nd->getOutputFileBase()
1386 <<
"\"" << (nd->isInline() ?
" inline=\"yes\"" :
"")
1387 <<
">" <<
convertToXML(nd->name()) <<
"</innernamespace>\n";
1394 if (exportMap.empty())
return;
1395 t <<
" <exports>\n";
1396 for (
const auto &[moduleName,importInfoList] : exportMap)
1398 for (
const auto &importInfo : importInfoList)
1407 t << importInfo.importName;
1411 t <<
" </exports>\n";
1416 for (
const auto &fd : fl)
1418 t <<
" <innerfile refid=\"" << fd->getOutputFileBase()
1419 <<
"\">" <<
convertToXML(fd->name()) <<
"</innerfile>\n";
1425 for (
const auto &pd : pl)
1427 t <<
" <innerpage refid=\"" << pd->getOutputFileBase();
1428 if (pd->getGroupDef())
1430 t <<
"_" << pd->name();
1432 t <<
"\">" <<
convertToXML(pd->title()) <<
"</innerpage>\n";
1438 for (
const auto &sgd : gl)
1440 t <<
" <innergroup refid=\"" << sgd->getOutputFileBase()
1442 <<
"</innergroup>\n";
1450 for(
const auto subdir : *dl)
1452 t <<
" <innerdir refid=\"" << subdir->getOutputFileBase()
1453 <<
"\">" <<
convertToXML(subdir->displayName()) <<
"</innerdir>\n";
1473 t <<
"</includes>\n";
1502 msg(
"Generating XML output for class {}\n",cd->
name());
1513 err(
"Cannot open file {} for writing!\n",fileName);
1519 t <<
" <compounddef id=\""
1524 if (cd->
isFinal()) t <<
"\" final=\"yes";
1525 if (cd->
isSealed()) t <<
"\" sealed=\"yes";
1526 if (cd->
isAbstract()) t <<
"\" abstract=\"yes";
1528 t <<
" <compoundname>";
1531 t <<
"</compoundname>\n";
1534 t <<
" <basecompoundref ";
1535 if (bcd.classDef->isLinkable())
1539 if (bcd.prot == Protection::Package)
ASSERT(0);
1545 if (!bcd.templSpecifiers.isEmpty())
1549 bcd.classDef->name(),bcd.templSpecifiers)
1556 t <<
"</basecompoundref>\n";
1560 if (bcd.prot == Protection::Package)
ASSERT(0);
1561 t <<
" <derivedcompoundref refid=\""
1567 t <<
"\">" <<
convertToXML(bcd.classDef->displayName())
1568 <<
"</derivedcompoundref>\n";
1579 mg->documentation());
1592 t <<
" <requiresclause>";
1594 t <<
" </requiresclause>\n";
1599 t <<
" <qualifier>" <<
convertToXML(qcd) <<
"</qualifier>\n";
1602 t <<
" <briefdescription>\n";
1604 t <<
" </briefdescription>\n";
1605 t <<
" <detaileddescription>\n";
1607 t <<
" </detaileddescription>\n";
1611 t <<
" <inheritancegraph>\n";
1613 t <<
" </inheritancegraph>\n";
1618 t <<
" <collaborationgraph>\n";
1620 t <<
" </collaborationgraph>\n";
1623 t <<
" <location file=\""
1639 t <<
" </compounddef>\n";
1640 t <<
"</doxygen>\n";
1642 ti <<
" </compound>\n";
1650 <<
"\" kind=\"concept\"" <<
"><name>"
1658 err(
"Cannot open file {} for writing!\n",fileName);
1664 <<
"\" kind=\"concept\">\n";
1665 t <<
" <compoundname>";
1668 t <<
"</compoundname>\n";
1671 t <<
" <initializer>";
1673 t <<
"</initializer>\n";
1675 intf->resetCodeParserState();
1678 t <<
" <conceptparts>\n";
1684 t <<
" <docpart line=\"" << part.lineNr <<
"\" col=\"" << part.colNr <<
"\">\n";
1686 t <<
" </docpart>\n";
1689 t <<
" <codepart line=\"" << part.lineNr <<
"\">";
1691 intf->parseCode(xmlList,
1699 t <<
"</codepart>\n";
1703 t <<
" </conceptparts>\n";
1704 t <<
" <briefdescription>\n";
1706 t <<
" </briefdescription>\n";
1707 t <<
" <detaileddescription>\n";
1709 t <<
" </detaileddescription>\n";
1711 t <<
" <location file=\""
1715 t <<
" </compounddef>\n";
1716 t <<
"</doxygen>\n";
1718 ti <<
" </compound>\n";
1725 <<
"\" kind=\"module\"" <<
"><name>"
1733 err(
"Cannot open file {} for writing!\n",fileName);
1739 <<
"\" kind=\"module\">\n";
1740 t <<
" <compoundname>";
1742 t <<
"</compoundname>\n";
1756 mg->documentation());
1758 t <<
" <briefdescription>\n";
1760 t <<
" </briefdescription>\n";
1761 t <<
" <detaileddescription>\n";
1763 t <<
" </detaileddescription>\n";
1766 t <<
" <location file=\""
1770 t <<
" </compounddef>\n";
1771 t <<
"</doxygen>\n";
1773 ti <<
" </compound>\n";
1791 <<
"\" kind=\"namespace\"" <<
"><name>"
1799 err(
"Cannot open file {} for writing!\n",fileName);
1806 <<
"\" kind=\"namespace\" "
1807 << (nd->
isInline()?
"inline=\"yes\" ":
"")
1810 t <<
" <compoundname>";
1813 t <<
"</compoundname>\n";
1822 mg->documentation());
1833 t <<
" <briefdescription>\n";
1835 t <<
" </briefdescription>\n";
1836 t <<
" <detaileddescription>\n";
1838 t <<
" </detaileddescription>\n";
1840 t <<
" <location file=\""
1844 t <<
" </compounddef>\n";
1845 t <<
"</doxygen>\n";
1847 ti <<
" </compound>\n";
1877 err(
"Cannot open file {} for writing!\n",fileName);
1884 <<
"\" kind=\"file\" language=\""
1886 t <<
" <compoundname>";
1888 t <<
"</compoundname>\n";
1893 if (inc.fileDef && !inc.fileDef->isReference())
1895 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1899 t <<
"</includes>\n";
1904 t <<
" <includedby";
1905 if (inc.fileDef && !inc.fileDef->isReference())
1907 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1911 t <<
"</includedby>\n";
1917 t <<
" <incdepgraph>\n";
1919 t <<
" </incdepgraph>\n";
1925 t <<
" <invincdepgraph>\n";
1927 t <<
" </invincdepgraph>\n";
1937 mg->documentation());
1948 t <<
" <briefdescription>\n";
1950 t <<
" </briefdescription>\n";
1951 t <<
" <detaileddescription>\n";
1953 t <<
" </detaileddescription>\n";
1960 t <<
" </compounddef>\n";
1961 t <<
"</doxygen>\n";
1963 ti <<
" </compound>\n";
1990 err(
"Cannot open file {} for writing!\n",fileName);
1996 t <<
" <compounddef id=\""
2012 mg->documentation());
2023 t <<
" <briefdescription>\n";
2025 t <<
" </briefdescription>\n";
2026 t <<
" <detaileddescription>\n";
2028 t <<
" </detaileddescription>\n";
2030 t <<
" </compounddef>\n";
2031 t <<
"</doxygen>\n";
2033 ti <<
" </compound>\n";
2048 err(
"Cannot open file {} for writing!\n",fileName);
2054 t <<
" <compounddef id=\""
2061 t <<
" <briefdescription>\n";
2063 t <<
" </briefdescription>\n";
2064 t <<
" <detaileddescription>\n";
2066 t <<
" </detaileddescription>\n";
2069 t <<
" </compounddef>\n";
2070 t <<
"</doxygen>\n";
2072 ti <<
" </compound>\n";
2082 const char *kindName = isExample ?
"example" :
"page";
2091 if (pageName==
"index")
2093 pageName=
"indexpage";
2095 else if (pageName==
"requirements")
2100 ti <<
" <compound refid=\"" << pageName
2105 QCString fileName=outputDirectory+
"/"+pageName+
".xml";
2109 err(
"Cannot open file {} for writing!\n",fileName);
2115 t <<
" <compounddef id=\"" << pageName;
2116 t <<
"\" kind=\"" << kindName <<
"\">\n";
2118 <<
"</compoundname>\n";
2149 auto writeIndent = [&]() {
for (
int i=0;i<4+indent*2;i++) t <<
" "; };
2150 auto incIndent = [&](
const char *text) {
writeIndent(); t << text <<
"\n"; indent++; };
2151 auto decIndent = [&](
const char *text) { indent--;
writeIndent(); t << text <<
"\n"; };
2152 incIndent(
"<tableofcontents>");
2157 if (si->type().isSection())
2160 int nextLevel = si->type().level();
2161 if (nextLevel>level)
2163 for (
int l=level;l<nextLevel;l++)
2165 if (l < maxLevel) incIndent(
"<tableofcontents>");
2168 else if (nextLevel<level)
2170 for (
int l=level;l>nextLevel;l--)
2172 if (l <= maxLevel && inLi[l]) decIndent(
"</tocsect>");
2174 if (l <= maxLevel) decIndent(
"</tableofcontents>");
2177 if (nextLevel <= maxLevel)
2179 if (inLi[nextLevel])
2181 decIndent(
"</tocsect>");
2183 else if (level>nextLevel)
2185 decIndent(
"</tableofcontents>");
2186 incIndent(
"<tableofcontents>");
2190 if (titleDoc.
isEmpty()) titleDoc = label;
2191 incIndent(
"<tocsect>");
2192 writeIndent(); t <<
"<name>" << titleDoc <<
"</name>\n";
2194 if (!si->title().isEmpty())
2200 inLi[nextLevel]=
true;
2205 while (level>1 && level <= maxLevel)
2207 if (inLi[level]) decIndent(
"</tocsect>");
2209 decIndent(
"</tableofcontents>");
2212 if (level <= maxLevel && inLi[level]) decIndent(
"</tocsect>");
2214 decIndent(
"</tableofcontents>");
2216 t <<
" <briefdescription>\n";
2218 t <<
" </briefdescription>\n";
2219 t <<
" <detaileddescription>\n";
2230 t <<
" </detaileddescription>\n";
2235 t <<
" </compounddef>\n";
2236 t <<
"</doxygen>\n";
2238 ti <<
" </compound>\n";
2244 ti <<
" <compound refid=\"" << pageName <<
"\" kind=\"requirement\"><name>" <<
convertToXML(req->
id()) <<
"</name>\n";
2247 QCString fileName = outputDirectory+
"/"+pageName+
".xml";
2251 err(
"Cannot open file {} for writing!\n",fileName);
2256 t <<
" <compounddef id=\"" << pageName <<
"\" kind=\"requirement\">\n";
2257 t <<
" <compoundname>" <<
convertToXML(req->
id()) <<
"</compoundname>\n";
2259 t <<
" <detaileddescription>\n";
2261 t <<
" </detaileddescription>\n";
2263 t <<
" </compounddef>\n";
2264 t <<
"</doxygen>\n";
2266 ti <<
" </compound>\n";
2281 Dir xmlDir(outputDirectory.
str());
2287 QCString fileName=outputDirectory+
"/compound.xsd";
2291 err(
"Cannot open file {} for writing!\n",fileName);
2299 const char *startLine = compound_xsd.
data();
2303 const char *endLine = startLine+1;
2304 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2305 int len=
static_cast<int>(endLine-startLine);
2309 if (s.
find(
"<!-- Automatically insert here the HTML entities -->")!=-1)
2315 t.
write(startLine,len);
2323 fileName=outputDirectory+
"/doxyfile.xsd";
2327 err(
"Cannot open file {} for writing!\n",fileName);
2335 const char *startLine = doxyfile_xsd.
data();
2339 const char *endLine = startLine+1;
2340 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2341 int len=
static_cast<int>(endLine-startLine);
2345 if (s.
find(
"<!-- Automatically insert here the configuration settings -->")!=-1)
2351 t.
write(startLine,len);
2359 fileName=outputDirectory+
"/Doxyfile.xml";
2363 err(
"Cannot open file {} for writing\n",fileName);
2373 fileName=outputDirectory+
"/index.xml";
2377 err(
"Cannot open file {} for writing!\n",fileName);
2385 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2386 t <<
"<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2387 t <<
"xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2388 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
2398 msg(
"Generating XML output for concept {}\n",cd->displayName());
2403 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2408 for (
const auto &fd : *fn)
2410 msg(
"Generating XML output for file {}\n",fd->name());
2416 msg(
"Generating XML output for group {}\n",gd->name());
2421 msg(
"Generating XML output for page {}\n",pd->name());
2426 if (req->getTagFile().isEmpty())
2428 msg(
"Generating XML output for requirement {}\n", req->id());
2434 msg(
"Generate XML output for dir {}\n",dd->name());
2439 msg(
"Generating XML output for module {}\n",mod->name());
2444 msg(
"Generating XML output for example {}\n",pd->name());
2449 msg(
"Generating XML output for the main page\n");
2454 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 bool isImplicitTemplateInstance() const =0
virtual const MemberGroupList & getMemberGroups() const =0
Returns the member groups defined for this class.
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 Parts conceptParts() 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 const RequirementRefs & requirementReferences() 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
constexpr bool isXmlEnabled() const noexcept
constexpr int xmlLevel() const noexcept
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 bool isThreadLocal() 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 const char * toXML() const noexcept
constexpr bool isDeclaration() const noexcept
constexpr bool isDetailed() const noexcept
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 QCString title() 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
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
QCString & remove(size_t index, size_t len)
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
const std::string & str() const
size_t size() const
Returns the length of the string, not counting the 0-terminator.
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)
virtual QCString title() const =0
virtual QCString id() const =0
virtual QCString doc() const =0
virtual int line() const =0
virtual QCString file() const =0
static RequirementManager & instance()
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
DirIterator end(const DirIterator &) noexcept
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, const DocOptions &options)
IDocParserPtr createDocParser()
factory function to create a parser
constexpr uint32_t IncludeKind_LocalMask
Translator * theTranslator
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)
void splitRequirementRefs(const RequirementRefs &inputReqRefs, RequirementRefs &satisfiesRefs, RequirementRefs &verifiesRefs)
std::vector< RequirementRef > RequirementRefs
List of requirement references.
This class contains the information about the argument of a function or template.
bool hasDocumentation() const
Options to configure the code parser.
Class representing the data associated with a #include statement.
static constexpr const char * to_string_lower(Protection prot) noexcept
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 convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
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)
QCString xmlRequirementId(const QCString &reqId)
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 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 stripKeyword(QCString &str, const char *keyword, bool needSpace)
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 generateXMLForRequirement(const RequirementIntf *req, 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)
static void writeRequirementRefs(const Definition *d, TextStream &t, const char *prefix="")
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()