MAINPAGE DOCUMENTATION
MODULE GROUP DOCUMENTATION
Definition at line 1760 of file docbookgen.cpp.
References Doxygen::classSDict, Config_getBool, Config_getString, createSubDirs(), Doxygen::directories, endl(), err(), Doxygen::exampleSDict, generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), generateDocbookForPage(), Doxygen::groupSDict, Doxygen::inputNameList, SDict< DirDef >::Iterator, SDict< ClassDef >::Iterator, SDict< GroupDef >::Iterator, SDict< PageDef >::Iterator, SDict< NamespaceDef >::Iterator, Doxygen::mainPage, msg(), FileDef::name(), Definition::name(), Doxygen::namespaceSDict, Doxygen::pageSDict, theTranslator, Translator::trClassDocumentation(), Translator::trDirDocumentation(), Translator::trExampleDocumentation(), Translator::trFileDocumentation(), and Translator::trModuleDocumentation().
Referenced by generateOutput(), and parseInput().
{
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath().utf8();
}
else
{
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err(
"tag DOCBOOK_OUTPUT: Output directory `%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else
{
msg(
"Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
}
outputDirectory=dir.absPath().utf8();
}
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err(
"Cannot create directory %s\n",outputDirectory.data());
return;
}
}
QDir docbookDir(outputDirectory);
QCString fileName=outputDirectory+"/index.xml";
QFile f(fileName);
f.setName(fileName);
if (!f.open(IO_WriteOnly))
{
err(
"Cannot open file %s for writing!\n",fileName.data());
return;
}
t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>" <<
endl;;
t <<
"<book xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">" <<
endl;
t <<
" <title>" << dbk_projectName <<
"</title>" <<
endl;
if (nli.toFirst())
{
t <<
" <chapter>" <<
endl;
t <<
" <title>Namespace Documentation</title>" <<
endl;
}
for (nli.toFirst();(nd=nli.current());++nli)
{
msg(
"Generating Docbook output for namespace %s\n",nd->
name().data());
}
if (nli.toFirst())
{
t <<
" </chapter>" <<
endl;
}
{
msg(
"Generating Docbook output for the main page\n");
}
{
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
msg(
"Generating Docbook output for page %s\n",pd->
name().data());
}
}
if (gli.toFirst())
{
t <<
" <chapter>" <<
endl;
}
for (;(gd=gli.current());++gli)
{
msg(
"Generating Docbook output for group %s\n",gd->
name().data());
}
if (gli.toFirst())
{
t <<
" </chapter>" <<
endl;
}
{
if (cli.toFirst())
{
t <<
" <chapter>" <<
endl;
}
for (cli.toFirst();(cd=cli.current());++cli)
{
}
if (cli.toFirst())
{
t <<
" </chapter>" <<
endl;
}
}
if (showFiles)
{
if (fnli.toFirst())
{
t <<
" <chapter>" <<
endl;
}
for (;(fn=fnli.current());++fnli)
{
for (;(fd=fni.current());++fni)
{
msg(
"Generating Docbook output for file %s\n",fd->
name().data());
}
}
if (fnli.toFirst())
{
t <<
" </chapter>" <<
endl;
}
}
{
if (sdi.toFirst())
{
t <<
" <chapter>" <<
endl;
}
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
msg(
"Generate Docbook output for dir %s\n",dir->
name().data());
}
if (sdi.toFirst())
{
t <<
" </chapter>" <<
endl;
}
}
{
if (pdi.toFirst())
{
t <<
" <chapter>" <<
endl;
}
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
msg(
"Generating Docbook output for example %s\n",pd->
name().data());
}
if (pdi.toFirst())
{
t <<
" </chapter>" <<
endl;
}
}
}