summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-09-06 21:04:07 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-09-06 21:04:07 (GMT)
commitbc6161ea636d54342e82f1f96b8d534dbd99c78b (patch)
tree24f950391924810998cc59aeb041099c7871e49c /src/xmlgen.cpp
parent4b77f4fc83a7954a741c1b35ec50e918a2786559 (diff)
downloadDoxygen-bc6161ea636d54342e82f1f96b8d534dbd99c78b.zip
Doxygen-bc6161ea636d54342e82f1f96b8d534dbd99c78b.tar.gz
Doxygen-bc6161ea636d54342e82f1f96b8d534dbd99c78b.tar.bz2
Release-1.3.8-20040906
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp65
1 files changed, 64 insertions, 1 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 7b51deb..18e3206 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1467,6 +1467,61 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
ti << " </compound>" << endl;
}
+static void generateXMLForDir(DirDef *dd,QTextStream &ti)
+{
+ if (dd->isReference()) return; // skip external references
+ ti << " <compound refid=\"" << dd->getOutputFileBase()
+ << "\" kind=\"dir\"><name>" << convertToXML(dd->displayName())
+ << "</name>" << endl;
+
+ QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+
+ QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
+ writeXMLHeader(t);
+ t << " <compounddef id=\""
+ << dd->getOutputFileBase() << "\" kind=\"dir\">" << endl;
+ t << " <compoundname>" << convertToXML(dd->displayName()) << "</compoundname>" << endl;
+
+ QListIterator<DirDef> subdirs(dd->subDirs());
+ DirDef *subdir;
+ for (subdirs.toFirst();(subdir=subdirs.current());++subdirs)
+ {
+ t << " <innerdir refid=\"" << subdir->getOutputFileBase()
+ << "\">" << convertToXML(subdir->displayName()) << "</innerdir>" << endl;
+ }
+
+ FileList *fl = dd->getFiles();
+ if (fl)
+ {
+ QListIterator<FileDef> fli(*fl);
+ FileDef *fd = fl->first();
+ for (fli.toFirst();(fd=fli.current());++fli)
+ {
+ t << " <innerfile refid=\"" << fd->getOutputFileBase()
+ << "\">" << convertToXML(fd->name()) << "</innerfile>" << endl;
+ }
+ }
+ t << " <briefdescription>" << endl;
+ writeXMLDocBlock(t,dd->briefFile(),dd->briefLine(),dd,0,dd->briefDescription());
+ t << " </briefdescription>" << endl;
+ t << " <detaileddescription>" << endl;
+ writeXMLDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
+ t << " </detaileddescription>" << endl;
+ t << " <location file=\"" << dd->name() << "\"/>" << endl;
+ t << " </compounddef>" << endl;
+ t << "</doxygen>" << endl;
+
+ ti << " </compound>" << endl;
+}
+
static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample)
{
// + name
@@ -1534,7 +1589,6 @@ void generateXML()
// + classes
// + namespaces
// + files
- // - packages
// + groups
// + related pages
// - examples
@@ -1669,6 +1723,15 @@ void generateXML()
}
}
{
+ DirDef *dir;
+ DirSDict::Iterator sdi(Doxygen::directories);
+ for (sdi.toFirst();(dir=sdi.current());++sdi)
+ {
+ msg("Generate XML output for dir %s\n",dir->name().data());
+ generateXMLForDir(dir,t);
+ }
+ }
+ {
PageSDict::Iterator pdi(*Doxygen::exampleSDict);
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)