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";
461 auto astImpl =
dynamic_cast<const DocNodeAST*
>(ast.get());
470 std::visit(visitor,astImpl->root);
479 intf->resetCodeParserState();
483 intf->parseCode(xmlList,
509 t <<
" <" << tagName <<
" refid=\"";
520 t <<
">" <<
convertToXML(name) <<
"</" << tagName <<
">\n";
528 auto isDigit = [](
char c) {
return c>=
'0' && c<=
'9'; };
529 int len =
static_cast<int>(s.
length());
535 if (i<len-1 && s[i]==
'@' && isDigit(s[i+1]))
537 if (j>=2 && i>=2 && s[i-2]==
':' && s[i-1]==
':') j-=2;
539 while (i<len && isDigit(s[i])) i++;
562 else if (typeStr==
"virtual") typeStr=
"";
590 int i = argsStr.
find(
"noexcept(");
593 int bracketCount = 1;
596 bool insideString =
false;
597 bool insideChar =
false;
601 char c = argsStr[p++];
604 if (c==
'"' && pc!=
'\\') insideString=
false;
608 if (c==
'\'' && pc!=
'\\') insideChar=
false;
614 case '(': bracketCount++;
break;
615 case ')': bracketCount--;
found = bracketCount==0;
break;
616 case '"': insideString =
true;
break;
617 case '\'': insideChar =
true;
break;
622 expr = argsStr.
mid(i+9,p-i-10);
692 i=defStr.
find(
"auto ");
695 defStr=defStr.
left(i)+typeStr+defStr.
mid(i+4);
703 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
708 t <<
" <member refid=\""
710 <<
"_1" << md->
anchor() <<
"\" kind=\"" << memType <<
"\"><name>"
716 t <<
" <memberdef kind=\"";
717 t << memType <<
"\" id=\"";
735 if (md->
isStatic()) t <<
"yes";
else t <<
"no";
740 t <<
" nodiscard=\"yes\"";
745 t <<
" constexpr=\"yes\"";
750 t <<
" consteval=\"yes\"";
755 t <<
" constinit=\"yes\"";
760 t <<
" extern=\"yes\"";
771 if (md->
isExplicit()) t <<
"yes";
else t <<
"no";
775 if (md->
isInline()) t <<
"yes";
else t <<
"no";
787 t <<
" final=\"yes\"";
792 t <<
" sealed=\"yes\"";
802 t <<
" optional=\"yes\"";
807 t <<
" required=\"yes\"";
812 t <<
" noexcept=\"yes\"";
817 t <<
" noexceptexpression=\"" <<
convertToXML(noExceptExpr) <<
"\"";
822 t <<
" volatile=\"yes\"";
839 if (md->
isStrong()) t <<
"yes";
else t <<
"no";
850 if (md->
isMutable()) t <<
"yes";
else t <<
"no";
855 t <<
" initonly=\"yes\"";
859 t <<
" attribute=\"yes\"";
863 t <<
" property=\"yes\"";
867 t <<
" readonly=\"yes\"";
871 t <<
" bound=\"yes\"";
875 t <<
" removable=\"yes\"";
879 t <<
" constrained=\"yes\"";
883 t <<
" transient=\"yes\"";
887 t <<
" maybevoid=\"yes\"";
891 t <<
" maybedefault=\"yes\"";
895 t <<
" maybeambiguous=\"yes\"";
901 if (md->
isReadable()) t <<
"yes";
else t <<
"no";
905 if (md->
isWritable()) t <<
"yes";
else t <<
"no";
909 if (md->
isGettable()) t <<
"yes";
else t <<
"no";
912 t <<
" privategettable=\"";
916 t <<
" protectedgettable=\"";
921 if (md->
isSettable()) t <<
"yes";
else t <<
"no";
924 t <<
" privatesettable=\"";
928 t <<
" protectedsettable=\"";
936 else if (md->
isCopy()) t <<
"copy";
937 else if (md->
isRetain()) t <<
"retain";
938 else if (md->
isStrong()) t <<
"strong";
939 else if (md->
isWeak()) t <<
"weak";
946 if (md->
isAddable()) t <<
"yes";
else t <<
"no";
954 if (md->
isRaisable()) t <<
"yes";
else t <<
"no";
973 t <<
" <definition>" <<
convertToXML(defStr) <<
"</definition>\n";
974 t <<
" <argsstring>" <<
convertToXML(argsStr) <<
"</argsstring>\n";
987 if (nameStr!=qualifiedNameStr)
989 t <<
" <qualifiedname>" <<
convertToXML(qualifiedNameStr) <<
"</qualifiedname>\n";
1003 if (bitfield.
at(0)==
':') bitfield=bitfield.
mid(1);
1004 t <<
" <bitfield>" <<
convertToXML(bitfield) <<
"</bitfield>\n";
1010 t <<
" <reimplements refid=\""
1016 t <<
" <reimplementedby refid=\""
1018 <<
convertToXML(rbmd->name()) <<
"</reimplementedby>\n";
1023 t <<
" <qualifier>" <<
convertToXML(qmd.c_str()) <<
"</qualifier>\n";
1041 auto defIt = defAl.
begin();
1046 if (defIt!=defAl.
end())
1052 if (!a.attrib.isEmpty())
1054 t <<
" <attributes>";
1056 t <<
"</attributes>\n";
1058 if (isFortran && defArg && !defArg->
type.
isEmpty())
1064 else if (!a.type.isEmpty())
1070 if (!a.name.isEmpty())
1074 t <<
"</declname>\n";
1080 t <<
"</defname>\n";
1082 if (!a.array.isEmpty())
1088 if (!a.defval.isEmpty())
1096 t <<
" <briefdescription>";
1099 t <<
"</briefdescription>\n";
1111 t <<
" <param></param>\n";
1117 t <<
" <param><defname>" << a.type <<
"</defname></param>\n";
1123 t <<
" <requiresclause>";
1125 t <<
" </requiresclause>\n";
1130 t <<
" <initializer>";
1132 t <<
"</initializer>\n";
1137 t <<
" <exceptions>";
1139 t <<
"</exceptions>\n";
1147 <<
"_1" << emd->anchor() <<
"\" kind=\"enumvalue\"><name>"
1151 << emd->anchor() <<
"\" prot=\"";
1152 switch (emd->protection())
1163 if (!emd->initializer().isEmpty())
1165 t <<
" <initializer>";
1167 t <<
"</initializer>\n";
1169 t <<
" <briefdescription>\n";
1170 writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1171 t <<
" </briefdescription>\n";
1172 t <<
" <detaileddescription>\n";
1173 writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
1174 t <<
" </detaileddescription>\n";
1175 t <<
" </enumvalue>\n";
1178 t <<
" <briefdescription>\n";
1180 t <<
" </briefdescription>\n";
1181 t <<
" <detaileddescription>\n";
1183 t <<
" </detaileddescription>\n";
1184 t <<
" <inbodydescription>\n";
1186 t <<
" </inbodydescription>\n";
1189 t <<
" <location file=\""
1214 for (
const auto &refmd : refList)
1219 for (
const auto &refmd : refByList)
1224 t <<
" </memberdef>\n";
1240 if (ml==
nullptr)
return;
1242 for (
const auto &md : *ml)
1250 if (count==0)
return;
1252 t <<
" <sectiondef kind=\"" << kind <<
"\">\n";
1253 if (!header.isEmpty())
1255 t <<
" <header>" <<
convertToXML(header) <<
"</header>\n";
1257 if (!documentation.isEmpty())
1259 t <<
" <description>";
1261 t <<
"</description>\n";
1263 for (
const auto &md : *ml)
1270 t <<
" </sectiondef>\n";
1275 t <<
" <listofallmembers>\n";
1278 for (
auto &mi : *mni)
1286 md->
anchor() <<
"\" prot=\"";
1302 if (!mi->ambiguityResolutionScope().isEmpty())
1304 t <<
" ambiguityscope=\"" <<
convertToXML(mi->ambiguityResolutionScope()) <<
"\"";
1311 t <<
" </listofallmembers>\n";
1316 for (
const auto &cd : cl)
1318 if (!cd->isHidden() && !cd->isAnonymous())
1322 switch(cd->protection())
1329 t <<
"\">" <<
convertToXML(cd->name()) <<
"</innerclass>\n";
1336 for (
const auto &cd : cl)
1340 t <<
" <innerconcept refid=\"" << cd->getOutputFileBase()
1341 <<
"\">" <<
convertToXML(cd->name()) <<
"</innerconcept>\n";
1348 for (
const auto &mod : ml)
1350 if (mod->isHidden())
1352 t <<
" <innermodule refid=\"" << mod->getOutputFileBase()
1353 <<
"\">" <<
convertToXML(mod->name()) <<
"</innermodule>\n";
1360 for (
const auto &nd : nl)
1362 if (!nd->isHidden() && !nd->isAnonymous())
1364 t <<
" <innernamespace refid=\"" << nd->getOutputFileBase()
1365 <<
"\"" << (nd->isInline() ?
" inline=\"yes\"" :
"")
1366 <<
">" <<
convertToXML(nd->name()) <<
"</innernamespace>\n";
1373 if (exportMap.empty())
return;
1374 t <<
" <exports>\n";
1375 for (
const auto &[moduleName,importInfoList] : exportMap)
1377 for (
const auto &importInfo : importInfoList)
1386 t << importInfo.importName;
1390 t <<
" </exports>\n";
1395 for (
const auto &fd : fl)
1397 t <<
" <innerfile refid=\"" << fd->getOutputFileBase()
1398 <<
"\">" <<
convertToXML(fd->name()) <<
"</innerfile>\n";
1404 for (
const auto &pd : pl)
1406 t <<
" <innerpage refid=\"" << pd->getOutputFileBase();
1407 if (pd->getGroupDef())
1409 t <<
"_" << pd->name();
1411 t <<
"\">" <<
convertToXML(pd->title()) <<
"</innerpage>\n";
1417 for (
const auto &sgd : gl)
1419 t <<
" <innergroup refid=\"" << sgd->getOutputFileBase()
1421 <<
"</innergroup>\n";
1429 for(
const auto subdir : *dl)
1431 t <<
" <innerdir refid=\"" << subdir->getOutputFileBase()
1432 <<
"\">" <<
convertToXML(subdir->displayName()) <<
"</innerdir>\n";
1452 t <<
"</includes>\n";
1481 msg(
"Generating XML output for class {}\n",cd->
name());
1492 err(
"Cannot open file {} for writing!\n",fileName);
1498 t <<
" <compounddef id=\""
1509 if (cd->
isFinal()) t <<
"\" final=\"yes";
1510 if (cd->
isSealed()) t <<
"\" sealed=\"yes";
1511 if (cd->
isAbstract()) t <<
"\" abstract=\"yes";
1513 t <<
" <compoundname>";
1517 t <<
"</compoundname>\n";
1520 t <<
" <basecompoundref ";
1521 if (bcd.classDef->isLinkable())
1541 if (!bcd.templSpecifiers.isEmpty())
1545 bcd.classDef->name(),bcd.templSpecifiers)
1552 t <<
"</basecompoundref>\n";
1556 t <<
" <derivedcompoundref refid=\""
1573 t <<
"\">" <<
convertToXML(bcd.classDef->displayName())
1574 <<
"</derivedcompoundref>\n";
1585 mg->documentation());
1598 t <<
" <requiresclause>";
1600 t <<
" </requiresclause>\n";
1605 t <<
" <qualifier>" <<
convertToXML(qcd.c_str()) <<
"</qualifier>\n";
1608 t <<
" <briefdescription>\n";
1610 t <<
" </briefdescription>\n";
1611 t <<
" <detaileddescription>\n";
1613 t <<
" </detaileddescription>\n";
1617 t <<
" <inheritancegraph>\n";
1619 t <<
" </inheritancegraph>\n";
1624 t <<
" <collaborationgraph>\n";
1626 t <<
" </collaborationgraph>\n";
1628 t <<
" <location file=\""
1644 t <<
" </compounddef>\n";
1645 t <<
"</doxygen>\n";
1647 ti <<
" </compound>\n";
1655 <<
"\" kind=\"concept\"" <<
"><name>"
1663 err(
"Cannot open file {} for writing!\n",fileName);
1669 <<
"\" kind=\"concept\">\n";
1670 t <<
" <compoundname>";
1674 t <<
"</compoundname>\n";
1677 t <<
" <initializer>";
1679 t <<
" </initializer>\n";
1680 t <<
" <briefdescription>\n";
1682 t <<
" </briefdescription>\n";
1683 t <<
" <detaileddescription>\n";
1685 t <<
" </detaileddescription>\n";
1686 t <<
" <location file=\""
1690 t <<
" </compounddef>\n";
1691 t <<
"</doxygen>\n";
1693 ti <<
" </compound>\n";
1700 <<
"\" kind=\"module\"" <<
"><name>"
1708 err(
"Cannot open file {} for writing!\n",fileName);
1714 <<
"\" kind=\"module\">\n";
1715 t <<
" <compoundname>";
1717 t <<
"</compoundname>\n";
1731 mg->documentation());
1733 t <<
" <briefdescription>\n";
1735 t <<
" </briefdescription>\n";
1736 t <<
" <detaileddescription>\n";
1738 t <<
" </detaileddescription>\n";
1740 t <<
" <location file=\""
1744 t <<
" </compounddef>\n";
1745 t <<
"</doxygen>\n";
1747 ti <<
" </compound>\n";
1765 <<
"\" kind=\"namespace\"" <<
"><name>"
1773 err(
"Cannot open file {} for writing!\n",fileName);
1780 <<
"\" kind=\"namespace\" "
1781 << (nd->
isInline()?
"inline=\"yes\" ":
"")
1784 t <<
" <compoundname>";
1788 t <<
"</compoundname>\n";
1797 mg->documentation());
1808 t <<
" <briefdescription>\n";
1810 t <<
" </briefdescription>\n";
1811 t <<
" <detaileddescription>\n";
1813 t <<
" </detaileddescription>\n";
1814 t <<
" <location file=\""
1818 t <<
" </compounddef>\n";
1819 t <<
"</doxygen>\n";
1821 ti <<
" </compound>\n";
1851 err(
"Cannot open file {} for writing!\n",fileName);
1858 <<
"\" kind=\"file\" language=\""
1860 t <<
" <compoundname>";
1862 t <<
"</compoundname>\n";
1867 if (inc.fileDef && !inc.fileDef->isReference())
1869 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1872 t << inc.includeName;
1873 t <<
"</includes>\n";
1878 t <<
" <includedby";
1879 if (inc.fileDef && !inc.fileDef->isReference())
1881 t <<
" refid=\"" << inc.fileDef->getOutputFileBase() <<
"\"";
1884 t << inc.includeName;
1885 t <<
"</includedby>\n";
1891 t <<
" <incdepgraph>\n";
1893 t <<
" </incdepgraph>\n";
1899 t <<
" <invincdepgraph>\n";
1901 t <<
" </invincdepgraph>\n";
1911 mg->documentation());
1922 t <<
" <briefdescription>\n";
1924 t <<
" </briefdescription>\n";
1925 t <<
" <detaileddescription>\n";
1927 t <<
" </detaileddescription>\n";
1933 t <<
" </compounddef>\n";
1934 t <<
"</doxygen>\n";
1936 ti <<
" </compound>\n";
1963 err(
"Cannot open file {} for writing!\n",fileName);
1969 t <<
" <compounddef id=\""
1985 mg->documentation());
1996 t <<
" <briefdescription>\n";
1998 t <<
" </briefdescription>\n";
1999 t <<
" <detaileddescription>\n";
2001 t <<
" </detaileddescription>\n";
2002 t <<
" </compounddef>\n";
2003 t <<
"</doxygen>\n";
2005 ti <<
" </compound>\n";
2020 err(
"Cannot open file {} for writing!\n",fileName);
2026 t <<
" <compounddef id=\""
2033 t <<
" <briefdescription>\n";
2035 t <<
" </briefdescription>\n";
2036 t <<
" <detaileddescription>\n";
2038 t <<
" </detaileddescription>\n";
2040 t <<
" </compounddef>\n";
2041 t <<
"</doxygen>\n";
2043 ti <<
" </compound>\n";
2053 const char *kindName = isExample ?
"example" :
"page";
2062 if (pageName==
"index") pageName=
"indexpage";
2064 ti <<
" <compound refid=\"" << pageName
2069 QCString fileName=outputDirectory+
"/"+pageName+
".xml";
2073 err(
"Cannot open file {} for writing!\n",fileName);
2079 t <<
" <compounddef id=\"" << pageName;
2080 t <<
"\" kind=\"" << kindName <<
"\">\n";
2082 <<
"</compoundname>\n";
2113 auto writeIndent = [&]() {
for (
int i=0;i<4+indent*2;i++) t <<
" "; };
2114 auto incIndent = [&](
const char *text) {
writeIndent(); t << text <<
"\n"; indent++; };
2115 auto decIndent = [&](
const char *text) { indent--;
writeIndent(); t << text <<
"\n"; };
2116 incIndent(
"<tableofcontents>");
2121 if (si->type().isSection())
2124 int nextLevel = si->type().level();
2125 if (nextLevel>level)
2127 for (
int l=level;l<nextLevel;l++)
2129 if (l < maxLevel) incIndent(
"<tableofcontents>");
2132 else if (nextLevel<level)
2134 for (
int l=level;l>nextLevel;l--)
2136 if (l <= maxLevel && inLi[l]) decIndent(
"</tocsect>");
2138 if (l <= maxLevel) decIndent(
"</tableofcontents>");
2141 if (nextLevel <= maxLevel)
2143 if (inLi[nextLevel])
2145 decIndent(
"</tocsect>");
2147 else if (level>nextLevel)
2149 decIndent(
"</tableofcontents>");
2150 incIndent(
"<tableofcontents>");
2154 if (titleDoc.
isEmpty()) titleDoc = label;
2155 incIndent(
"<tocsect>");
2156 writeIndent(); t <<
"<name>" << titleDoc <<
"</name>\n";
2158 inLi[nextLevel]=
true;
2163 while (level>1 && level <= maxLevel)
2165 if (inLi[level]) decIndent(
"</tocsect>");
2167 decIndent(
"</tableofcontents>");
2170 if (level <= maxLevel && inLi[level]) decIndent(
"</tocsect>");
2172 decIndent(
"</tableofcontents>");
2174 t <<
" <briefdescription>\n";
2176 t <<
" </briefdescription>\n";
2177 t <<
" <detaileddescription>\n";
2188 t <<
" </detaileddescription>\n";
2192 t <<
" </compounddef>\n";
2193 t <<
"</doxygen>\n";
2195 ti <<
" </compound>\n";
2209 Dir xmlDir(outputDirectory.
str());
2215 QCString fileName=outputDirectory+
"/compound.xsd";
2219 err(
"Cannot open file {} for writing!\n",fileName);
2227 const char *startLine = compound_xsd.
data();
2231 const char *endLine = startLine+1;
2232 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2233 int len=
static_cast<int>(endLine-startLine);
2237 if (s.
find(
"<!-- Automatically insert here the HTML entities -->")!=-1)
2243 t.
write(startLine,len);
2251 fileName=outputDirectory+
"/doxyfile.xsd";
2255 err(
"Cannot open file {} for writing!\n",fileName);
2263 const char *startLine = doxyfile_xsd.
data();
2267 const char *endLine = startLine+1;
2268 while (*endLine && *(endLine-1)!=
'\n') endLine++;
2269 int len=
static_cast<int>(endLine-startLine);
2273 if (s.
find(
"<!-- Automatically insert here the configuration settings -->")!=-1)
2279 t.
write(startLine,len);
2287 fileName=outputDirectory+
"/Doxyfile.xml";
2291 err(
"Cannot open file {} for writing\n",fileName);
2301 fileName=outputDirectory+
"/index.xml";
2305 err(
"Cannot open file {} for writing!\n",fileName);
2313 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2314 t <<
"<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2315 t <<
"xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2316 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
2326 msg(
"Generating XML output for concept {}\n",cd->displayName());
2331 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2336 for (
const auto &fd : *fn)
2338 msg(
"Generating XML output for file {}\n",fd->name());
2344 msg(
"Generating XML output for group {}\n",gd->name());
2349 msg(
"Generating XML output for page {}\n",pd->name());
2354 msg(
"Generate XML output for dir {}\n",dd->name());
2359 msg(
"Generating XML output for module {}\n",mod->name());
2364 msg(
"Generating XML output for example {}\n",pd->name());
2369 msg(
"Generating XML output for the main page\n");
2374 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 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
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()