56#define XML_DB(x) do {} while(0)
79 const char *s = str.
data();
93 int spacesToNextTabStop = tabSize - (col%tabSize);
94 while (spacesToNextTabStop--)
96 if (col>=stripIndentAmount) t <<
"<sp/>";
102 if (col>=stripIndentAmount) t <<
"<sp/>";
105 case '<': t <<
"<"; col++;
break;
106 case '>': t <<
">"; col++;
break;
107 case '&': t <<
"&"; col++;
break;
108 case '\'': t <<
"'"; col++;
break;
109 case '"': t <<
"""; col++;
break;
110 case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
111 case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
112 case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
113 case 27:
case 28:
case 29:
case 30:
case 31:
115 t <<
"<sp value=\"" << int(c) <<
"\"/>";
126 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
127 t <<
"<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
128 t <<
"xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
129 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
137 QCString fileName=outputDirectory+
"/combine.xslt";
141 err(
"Cannot open file {} for writing!\n",fileName);
146 "<!-- XSLT script to combine the generated output into a single file. \n"
147 " If you have xsltproc you could use:\n"
148 " xsltproc combine.xslt index.xml >all.xml\n"
150 "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
151 " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n"
152 " <xsl:template match=\"/\">\n"
153 " <doxygen version=\"{doxygenindex/@version}\" xml:lang=\"{doxygenindex/@xml:lang}\">\n"
154 " <!-- Load all doxygen generated xml files -->\n"
155 " <xsl:for-each select=\"doxygenindex/compound\">\n"
156 " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
160 "</xsl:stylesheet>\n";
167 t <<
"<ref refid=\"" << compoundId;
168 if (!anchorId.
isEmpty()) t <<
"_1" << anchorId;
169 t <<
"\" kindref=\"";
170 if (!anchorId.
isEmpty()) t <<
"member";
else t <<
"compound";
172 if (!extRef.
isEmpty()) t <<
" external=\"" << extRef <<
"\"";
190 const QCString &anchor,std::string_view text
211 *
m_t <<
"<highlight class=\"normal\">";
243 XML_DB((
"(writeCodeLink)\n"));
246 *
m_t <<
"<highlight class=\"normal\">";
258 XML_DB((
"(writeToolTip)\n"));
265 XML_DB((
"(startCodeLine)\n"));
275 *
m_t <<
" refkind=\"member\"";
279 *
m_t <<
" refkind=\"compound\"";
295 XML_DB((
"(endCodeLine)\n"));
298 *
m_t <<
"</highlight>";
303 *
m_t <<
"</codeline>\n";
314 XML_DB((
"(startFontClass)\n"));
317 *
m_t <<
"</highlight>";
320 *
m_t <<
"<highlight class=\"" << colorClass <<
"\">";
327 XML_DB((
"(endFontClass)\n"));
328 *
m_t <<
"</highlight>";
335 XML_DB((
"(writeCodeAnchor)\n"));
339 const QCString &anchorId,
int l,
bool)
342 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,
514 t <<
" <" << tagName <<
" refid=\"";
525 t <<
">" <<
convertToXML(name) <<
"</" << tagName <<
">\n";
533 auto isDigit = [](
char c) {
return c>=
'0' && c<=
'9'; };
534 int len =
static_cast<int>(s.
length());
540 if (i<len-1 && s[i]==
'@' && isDigit(s[i+1]))
542 if (j>=2 && i>=2 && s[i-2]==
':' && s[i-1]==
':') j-=2;
544 while (i<len && isDigit(s[i])) i++;
567 else if (typeStr==
"virtual") typeStr=
"";
599 int len =
static_cast<int>(strlen(keyword));
600 int searchEnd =
static_cast<int>(str.
size());
601 while (searchStart<searchEnd)
603 int index = str.
find(keyword, searchStart);
608 int end = index + len;
611 if ((index>0 && str[index-1]!=
' ') ||
612 (
end!=searchEnd && str[
end] !=
' ')
619 if (needSpace && index>0)
621 str.
remove(index-1, len+1);
622 searchEnd -= (len+1);
624 else if (needSpace &&
end<searchEnd)
627 searchEnd -= (len+1);
643 int i = argsStr.
find(
"noexcept(");
646 int bracketCount = 1;
649 bool insideString =
false;
650 bool insideChar =
false;
652 while (!found && p<argsStr.
length())
654 char c = argsStr[p++];
657 if (c==
'"' && pc!=
'\\') insideString=
false;
661 if (c==
'\'' && pc!=
'\\') insideChar=
false;
667 case '(': bracketCount++;
break;
668 case ')': bracketCount--; found = bracketCount==0;
break;
669 case '"': insideString =
true;
break;
670 case '\'': insideChar =
true;
break;
675 expr = argsStr.
mid(i+9,p-i-10);
747 argsStr +=
" override";
759 argsStr +=
"=default";
763 argsStr +=
"=delete";
765 i=defStr.
find(
"auto ");
768 defStr=defStr.
left(i)+typeStr+defStr.
mid(i+4);
776 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
781 t <<
" <member refid=\""
783 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
789 t <<
" <memberdef kind=\"";
790 t << memType <<
"\" id=\"";
801 if (md->
isStatic()) t <<
"yes";
else t <<
"no";
806 t <<
" nodiscard=\"yes\"";
811 t <<
" constexpr=\"yes\"";
816 t <<
" consteval=\"yes\"";
821 t <<
" constinit=\"yes\"";
826 t <<
" extern=\"yes\"";
837 if (md->
isExplicit()) t <<
"yes";
else t <<
"no";
841 if (md->
isInline()) t <<
"yes";
else t <<
"no";
853 t <<
" final=\"yes\"";
858 t <<
" sealed=\"yes\"";
868 t <<
" optional=\"yes\"";
873 t <<
" required=\"yes\"";
878 t <<
" noexcept=\"yes\"";
883 t <<
" noexceptexpression=\"" <<
convertToXML(noExceptExpr) <<
"\"";
888 t <<
" volatile=\"yes\"";
898 if (md->
isStrong()) t <<
"yes";
else t <<
"no";
909 if (md->
isMutable()) t <<
"yes";
else t <<
"no";
914 t <<
" thread_local=\"yes\"";
919 t <<
" initonly=\"yes\"";
923 t <<
" attribute=\"yes\"";
927 t <<
" property=\"yes\"";
931 t <<
" readonly=\"yes\"";
935 t <<
" bound=\"yes\"";
939 t <<
" removable=\"yes\"";
943 t <<
" constrained=\"yes\"";
947 t <<
" transient=\"yes\"";
951 t <<
" maybevoid=\"yes\"";
955 t <<
" maybedefault=\"yes\"";
959 t <<
" maybeambiguous=\"yes\"";
965 if (md->
isReadable()) t <<
"yes";
else t <<
"no";
969 if (md->
isWritable()) t <<
"yes";
else t <<
"no";
973 if (md->
isGettable()) t <<
"yes";
else t <<
"no";
976 t <<
" privategettable=\"";
980 t <<
" protectedgettable=\"";
985 if (md->
isSettable()) t <<
"yes";
else t <<
"no";
988 t <<
" privatesettable=\"";
992 t <<
" protectedsettable=\"";
1000 else if (md->
isCopy()) t <<
"copy";
1001 else if (md->
isRetain()) t <<
"retain";
1002 else if (md->
isStrong()) t <<
"strong";
1003 else if (md->
isWeak()) t <<
"weak";
1010 if (md->
isAddable()) t <<
"yes";
else t <<
"no";
1014 if (md->
isRemovable()) t <<
"yes";
else t <<
"no";
1018 if (md->
isRaisable()) t <<
"yes";
else t <<
"no";
1037 t <<
" <definition>" <<
convertToXML(defStr) <<
"</definition>\n";
1038 t <<
" <argsstring>" <<
convertToXML(argsStr) <<
"</argsstring>\n";
1050 t <<
" <name>" <<
convertToXML(nameStr) <<
"</name>\n";
1051 if (nameStr!=qualifiedNameStr)
1053 t <<
" <qualifiedname>" <<
convertToXML(qualifiedNameStr) <<
"</qualifiedname>\n";
1067 if (bitfield.
at(0)==
':') bitfield=bitfield.
mid(1);
1068 t <<
" <bitfield>" <<
convertToXML(bitfield) <<
"</bitfield>\n";
1074 t <<
" <reimplements refid=\""
1080 t <<
" <reimplementedby refid=\""
1082 <<
convertToXML(rbmd->name()) <<
"</reimplementedby>\n";
1087 t <<
" <qualifier>" <<
convertToXML(qmd) <<
"</qualifier>\n";
1102 bool isFortran = md->
getLanguage()==SrcLangExt::Fortran;
1105 auto defIt = defAl.
begin();
1110 if (defIt!=defAl.
end())
1116 if (!a.attrib.isEmpty())
1118 t <<
" <attributes>";
1120 t <<
"</attributes>\n";
1122 if (isFortran && defArg && !defArg->
type.
isEmpty())
1128 else if (!a.type.isEmpty())
1134 if (!a.name.isEmpty())
1138 t <<
"</declname>\n";
1144 t <<
"</defname>\n";
1146 if (!a.array.isEmpty())
1152 if (!a.defval.isEmpty())
1160 t <<
" <briefdescription>";
1163 t <<
"</briefdescription>\n";
1175 t <<
" <param></param>\n";
1181 t <<
" <param><defname>" << a.type <<
"</defname></param>\n";
1187 t <<
" <requiresclause>";
1189 t <<
" </requiresclause>\n";
1194 t <<
" <initializer>";
1196 t <<
"</initializer>\n";
1201 t <<
" <exceptions>";
1203 t <<
"</exceptions>\n";
1211 <<
"_1" << emd->anchor() <<
"\" kind=\"enumvalue\"><name>"
1215 << emd->anchor() <<
"\" prot=\"" <<
to_string_lower(emd->protection());
1220 if (!emd->initializer().isEmpty())
1222 t <<
" <initializer>";
1224 t <<
"</initializer>\n";
1226 t <<
" <briefdescription>\n";
1227 writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1228 t <<
" </briefdescription>\n";
1229 t <<
" <detaileddescription>\n";
1230 writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
1231 t <<
" </detaileddescription>\n";
1232 t <<
" </enumvalue>\n";
1235 t <<
" <briefdescription>\n";
1237 t <<
" </briefdescription>\n";
1238 t <<
" <detaileddescription>\n";
1240 t <<
" </detaileddescription>\n";
1241 t <<
" <inbodydescription>\n";
1243 t <<
" </inbodydescription>\n";
1246 t <<
" <location file=\""
1271 for (
const auto &refmd : refList)
1276 for (
const auto &refmd : refByList)
1281 t <<
" </memberdef>\n";
1297 if (ml==
nullptr)
return;
1299 for (
const auto &md : *ml)
1307 if (count==0)
return;
1309 t <<
" <sectiondef kind=\"" << kind <<
"\">\n";
1310 if (!header.isEmpty())
1312 t <<
" <header>" <<
convertToXML(header) <<
"</header>\n";
1314 if (!documentation.isEmpty())
1316 t <<
" <description>";
1318 t <<
"</description>\n";
1320 for (
const auto &md : *ml)
1327 t <<
" </sectiondef>\n";
1332 t <<
" <listofallmembers>\n";
1335 for (
auto &mi : *mni)
1345 if (!mi->ambiguityResolutionScope().isEmpty())
1347 t <<
" ambiguityscope=\"" <<
convertToXML(mi->ambiguityResolutionScope()) <<
"\"";
1354 t <<
" </listofallmembers>\n";
1359 for (
const auto &cd : cl)
1361 if (!cd->isHidden() && !cd->isAnonymous())
1365 t <<
"\">" <<
convertToXML(cd->name()) <<
"</innerclass>\n";
1372 for (
const auto &cd : cl)
1376 t <<
" <innerconcept refid=\"" << cd->getOutputFileBase()
1377 <<
"\">" <<
convertToXML(cd->name()) <<
"</innerconcept>\n";
1384 for (
const auto &mod : ml)
1386 if (mod->isHidden())
1388 t <<
" <innermodule refid=\"" << mod->getOutputFileBase()
1389 <<
"\">" <<
convertToXML(mod->name()) <<
"</innermodule>\n";
1396 for (
const auto &nd : nl)
1398 if (!nd->isHidden() && !nd->isAnonymous())
1400 t <<
" <innernamespace refid=\"" << nd->getOutputFileBase()
1401 <<
"\"" << (nd->isInline() ?
" inline=\"yes\"" :
"")
1402 <<
">" <<
convertToXML(nd->name()) <<
"</innernamespace>\n";
1409 if (exportMap.empty())
return;
1410 t <<
" <exports>\n";
1411 for (
const auto &[moduleName,importInfoList] : exportMap)
1413 for (
const auto &importInfo : importInfoList)
1422 t << importInfo.importName;
1426 t <<
" </exports>\n";
1431 for (
const auto &fd : fl)
1433 t <<
" <innerfile refid=\"" << fd->getOutputFileBase()
1434 <<
"\">" <<
convertToXML(fd->name()) <<
"</innerfile>\n";
1440 for (
const auto &pd : pl)
1442 t <<
" <innerpage refid=\"" << pd->getOutputFileBase();
1443 if (pd->getGroupDef())
1445 t <<
"_" << pd->name();
1447 t <<
"\">" <<
convertToXML(pd->title()) <<
"</innerpage>\n";
1453 for (
const auto &sgd : gl)
1455 t <<
" <innergroup refid=\"" << sgd->getOutputFileBase()
1457 <<
"</innergroup>\n";
1465 for(
const auto subdir : *dl)
1467 t <<
" <innerdir refid=\"" << subdir->getOutputFileBase()
1468 <<
"\">" <<
convertToXML(subdir->displayName()) <<
"</innerdir>\n";
1488 t <<
"</includes>\n";
1517 msg(
"Generating XML output for class {}\n",cd->
name());
1528 err(
"Cannot open file {} for writing!\n",fileName);
1534 t <<
" <compounddef id=\""
1539 if (cd->
isFinal()) t <<
"\" final=\"yes";
1540 if (cd->
isSealed()) t <<
"\" sealed=\"yes";
1541 if (cd->
isAbstract()) t <<
"\" abstract=\"yes";
1543 t <<
" <compoundname>";
1547 t <<
"</compoundname>\n";
1550 t <<
" <basecompoundref ";
1551 if (bcd.classDef->isLinkable())
1555 if (bcd.prot == Protection::Package)
ASSERT(0);
1561 if (!bcd.templSpecifiers.isEmpty())
1565 bcd.classDef->name(),bcd.templSpecifiers)
1572 t <<
"</basecompoundref>\n";
1576 if (bcd.prot == Protection::Package)
ASSERT(0);
1577 t <<
" <derivedcompoundref refid=\""
1583 t <<
"\">" <<
convertToXML(bcd.classDef->displayName())
1584 <<
"</derivedcompoundref>\n";
1595 mg->documentation());
1608 t <<
" <requiresclause>";
1610 t <<
" </requiresclause>\n";
1615 t <<
" <qualifier>" <<
convertToXML(qcd) <<
"</qualifier>\n";
1618 t <<
" <briefdescription>\n";
1620 t <<
" </briefdescription>\n";
1621 t <<
" <detaileddescription>\n";
1623 t <<
" </detaileddescription>\n";
1627 t <<
" <inheritancegraph>\n";
1629 t <<
" </inheritancegraph>\n";
1634 t <<
" <collaborationgraph>\n";
1636 t <<
" </collaborationgraph>\n";
1638 t <<
" <location file=\""
1654 t <<
" </compounddef>\n";
1655 t <<
"</doxygen>\n";
1657 ti <<
" </compound>\n";
1665 <<
"\" kind=\"concept\"" <<
"><name>"
1673 err(
"Cannot open file {} for writing!\n",fileName);
1679 <<
"\" kind=\"concept\">\n";
1680 t <<
" <compoundname>";
1684 t <<
"</compoundname>\n";
1687 t <<
" <initializer>";
1689 t <<
" </initializer>\n";
1690 t <<
" <briefdescription>\n";
1692 t <<
" </briefdescription>\n";
1693 t <<
" <detaileddescription>\n";
1695 t <<
" </detaileddescription>\n";
1696 t <<
" <location file=\""
1700 t <<
" </compounddef>\n";
1701 t <<
"</doxygen>\n";
1703 ti <<
" </compound>\n";
1710 <<
"\" kind=\"module\"" <<
"><name>"
1718 err(
"Cannot open file {} for writing!\n",fileName);
1724 <<
"\" kind=\"module\">\n";
1725 t <<
" <compoundname>";
1727 t <<
"</compoundname>\n";
1741 mg->documentation());
1743 t <<
" <briefdescription>\n";
1745 t <<
" </briefdescription>\n";
1746 t <<
" <detaileddescription>\n";
1748 t <<
" </detaileddescription>\n";
1750 t <<
" <location file=\""
1754 t <<
" </compounddef>\n";
1755 t <<
"</doxygen>\n";
1757 ti <<
" </compound>\n";
1775 <<
"\" kind=\"namespace\"" <<
"><name>"
1783 err(
"Cannot open file {} for writing!\n",fileName);
1790 <<
"\" kind=\"namespace\" "
1791 << (nd->
isInline()?
"inline=\"yes\" ":
"")
1794 t <<
" <compoundname>";
1798 t <<
"</compoundname>\n";
1807 mg->documentation());
1818 t <<
" <briefdescription>\n";
1820 t <<
" </briefdescription>\n";
1821 t <<
" <detaileddescription>\n";
1823 t <<
" </detaileddescription>\n";
1824 t <<
" <location file=\""
1828 t <<
" </compounddef>\n";
1829 t <<
"</doxygen>\n";
1831 ti <<
" </compound>\n";
1861 err(
"Cannot open file {} for writing!\n",fileName);
1868 <<
"\" kind=\"file\" language=\""
1870 t <<
" <compoundname>";
1872 t <<
"</compoundname>\n";
1877 if (inc.fileDef && !inc.fileDef->isReference())
1879 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1883 t <<
"</includes>\n";
1888 t <<
" <includedby";
1889 if (inc.fileDef && !inc.fileDef->isReference())
1891 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1895 t <<
"</includedby>\n";
1901 t <<
" <incdepgraph>\n";
1903 t <<
" </incdepgraph>\n";
1909 t <<
" <invincdepgraph>\n";
1911 t <<
" </invincdepgraph>\n";
1921 mg->documentation());
1932 t <<
" <briefdescription>\n";
1934 t <<
" </briefdescription>\n";
1935 t <<
" <detaileddescription>\n";
1937 t <<
" </detaileddescription>\n";
1943 t <<
" </compounddef>\n";
1944 t <<
"</doxygen>\n";
1946 ti <<
" </compound>\n";
1973 err(
"Cannot open file {} for writing!\n",fileName);
1979 t <<
" <compounddef id=\""
1995 mg->documentation());
2006 t <<
" <briefdescription>\n";
2008 t <<
" </briefdescription>\n";
2009 t <<
" <detaileddescription>\n";
2011 t <<
" </detaileddescription>\n";
2012 t <<
" </compounddef>\n";
2013 t <<
"</doxygen>\n";
2015 ti <<
" </compound>\n";
2030 err(
"Cannot open file {} for writing!\n",fileName);
2036 t <<
" <compounddef id=\""
2043 t <<
" <briefdescription>\n";
2045 t <<
" </briefdescription>\n";
2046 t <<
" <detaileddescription>\n";
2048 t <<
" </detaileddescription>\n";
2050 t <<
" </compounddef>\n";
2051 t <<
"</doxygen>\n";
2053 ti <<
" </compound>\n";
2063 const char *kindName = isExample ?
"example" :
"page";
2072 if (pageName==
"index") pageName=
"indexpage";
2074 ti <<
" <compound refid=\"" << pageName
2079 QCString fileName=outputDirectory+
"/"+pageName+
".xml";
2083 err(
"Cannot open file {} for writing!\n",fileName);
2089 t <<
" <compounddef id=\"" << pageName;
2090 t <<
"\" kind=\"" << kindName <<
"\">\n";
2092 <<
"</compoundname>\n";
2123 auto writeIndent = [&]() {
for (
int i=0;i<4+indent*2;i++) t <<
" "; };
2124 auto incIndent = [&](
const char *text) {
writeIndent(); t << text <<
"\n"; indent++; };
2125 auto decIndent = [&](
const char *text) { indent--;
writeIndent(); t << text <<
"\n"; };
2126 incIndent(
"<tableofcontents>");
2131 if (si->type().isSection())
2134 int nextLevel = si->type().level();
2135 if (nextLevel>level)
2137 for (
int l=level;l<nextLevel;l++)
2139 if (l < maxLevel) incIndent(
"<tableofcontents>");
2142 else if (nextLevel<level)
2144 for (
int l=level;l>nextLevel;l--)
2146 if (l <= maxLevel && inLi[l]) decIndent(
"</tocsect>");
2148 if (l <= maxLevel) decIndent(
"</tableofcontents>");
2151 if (nextLevel <= maxLevel)
2153 if (inLi[nextLevel])
2155 decIndent(
"</tocsect>");
2157 else if (level>nextLevel)
2159 decIndent(
"</tableofcontents>");
2160 incIndent(
"<tableofcontents>");
2164 if (titleDoc.
isEmpty()) titleDoc = label;
2165 incIndent(
"<tocsect>");
2166 writeIndent(); t <<
"<name>" << titleDoc <<
"</name>\n";
2168 if (!si->title().isEmpty())
2174 inLi[nextLevel]=
true;
2179 while (level>1 && level <= maxLevel)
2181 if (inLi[level]) decIndent(
"</tocsect>");
2183 decIndent(
"</tableofcontents>");
2186 if (level <= maxLevel && inLi[level]) decIndent(
"</tocsect>");
2188 decIndent(
"</tableofcontents>");
2190 t <<
" <briefdescription>\n";
2192 t <<
" </briefdescription>\n";
2193 t <<
" <detaileddescription>\n";
2204 t <<
" </detaileddescription>\n";
2208 t <<
" </compounddef>\n";
2209 t <<
"</doxygen>\n";
2211 ti <<
" </compound>\n";
2225 Dir xmlDir(outputDirectory.
str());
2231 QCString fileName=outputDirectory+
"/compound.xsd";
2235 err(
"Cannot open file {} for writing!\n",fileName);
2243 const char *startLine = compound_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 HTML entities -->")!=-1)
2259 t.
write(startLine,len);
2267 fileName=outputDirectory+
"/doxyfile.xsd";
2271 err(
"Cannot open file {} for writing!\n",fileName);
2279 const char *startLine = doxyfile_xsd.
data();
2283 const char *endLine = startLine+1;
2284 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2285 int len=
static_cast<int>(endLine-startLine);
2289 if (s.
find(
"<!-- Automatically insert here the configuration settings -->")!=-1)
2295 t.
write(startLine,len);
2303 fileName=outputDirectory+
"/Doxyfile.xml";
2307 err(
"Cannot open file {} for writing\n",fileName);
2317 fileName=outputDirectory+
"/index.xml";
2321 err(
"Cannot open file {} for writing!\n",fileName);
2329 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2330 t <<
"<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2331 t <<
"xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2332 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
2342 msg(
"Generating XML output for concept {}\n",cd->displayName());
2347 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2352 for (
const auto &fd : *fn)
2354 msg(
"Generating XML output for file {}\n",fd->name());
2360 msg(
"Generating XML output for group {}\n",gd->name());
2365 msg(
"Generating XML output for page {}\n",pd->name());
2370 msg(
"Generate XML output for dir {}\n",dd->name());
2375 msg(
"Generating XML output for module {}\n",mod->name());
2380 msg(
"Generating XML output for example {}\n",pd->name());
2385 msg(
"Generating XML output for the main page\n");
2390 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 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
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 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 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 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)
void resize(size_t newlen)
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)
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)
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.
static const char * to_string_lower(Protection prot)
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 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 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()