浏览源代码.
◆ generateXML()
在文件 xmlgen.cpp 第 1888 行定义.
1899 Dir xmlDir(outputDirectory.
str());
1906 QCString fileName=outputDirectory+
"/compound.xsd";
1907 std::ofstream f(fileName.
str(),std::ofstream::out | std::ofstream::binary);
1910 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1918 const char *startLine = compound_xsd.
data();
1922 const char *endLine = startLine+1;
1923 while (*endLine && *(endLine-1)!=
'\n') endLine++;
1924 int len=
static_cast<int>(endLine-startLine);
1928 if (s.find(
"<!-- Automatically insert here the HTML entities -->")!=-1)
1934 t.write(startLine,len);
1942 fileName=outputDirectory+
"/Doxyfile.xml";
1943 f.open(fileName.
str(),std::ofstream::out | std::ofstream::binary);
1946 err(
"Cannot open file %s for writing\n",fileName.
data());
1956 fileName=outputDirectory+
"/index.xml";
1957 f.open(fileName.
str(),std::ofstream::out | std::ofstream::binary);
1960 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
1968 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
1969 t <<
"<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
1970 t <<
"xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
1971 t <<
"version=\"" << getDoxygenVersion() <<
"\" ";
1981 msg(
"Generating XML output for concept %s\n",
qPrint(cd->name()));
1986 msg(
"Generating XML output for namespace %s\n",
qPrint(nd->name()));
1991 for (
const auto &fd : *fn)
1993 msg(
"Generating XML output for file %s\n",
qPrint(fd->name()));
1999 msg(
"Generating XML output for group %s\n",
qPrint(gd->name()));
2004 msg(
"Generating XML output for page %s\n",
qPrint(pd->name()));
2009 msg(
"Generate XML output for dir %s\n",
qPrint(dd->name()));
2014 msg(
"Generating XML output for example %s\n",
qPrint(pd->name()));
2019 msg(
"Generating XML output for the main page\n");
2024 t <<
"</doxygenindex>\n";
引用了 Doxygen::classLinkedMap, clearSubDirs(), Doxygen::conceptLinkedMap, Config_getString, ResourceMgr::copyResource(), createSubDirs(), QCString::data(), Doxygen::dirLinkedMap, err(), Doxygen::exampleLinkedMap, FALSE, QCString::find(), generateXMLForClass(), generateXMLForConcept(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForNamespace(), generateXMLForPage(), ResourceMgr::getAsString(), Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, HtmlEntityMapper::instance(), ResourceMgr::instance(), Doxygen::mainPage, msg(), Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap, qPrint(), QCString::str(), theTranslator, Translator::trISOLang(), TRUE, TextStream::write(), writeCombineScript(), Config::writeXMLDoxyfile() , 以及 HtmlEntityMapper::writeXMLSchema().
被这些函数引用 generateOutput().
bool copyResource(const QCString &name, const QCString &targetDir) const
Copies a registered resource to a given target directory
static ResourceMgr & instance()
Returns the one and only instance of this class
void writeXMLSchema(TextStream &t)
static void generateXMLForGroup(const GroupDef *gd, TextStream &ti)
static void generateXMLForFile(FileDef *fd, TextStream &ti)
static std::unique_ptr< PageDef > mainPage
static void generateXMLForDir(DirDef *dd, TextStream &ti)
QCString getAsString(const QCString &name) const
Gets the resource data as a C string
Class representing a directory in the file system
static void generateXMLForPage(PageDef *pd, TextStream &ti, bool isExample)
static ConceptLinkedMap * conceptLinkedMap
static PageLinkedMap * pageLinkedMap
void err(const char *fmt,...)
static void generateXMLForClass(const ClassDef *cd, TextStream &ti)
Text streaming class that buffers data.
static DirLinkedMap * dirLinkedMap
static void writeCombineScript()
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper
static void generateXMLForNamespace(const NamespaceDef *nd, TextStream &ti)
static FileNameLinkedMap * inputNameLinkedMap
virtual QCString trISOLang()=0
Translator * theTranslator
static GroupLinkedMap * groupLinkedMap
void clearSubDirs(const Dir &d)
void msg(const char *fmt,...)
const char * qPrint(const char *s)
#define Config_getString(name)
static NamespaceLinkedMap * namespaceLinkedMap
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
static void generateXMLForConcept(const ConceptDef *cd, TextStream &ti)
void writeXMLDoxyfile(TextStream &t)
static ClassLinkedMap * classLinkedMap
void createSubDirs(const Dir &d)
static PageLinkedMap * exampleLinkedMap
This is an alternative implementation of QCString.